My backup system in a bit more detail Restic is a fast, secure, open-source backup tool that creates encrypted, deduplicated snapshots of your data and stores them in local or remote repositories. It is designed to be simple to use, efficient with storage, and reliable for both backups and restores. Introduction Who backs up...? I back up, that’s who... although it is something I didn’t do for a long time. Since I started self-hosting and gathering my own data, I thought that it was about time that I did the responsible thing and do a regular backup. As Yunohosters, we are lucky in that the platform comes with an, albeit simple, backup solution via the admin panel. As a backup solution, it’s very good as it packages everything needed for an app or a user and their email into a nice little tarball, so when you have to restore something, it puts everything back in the right place. Very neat and tidy. This is a manual process, but you can automate it with a simple cron job, which is what I did. In the terminal on your server, type: crontab -u root -e. You need to be root to do this, so just do an su and type in your password again before running crontab -u root -e. You can then edit the crontab file. Here is mine: (for better or for worse, but it works). #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #        CRONJOB TO BACKUP THE YUNOHOST SERVER USING THE  #                              YUNOHOST BACKUP SERVICE. #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # # See the lables on the external drives: "YUNOHOST" is the Yunohost # backup drive, a good old fashioned 'spinner'. # #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # 1. Backing up the full system to /dev/sdb1 (/media/yunohost/) simlink'ed # There is a blank .nobackup file in the yunohost.multimedia directory, # this is to prevent this directorybeing backed up. ALL multimedia files # are backed up using Restic and Backrest to a 2nd drive called # "DATARECOVERY" # 0 0 * * 3,7 yunohost backup create # # Full back up will start at MIDNIGHT every WEDNESDAY and SUNDAY. # #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # # 1.1 Other items to back up at other times will be email # 0 6 * * * yunohost backup create --system data_mail # # Email is backed up EVERYDAY at 4 AM # # 1.2 More items to be bnacked up include all the system users home folder. # 0 7 * * * yunohost backup create --system data_home # # User home folders backed up every day at 5am # #++++++++++++++++++++++ WE ARE DONE HERE...+++++++++++++++++++++++++++++++ I’ve made the commands bold here for clarity, but as you can see, it’s very simple. And on the Yunohost website and forum, you can find all the different types of commands to use with yunohost backup create Im sure that there will be some puritans out there that say that there is something wrong with this. It has worked flawlessly for me for a long time now, but if there is something wrong with it, then I would like to know. I created a symbolic link to the external drives, which is where the backup tarballs that Yunohost creates are stored. Why? Well, disk space mainly, but also it gets the backup OFF the servers dirive and somewhere safe if the server fails. So this is my very basic backup setup. Great. I have had to use it on occasion when updated applications don’t work. Each time you do an application update, the original is backed up, so you can restore it if the update fails. Very handy. However, this method is not quite following the 3-2-1 rule.  The rule breaks down as follows: 3: Copies of your data – Keep your original working files plus at least two separate backup copies. 2: Different types of media – Store those copies on two different devices or technologies (e.g., your computer's internal hard drive and a physical external drive). 1: Off-site location – Keep at least one backup copy completely away from your home or office (most easily done using cloud storage). According to this rule, I am doing some of this. The above is the gold standard for backup; however, when resources and money dictate, then you have to make do with whatever you can. Any backup is better than no backup, right? What do I backup and where? I back up everything. I have a lot of time and memories invested in the data that I have curated over the years, and I have been bitten badly once, and lost a massive amount of data. Now I’m self-hosting I want to make sure that everything is backed up somehow, somewhere. I use the Yunohost backup with a cron job for automatic back up to a USB drive and and Restic for a more granular, selective backup. I'll do a section later just on Restic and how I have set it up. So I have the following in place: A USB keyring that has the latest version of the Yunohost image. In the event of a total disaster, one that requires a complete rebuild, I can boot from the USB keyring and restore the system. I have a small wired keyboard and a tiny 8-inch monitor so I can do the necessary... I check every few months with the Yunohost website and grab the latest image and update the keyring. Every six months I plug everything up, the keyboard, monitor and boot from the keyring, just to make sure it all works. well you never know... Two 2TB USB drives for backing up to. (Old fashioned spinners!) One drive is labelled "YNHRECOVERY". This is where my server does its backup using my cron job from earlier. The other is labeled "DATARECOVERY" Using Restic I copy the latest backup from the YNHRECOVERY to this drive, so now I have two copies of the full server on two separate drives. An iDrive S3 account where I have three buckets. ynh-idrive-s3: This is my yunohost offsite backup my_laptop: I use Restic on my Mac and back up the whole of the home folder, with exclusions like the Library folder and a few other, like .Trash. h_laptop: My partners laptop, which is a Mac gets the same backup. 1. Symbolically linked to store all the Yunohost backups that are created from my cron job. 2. A backup of the mega important stuff using Restic. More on this one later. What does mega mean? This is a personal choice thing. Yes, it's all important, but gun to the head, what's really important given what you have at your disposal? How to... Descriptions of connecting to USB drive via sftp Descriptions od connecting to iDrive S3 Thoughts Well?