YunoHost-Apps / piwigo_ynh

Piwigo package for YunoHost
http://piwigo.org/
GNU General Public License v2.0
6 stars 4 forks source link

Backup failed #75

Closed franc00018 closed 3 years ago

franc00018 commented 3 years ago

Describe the bug

An automated backup job failed

Context

Steps to reproduce

sudo yunohost backup create --apps piwigo

Expected behavior

I expect the backup to run successfully without error as it has been doing for a long time

Logs

Info: Collecting files to be backed up for piwigo...
Info: Loading installation settings...
Info: Declaring files to be backed up...
Warning: Source path '' does not exist
Error: Could not back up piwigo
Info: The operation 'Create a backup archive' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20210627-034959-backup_create' to get help
Error: Nothing to save

Here's my log

https://paste.yunohost.org/raw/anepejixac

roukydesbois commented 3 years ago

If I'm not wrong, the error comes from https://github.com/YunoHost-Apps/piwigo_ynh/blob/f26db379f4b294663d8a6ba4f18aae466202680c/scripts/backup#L31 The backup script looks for an app setting that doesn't exist.

Indeed, this line: https://github.com/YunoHost-Apps/piwigo_ynh/blob/1aa6ce5b59225f717d66055d8104f888a5ca8ee0/scripts/install#L124 is from 2 months ago, so new installs have this app setting.

But it hasn't been added in the upgrade script (I'm going to try and create a pull request to add it).

In the meantime, I have run this command:

sudo yunohost app setting piwigo datapath -v "/home/yunohost.app/piwigo"

and the backup worked. You just need to make sure that piwigo is the correct app name for you (especially if you have multiple instances).

franc00018 commented 3 years ago

Thanks, it solved my issue. I ran the command to add datapath, then upgraded the application version