YunoHost-Apps / pixelfed_ynh

The federated image shareing service Pixelfed for YunoHost
https://pixelfed.org/
GNU Affero General Public License v3.0
43 stars 15 forks source link

Restoration fails - Original path for "/var/www/pixelfed" not found #234

Closed Jaxom99 closed 10 months ago

Jaxom99 commented 10 months ago

Describe the bug

Restoration of the app on a new server after a backup fails, with the error : WARNING - Exception: Original path for "/var/www/pixelfed" not found

No special setup was made, I was just testing the app.

Context

Steps to reproduce

Expected behavior

App should be restored.

Logs

see the restoration failure log : https://paste.yunohost.org/raw/quqibukulu

lapineige commented 10 months ago
2023-08-18 12:56:50,335: DEBUG - + local archive_path=/home/yunohost.backup/tmp/migration-opencontent/apps/pixelfed/backup/var/www/pixelfed
2023-08-18 12:56:50,335: DEBUG - + '[' '!' -d /home/yunohost.backup/tmp/migration-opencontent/apps/pixelfed/backup/var/www/pixelfed ']'
2023-08-18 12:56:50,335: DEBUG - + '[' '!' -f /home/yunohost.backup/tmp/migration-opencontent/apps/pixelfed/backup/var/www/pixelfed ']'
2023-08-18 12:56:50,335: DEBUG - + '[' '!' -L /home/yunohost.backup/tmp/migration-opencontent/apps/pixelfed/backup/var/www/pixelfed ']'
2023-08-18 12:56:50,335: DEBUG - + '[' 0 == 0 ']'
2023-08-18 12:56:50,335: DEBUG - ++ _get_archive_path '"/var/www/pixelfed"'
2023-08-18 12:56:50,335: DEBUG - ++ python3 -c '
2023-08-18 12:56:50,335: DEBUG - import sys
2023-08-18 12:56:50,335: DEBUG - import csv
2023-08-18 12:56:50,335: DEBUG - with open(sys.argv[1], '\''r'\'') as backup_file:
2023-08-18 12:56:50,335: DEBUG -     backup_csv = csv.DictReader(backup_file, fieldnames=['\''source'\'', '\''dest'\''])
2023-08-18 12:56:50,335: DEBUG -     for row in backup_csv:
2023-08-18 12:56:50,335: DEBUG -         if row['\''source'\'']==sys.argv[2].strip('\''"'\''):
2023-08-18 12:56:50,335: DEBUG -             print(row['\''dest'\''])
2023-08-18 12:56:50,335: DEBUG -             sys.exit(0)
2023-08-18 12:56:50,336: DEBUG -     raise Exception('\''Original path for %s not found'\'' % sys.argv[2])
2023-08-18 12:56:50,336: DEBUG -     ' /home/yunohost.backup/tmp/migration-opencontent/backup.csv '"/var/www/pixelfed"'
2023-08-18 12:56:50,350: WARNING - Traceback (most recent call last):
2023-08-18 12:56:50,350: WARNING -   File "<string>", line 10, in <module>
2023-08-18 12:56:50,350: WARNING - Exception: Original path for "/var/www/pixelfed" not found

I have no idea of what's happening here… I guess /var/www exists on your server ?

Jaxom99 commented 10 months ago

Yes, I have a /var/www and the permissions on it are set just like the previous server. But the backup was made with limited ressources (server was a bit overload, mainly disk io), so maybe there was some trouble with backup, and now I'm in a weird server state. I will probably reinstall rather than wasting volunteer's time and brain-juice :sweat_smile: I keep the backup fil, will see if it's replicable...

lapineige commented 10 months ago

You could also reinstall, make a backup, and then replace the data files in the new backup with the ones from the old backup, and then restore this new-but-old-backup. Hopefully it would be enough to restore proper path restorations and so on (checkout the backup.csv file anyway, just in case the like of uploaded pictures makes it forget that folder… :thinking:) but with the old data.

I can assist you during this operation :)

Jaxom99 commented 10 months ago

Thanks, but I really had no data other than test posts on the first server. So "no biggie" :) I'm not sure there is anything left to do on this issue, you can close it if you want. Or if anyone has energy to dig into it, I can provide logs or files.

(PS: I made a fresh new install on this new server, and I have another major bug so... maybe I will start by asking in the forum ^^ )

lapineige commented 10 months ago

and I have another major bug so... maybe I will start by asking in the forum ^^ )

If that's apparently a bug, please open an issue :)