Wondering about backup

i was just wondering about the backup functionality.

if i restore a server, but with different domains/subdomains, how would that affect the backup?

what if it is the same domain, but im missing some subdomains?

Good question

Hi,

I tried once to restore a backup (of my original server, let’s call it YYY.org) on a different server (with a different domain let’s say ZZZ.org) just to be sure that the backup was OK and could be effectively restored if needed.

My backups are done with Borg.

Borg restored the content of YYY.org on ZZZ.org, but with the domain YYY.org (obviously). So I had to simply change the domain name manually to have everything right. One problem though : vaultwarden could not be restored correctly, as domain name check is part of its strong security. I could not find a workaround :confused:

I would be grateful for any other testimony about a backup restore (with or without Borg), especially regarding to vaultwarden.

1 Like

using Borg was your decision, because yunohost can also do it by itself? right?

or did i get that wrong? :upside_down_face:

In short :
Yunohost will create backup files that contain your settings and in some case your data so that you can restore them on same/another server.
Borg will save these backup files on other server in case your yunohost crash (for example : disk failure)

If you just use the yunohost backup functionnality but do not save these files elsewhere, you won’t be able to get them back, for example in case of disk failure.
You may read Backup strategies | Yunohost Documentation for more info.

2 Likes

Hello, I have 2 questions :

  1. Does Yunohost default backup use deduplication and compression to get several copies of backups ?
  2. Is it possible to “daily cron” the Yunohost default backup ? (my Borg backup broken during latest Yunohost version, even after migration process, so I want something better integrated than an app for this critical backup need).

Thanks !

  1. no deduplication. if you want that look at restic, or borg backup.
  2. yes. probably want to make a sh script to make a name for everyday, and then prune older backups.
2 Likes

these script snippets will be useful in your script that you make

now=$(date +%F_%H%M%S)
echo $now
filename=backup_$now
echo $filename
echo "** MAKE BACKUP **"
sudo tar -cf /home/yunohost.backup/archives/$filename.tar /var/www/my_webapp/www/
#change this to the yunohost backup command
echo "***** DELETE BACKUPS OLDER THAN 7 days *****"
find /home/yunohost.backup/archives/ -type f -iname 'arkadicloud_*' -mtime +7 -delete
1 Like

Thank you very much !

1 Like