nextcloud_ynh icon indicating copy to clipboard operation
nextcloud_ynh copied to clipboard

Restauration fails : hook_exec_failed

Open lapineige opened this issue 3 years ago • 13 comments

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.

lapineige avatar Nov 28 '20 00:11 lapineige

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)

alexAubin avatar Nov 28 '20 00:11 alexAubin

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 avatar Nov 28 '20 09:11 lapineige

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

lapineige avatar Dec 04 '20 07:12 lapineige

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

kay0u avatar Dec 04 '20 09:12 kay0u

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:

lapineige avatar Dec 25 '20 20:12 lapineige

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

kay0u avatar Dec 25 '20 20:12 kay0u

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.

lapineige avatar Dec 25 '20 20:12 lapineige

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

kay0u avatar Dec 25 '20 21:12 kay0u

That also the case for me.

lapineige avatar Dec 25 '20 21:12 lapineige

Hmm @alexAubin do you have any idea on this?

kay0u avatar Dec 25 '20 21:12 kay0u

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 avatar Dec 28 '20 08:12 lapineige

Maybe I should open a topic on the forum ?

lapineige avatar Jan 06 '21 09:01 lapineige