My Data Backup Solutions
It's easy to forget how important storage backups are until the moment you need it. I recommend, right now, that you think about any digital data you don't want to lose. Important documents, recovery codes, photos, old writing drafts, personal projects. What device are they on? What if your house caught fire and that device were destroyed? If your answer is they would be gone forever, you're going to be kicking yourself the moment any event like that happens. So be prepared.
I had to consider this seriously when I started self hosting. More and more important things are being stored on my home server -- a single point of failure. I don't even have a raid config on that thing. It's just an old dell tower I got at a college surplus sale. It has one SSD in it. Literally if that single SSD craps out I'm screwed. Or at least I would be without my backups.
The 3-2-1 Rule
I didn't come up with this. The gist of it is that you should have:
- 3+ copies of your data
- On 2+ different devices
- With 1+ offsite.
This is very solid advice that covers all of your bases. Your data cannot be lost from a single point of failure this way, and recovery is always possible. If you delete a folder, there's another folder with the same data. If you lose the whole device, it's on another one. If you lose all of your devices to some horrible disaster, there's another copy somewhere that didn't suffer the same disaster.
Syncthing
I started using syncthing because I often switch between my desktop and laptop and wanted access to some of the same files on each. Syncthing is a really nice lightweight peer-to-peer sync solution. I have a single folder called Sync that's shared between my server, laptop, desktop, and phone. Between those 4 devices the data is extremely unlikely to be lost. Now if I happened to delete everything in the folder on one device (as opposed to the device being destroyed), that would propagate to all of the others, but syncthing has version control which lets me rollback to before that happens. And if that doesn't work...
RClone
RClone is the backbone of the 1 in my 3-2-1 setup. It copies data on my server into folders on Proton Drive. If I get more cloud storage providers I could effortlessly sync to multiple as well. I have it set to back up the syncthing folder, the data folders of several docker containers, and the sharedrive (info below). Each day a cron job saves the files modified in the last 24 hours to proton drive. Every 2 weeks it does a full scan of files modified at any time and uploads them in case anything ever went missing or my daily scan broke for a day during that period. The scan mainly breaks when my auth expires and I need to log RClone into proton drive again.
NFS Share Drive
This is the most recent addition to my backup scheme. NFS is short for Network File System -- an old protocol for sharing a partition across a network and letting your computer see it as if it were on the same computer. I use this for folders holding very large amounts of data that I don't need copied several different times between devices that have different amounts of storage, which would be an issue if I used syncthing. That drive is shared between my desktop and laptop but lives on the server. Since it's backed up with RClone I don't have to worry about losing all of the data in it. I could recreate it on a new physical drive and pull the data down from proton.
Future Upgrades
With the work I've done on my backups it's nearly a reality for my computers to be swappable terminals into the same source of data. If my laptop dies I can just get a new one, connect it to my server, and have most of my stuff as if I never left. The clear path forward is to go from most of my files to all of my files. For that I'll need to make some storage upgrades to my server to make it more fault tolerant, which will be the subject of another post in the future when those upgrades are made.