Best method to backup yunohost to S3 compatible bucket

So, what is the best method to backup to a S3 bucket? I configured archivist, but i don’t see any backup on my bucket.

Any how to would be useful

1 Like

What does Archivist say in its logs? Can you share your config (and remove any passwords or id)?

I use restic to do my backups. It supports S3 buckets and these other backends.

    Local directory
    sftp server (via SSH)
    HTTP REST server (protocol, rest-server)
    Amazon S3 (either from Amazon or using the Minio server)
    OpenStack Swift
    BackBlaze B2
    Microsoft Azure Blob Storage
    Google Cloud Storage
    And many other services via the rclone Backend

I have a tutorial I made for using it with Yunohost, not with S3 buckets, but it’s not much different based on the different backends. I used it with Wasabi before.

1 Like

I have set a daily backup in initial config, then i wasn’t seeing any files in my bucket, so i did a forced backup in archivist/actions. I think it’s still running since yesterday because i can’t acess any yunohost webui options. My bucket tells me that has only 300Mb of files.

Also i had mounted bucket with s3fs to /mnt/backups and set this location in archivist config

Should i use the same config as wasabi? It’s a contabo object store

Edit: So with restic, i have to make a full yunohost backup to /home/yunohost.backup/archives and then restic sends it to the bucket?

That wasn’t my idea, i want to send directly to the bucket

I wouldn’t do that either. I wouldn’t bother with Yunohost backups at all. The most important thing is the data right? So just backup your data and tag it in restic. It was so easy to do a full-reinstall of Yunohost. I recently reinstalled my whole Yunohost and brought my data back from my restic backup. So easy!

I’m wary of all these s3 things because I don’t know how they charge you. There are lots of discussions about these sort of queries on their forum though. I am not an online storage user, so I don’t know much about that, just that Restic has that capability.

I was just browsing their forum and noticed that CERN is testing out Restic to use as their backup solution. Cool!

Anyways getting off topic here. Keep us updated on how it goes :smiley:

I arrive after the battle, but I would be careful about backing up “just the data”.

  1. You create your backup for my_critical_app_v2.4
  2. Unrecoverable hard-drive crash
  3. New hard-drive, reinstall. App comes now in v3.0
  4. Your data from 2.4 cannot be restored on the v3.0 of the app
  5. Suffering

I’m not saying it would be hopeless, but it would dramatically increase the complexity of the restore process.
Note that if you’re unlucky, my_critical_app_v2.4 is not installable on the update of the Yunohost version that was just released after your hard-drive crash. So I guess there is no guaranteed easy restore (?)

To answer to the primary question about S3, i recommend you to use the yunohost app “restic” (even if i think you should be carreful and test your backup cause i think some bug corrected in yunohost borg app have not been corrected in restic).

About the second question, if you use borg_ynh, restic_ynh, archivist or just download an archive produce with yunohost, you backup what you need.
When you restore it will restore the app in the version of your backup. In some case you could have dependencies rebuild issues OR if you restore on a upper major version of yunohost you could be sometimes in a bad situation.

For example, restore an app using python2.7 on YunoHost 11 won’t work, cause python2.7 is not installed.

1 Like