YunoHost-Apps / nextcloud_ynh

Nextcloud package for YunoHost
https://nextcloud.com/
GNU Affero General Public License v3.0
147 stars 64 forks source link

Restauration fails : hook_exec_failed #353

Open lapineige opened 3 years ago

lapineige commented 3 years ago

When trying to restore a backup, I have the following issue: https://pastebin.com/MWnC3fm5

I don't know if it's linked to the hook_exec_failed or the warning about php7.3 installation…

I have only php-7.3 on my system.

The backup was made in september, I don't remember how up-to-date nextcloud package was.

alexAubin commented 3 years ago

Sounds like an attempt at restoring an old backup (with a version from a pre-buster-era, though if the backup was made using a version from the few months prior to the buster release, that should be okay)

lapineige commented 3 years ago

The backup was made on September 20. I don't remember how up-to-date that nextcloud was, but I'm not sure it was that up-to-date. Do you mean that yunohost version evolved since that date, and I can't restore it now ? Is there any workaround ? (downgrade Yunohost, replace restore script by a more recent one…)

lapineige commented 3 years ago

🆙 Any idea ? I can't restore anything right now :(

kay0u commented 3 years ago

Hi, I think you can edit the restore script with this one (I adapted it with new helpers). To do so, SAVE your current backup (tar.gz and json) /!\, then edit the script apps/nextcloud/settings/scripts/restore in the archive, and try to restore it again

lapineige commented 3 years ago

I can't restore, Impossible d'avoir des informations sur l'archive '/home/yunohost.backup/archives/nextcloud_backup.tar.gz' ... Le fichier info.json ne peut pas être trouvé (ou n'est pas un fichier json valide).

But my json is valid (I checked with the classic python command) and the info.json is present at the root of the archive…

I tried to bypass that by extracting the archive and running the restore script, but : ~./restore: ligne 9: ../settings/scripts/_common.sh: Aucun fichier ou dossier de ce type (there is a _common.sh file)~ edit: I had to be located in app/nextcloud/settings folder. Problem solved.

Now I have this : /usr/share/yunohost/helpers.d/logging: ligne 38: YNH_STDINFO : variable sans liaison

I'm not lucky :sweat_smile:

kay0u commented 3 years ago

The json file should be outside of the archive. For example in the folder /home/yunohost.backup/archives/ I have the archive 20201221-092610.tar.gz and the file 20200918-202528.info.json

lapineige commented 3 years ago

It is outside (same name as archive), and inside with the right name (info.json). It fails when it search for the second one, after decompressing the archive.

kay0u commented 3 years ago

Inside the archive, I have two files: info.json and backup.csv and a folder apps

lapineige commented 3 years ago

That also the case for me.

kay0u commented 3 years ago

Hmm @alexAubin do you have any idea on this?

lapineige commented 3 years ago

Additional note: I discovered that I was already on Debian Buster / Yunohost 4 (but I don't remember migrating… 😅). I don't know if it's related, and maybe I did migrate after doing that backup… 🤔

lapineige commented 3 years ago

Maybe I should open a topic on the forum ?

alexAubin commented 4 months ago

Should we close this ? It's 4 years old and the original pastebin doesnt exist anymore :|