Mobilizon restore failed

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.1.0.2
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no / yes
Have try a branch unstable for mobilizon

Description of my issue

I have try to backup first my app Mobilizon and try if the release 3.0.0 could be installed

yunohost app upgrade mobilizon -u https://github.com/YunoHost-Apps/mobilizon_ynh/tree/ci-auto-update-v3.0.0

I know it was a crash test, but I thought I could restore my backup if there was a problem…

So, there was a problem, I was unable to login after the upgrade, it seems the ldap is broken after some releases… I try also to change my password but it didn’t works…

So I decide restore my backup, but it fails also !!

Here are the logs:
https://paste.yunohost.org/raw/qireqewoqo

it is hard for me restore, because I have to remove manually the folders /home/yunohost.app/mobilizon, this folder is a link because I use a mount --bind /mnt/apps/mobilizon /home/yunohost.app/mobilizon, so my data are still in /mnt/apps/mobilizon, I have also need remove the /home/mobilizon_notifs folder…

Well, it will be nice to restore the backup, what’s going wrong !!

Mon serveur Yunohost

Hardware: VPS bought online
YunoHost version: 11.1.0.2
J’ai accès à mon serveur : par SSH | par la webadmin
Des manipulations spéciales sur le serveur ? : oui
Test d’une branche instable de Mobilizon

J’ai voulu tester la version instable de Mobilizon 3.0.0, d’abord en effectuant une mise à jour de l’actuelle

yunohost app upgrade mobilizon -u https://github.com/YunoHost-Apps/mobilizon_ynh/tree/ci-auto-update-v3.0.0

Je savais que c’était un risque, mais je pensais pouvoir restaurer ma sauvegarde au cas où.

Donc, en effet, je ne pouvais plus me connecter après la mise à jour, un problème déjà depuis quelques versions de Mobilizon où le LDAP est cassé ! J’ai tenté sinon de changer le mot de passe de l’utilisateur, mais ça n’a pas fonctionner non plus…

J’ai voulu donc supprimer l’app et restaurer la sauvegarde, mais ça n’a pas fonctionné… déception !!!

Voici les logs:
https://paste.yunohost.org/raw/qireqewoqo

C’est dur en plus de restaurer car je dois supprimer à la main des dossiers /home/yunohost.app/mobilizon, ce dossier est un lien car j’ai utilisé un mount --bind /mnt/apps/mobilizon /home/yunohost.app/mobilizon, donc mes données sont toujours dans /mnt/apps/mobilizon, j’ai aussi enlevé manuellement le dossier /home/mobilizon_notifs

Bref, comment résoudre ce bug inattendu !!

Pour info, installer mobilizon aussi échoue… avec la même erreur !!
logs: https://paste.yunohost.org/raw/uzawerecus

2022-11-17 00:07:13,456: DEBUG - + yunohost user create mobilizon_notifs --firstname Mobilizon --lastname Notifications --domain mobilizon.maindomain.tld --password ********** -q 0
2022-11-17 00:07:13,605: WARNING - Not a tty, can't do interactive prompts

C’est un problème avec le user à créer mobilizon_notifs on dirait…

Comme je m’en veux d’avoir supprimer l’application… Ça m’apprendra a avoir trop confiance !! Ce bug est lié aussi depuis que le serveur Yunohost est passé en testing il me semble (pour moi par erreur, car j’étais et suis sur la branche stable).

Is it related also with this problem Installation / Upgrade of synapse server - yunohost 11.1 - #2 by Aleks

How can I resolve ? waiting this commit to be merged ? Do it means also something to add in the app scripts ??

Hello, I found how resolve, it similar with the posts I read, since 11.1 it is deprecated in the yunohost helpers yunohost user create with options --first-name or/and --last-name
So I do a fix here GitHub - rodinux/mobilizon_ynh: A federated organization and mobilization platform for YunoHost
I could install mobilizon with these fix

Now, please, can I edit my backup to restore with these paramaters ???

Can I edit my folder backup.tar ??

I am tryng edit.my backup flles and make a PR with my fix.

So I succeed restore my backup like this:

  • I upload first my backup 20221116-205631.tar

  • I have edit the files in the archive .tar /apps/mobilizon/settings/scripts/restore and apps/mobilizon/settings/scripts/install and apps/mobilizon/settings/scripts/upgrade to replace the line
    yunohost user create ${app}_notifs --firstname "Mobilizon" --lastname "Notifications" --domain "$domain" --password "$ynh_user_password" -q 0
    with
    yunohost user create ${app}_notifs -F "Mobilizon Notifications" --domain "$domain" --password "$ynh_user_password" -q 0

  • Then I rename the archive fix-20221116-205631.tar

  • I transfer this file in my server with scp fix-20221116-205631.tar user@domain.tld:/home/user/ on my home folder

  • I move the archive in mv /home/user/fix-20221116-205631.tar /home/yunohost.backup/archives/

  • and a chown root: /home/yunohost.backup/archives/fix-20221116-205631.tar

  • copy the good info.json cp -a /home/yunohost.backup/archives/20221116-205631.info.json /home/yunohost.backup/archives/fix-20221116-205631.info.json

  • Verify if the archive is present yunohost backup list,

  • if all good yunohost backup restore fix-20221116-205631

And it works !!

So I made a PR for this fix it works only with Yunohost 11.1 perhaps ?? Fix deprecated options for yunohost user create helper by rodinux · Pull Request #147 · YunoHost-Apps/mobilizon_ynh · GitHub

This is a temporally fix, I have understood the options --firstname and --lastname for yunohost user create will coming back on future releases…