Help Needed: Yunohost Backup Strategy Rsync

I am learning how to use rclone with my yunohost to backup to S3 compliant storage.

I would like to know what folders are the most important to backup to be able to restore all my data and apps to a fresh yunohost installation? Does it matter if the yunohost version changes?

Also, can anyone share a how to make a cronjob so that the backup happens automatically? Are there any file permissions that must be changed? Do I have to be root or add my non-root user to sudo group?

Merci.

Hi Luncheon,

I don’t have a straight one-fits-all answer, as with everything, “it depends” :stuck_out_tongue:

For context: your Yunohost and S3 compliant storage are at home or at a VPS?

I can think of multiple levels of backup; depending on your needs and expectations one, another or a mix could help you:

  1. “Full machine backup”: my Yunohost runs in a container on Proxmox. Proxmox offers to backup the full (running) machine. Restoring it will put the whole system back the way it was at the moment the backup was made.
  2. “Yunohost per app backup” (with or without data): Yunohost creates a backup of an app before upgrading it via the Yunohost backup mechanism. By default this excludes data from apps like Nextcloud, but when running this mechanism yourself, you can chose to include the data.
  3. File level backup: you define a list of directories to backup in the configuration of your backup tool

Probably there are more choices and for sure more implementations, but this gives a crude categorization.

Guessing rclone has to do with rsync, and checking the website seeing “Rclone helps you [to] backup (and encrypt) files to cloud storage”, I think rclone falls in category #3, where you give a list of directories to clone. Is that correct?

To restore apps (with all their settings and data) to a fresh Yunohost installation, I would use Yunohosts built-in backup mechanism to create restorable modules. Be sure to tick “including data” for space-hungry apps that have it disabled by default.

After running these backups, the resulting files can be sent off-site for safekeeping.

When using the app-backups created by Yunohost for recreating an installation from scratch, they have never failed me. This way it is possible to restore a backup created on 32-bit Arm to a new installation on 64-bit AMD.

I don’t think I restored apps from an old version to a newer Yunohost/Debian version. In many cases that would work, but in some cases specific versions of libraries are packaged, which don’t exist on, or are not compatible with, a newer Debian version. An example is Firefox Sync: it is built on Python 2, which does not exist anymore.

The post got a bit longer than I intended, without a clear advice. I hope not to bore you with it :wink:

I also recognize that I did not really answer all your questions. Don’t hesitate to re-iterate the bits that are important for you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.