YunoHost-Apps / borg_ynh

An experimental Borg implementation for YunoHost
https://www.borgbackup.org/
GNU Affero General Public License v3.0
19 stars 26 forks source link

Borg Backup Restore procedure is not working #181

Open braunMarkus opened 1 month ago

braunMarkus commented 1 month ago

Describe the bug

The Borg backup software is not working as described or to be more precise, the restoration of any borg created backup is not working for me. I am using borg locally to create backups on a seperate mounted disk and it creates backups weekly which is working fine. However, I cannot restore things. Whenever I try to use the described way with "borg export-tar ::" it just throws out a .tar file which is neither recognized by the built-in backup tool when copied to the right location nor if I extract the backed up files locally. I have the feeling that the path inside the backup is somehow mixed up because when I extract it, the path is always 'home/yunohost/yunohost.backup/tmp/...' instead of '/home/yunohost.app/'.

Context

Steps to reproduce

Follow the steps from borg Application page to restore borg export-tar :: this-tar.tar yunohost backup restore this-tar.tar => Error: Info.json not found or not a valid json file

Expected behavior

Well, just as described in your documentation ;-)

Logs

When an operation fails, YunoHost provides a simple way to share the logs.

After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)

If applicable and useful, add screenshots to help explain your problem.

xmgz commented 3 days ago

exactly the same issue:

borg backs up apps and creates a .tar (.tar.gz) which includes (inside) a info.json file.

I've exctracted that file, rename it like app-backup.tar file (app-backup.info.json) but then YNH can not reinstall because than json is malformed/incorrect/etc.

So we have borg backups, but can't we restore apps?

Have you @braunMarkus found any workaround for this issue?

I found about it trying to recover an app after migration to ynh12 (if this is relevant). Also tried .tar.gz without success.

Shouldn't backup-ynh detect this info.json file inside .tar file? Thank you.