How do you backup your YunoHost server?

Two ways, VPS boot volume backup and ynohost backup utility,then copying the archive to external cloud storage.

How can you be sure that the backup drive will always have the same path ? For ex., if you forgot that you already plugged another drive, the DISC variable may point to that drive instead of the one you use for your backups ? Need to know, 'cause I’d like to try your script :stuck_out_tongue:

I mount drives using UUID on @reboot.

OK, so you need to stop/restart your server.

I’m looking for a solution to make a copy of Yunohost backup files created after each update, automagically when I plug a specific drive/partition to the server. I already started playing with udev rules, but I didn’t go very far.

OK, so you need to stop/restart your server.

My server works 24/7 so mounting drives on reboot is ideal for me. I do backup every 2 days, but I have to change that to everyday.
I see that i have a problem in a ‘if’ instruction. I have to change it.

I’m looking for a solution to make a copy of Yunohost backup files created after each update, automagically when I plug a specific drive/partition to the server. I already started playing with udev rules, but I didn’t go very far.

I think it is possible with UUID. Mounting a drive/partition can be a trigger, but right now I don’t how to use it in another programme. Your use-case is different than mine.

Hello everyone :slightly_smiling_face:

Any idea about how to backup Ynh? I was thinking that maybe it could be used a DIY solution, but provided as a tutorial so everyone can follow it.

What do you think?

Thank you

There are MANY ways of backup in YunoHost, you can find some of them in the documentation Backup strategies | Yunohost Documentation

Here, there is a nice poll about the choice made by some users.

What’s the easiest way to backup Yunohost on a VPS, directly to an external computer?

(VPS doesn’t have enough storage for the backup)

1 Like

Maybe with Rclone and S3 storage like Scaleway? I use Scaleway for external backup of my server. It is syncing my all backups that are on my external drive.

Hello there.
I have just started with all of this, and am using a raspberry pi 4 with a 32G usb-stick for yunohost / os.
My backup method is basic.
Shutdown the server, plug the usb stick into main PC (MXLinux) and use clonezilla to save the entire disk as a compressed image.
Having severely trashed the server several times due to ignorance, the restoration via clonezilla has worked very well.
For a main-line server that others use, yeah this wouldn’t work well. But for just my family usage, goes well.

Cheerio.

I’ve recently brought a small vps to test things. I broke it may be 4 or 5 times in 10 days. I went in the provider dashboard to buy the snapshot option and it was twice the price of the vps :upside_down_face:… boh…
So I searched for an alternative snapshot solution. Ok for borg, but I’ll have to install an app and a server. Restic is interesting, only need sftp access to my home server, but no web ui. I came accross this repo while searching : GitHub - rubiojr/awesome-restic: Awesome Restic related projects but only desktop gui.
Rsync also with gui and web ui GitHub - furier/websync: websync is intended to be an rsync manager, where rsync tasks can be added, scheduled and maintained in a sane manner. but sadly no longer maintained.
I’ve installed in one test timeshift, mounted an ftp folder, and blown the server…
I’ll be restoring a lot these days :smile: . Complete server restore.
to be continued…

1 Like

Exactly what I’m wondering. I’m looking into using borg_ynh and Borg Server YNH with Tailscale to backup from my VPS to a home server that is LAN only but has a ton of storage.

Hiya all, I have a usb 3tetraB hdd connected to my router.
I run a cron job to create a daily backup on yunohost and delete the one from yesterday. The new daily backup is then copied to the 3tetraB hdd using smbclient command. This is all done via a single script.
Output looks like this::

etc/cron.daily/check_backup:
This script is called ‘check_backup’ It creates a backup and removes some of the previous backups.
Script is run once a day in /etc/cron.daily/
Yunohost backup list on server before removing archives automatic-:
archives:

  • phpsysinfo-pre-upgrade1
  • mattermost-pre-upgrade1
  • automatic-2023-11-12
    Now creating the yunohost archive automatic-2023-11-13 on the server.PLEASE WAIT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Collecting files to be backed up for mattermost…
    Declaring files to be backed up…
    Backing up the database…
    Backup script completed for mattermost. (YunoHost will then actually copy those files to the archive).
    Collecting files to be backed up for phpsysinfo…
    Declaring files to be backed up…
    Backup script completed for phpsysinfo. (YunoHost will then actually copy those files to the archive).
    Creating a backup archive from the collected files…
    The archive will contain about 85.3GB of data.
    Backup created: automatic-2023-11-13
    name: automatic-2023-11-13
    results:
    apps:
    mattermost: Success
    phpsysinfo: Success
    system:
    conf_ldap: Success
    conf_manually_modified_files: Success
    conf_ynh_certs: Success
    conf_ynh_settings: Success
    data_home: Success
    data_mail: Success
    data_multimedia: Success
    data_xmpp: Success
    size: 91572579299
    ################################ Remove some archives with exceptions automatic-2023-11-13 ##########################

removed ‘automatic-2023-11-12.info.json’
removed ‘automatic-2023-11-12.tar’
Removing all except these dates : 2023-11-13 2023-11-12
Yunohost backup list on server after removing some archives:
archives:

  • automatic-2023-11-13
    This section copies the new backups to the disk on router
    /home/yunohost.backup/archives
    putting file - as \automatic-2023-11-13.tar (11250.8 kb/s) (average 11250.8 kb/s)
    automatic-2023-11-13.tar copied
    putting file - as \automatic-2023-11-13.info.json (180.5 kb/s) (average 180.5 kb/s)
    File automatic-2023-11-13.info.json copied