Possible backup strategy?

I’ve been thinking if this would work: a raspberri pi (with syncthing), a docking station with two hard drives and syncthing on every computer that has files that need to be backed up.
Create or share the folders that need to be backed up and we’re good to go?
I’m thinking, every time the system goes online, syncthing looks at the files and decides if something needs to be changed.
Would that be something to consider? Or would you do it otherwise?

A sync tool like syncthing or dropbox isn’t really a good backup utility. All it takes is for you to accidentally delete files on the origin, and while syncthing is running that gets replicated on the backup machine, deleting the backup before you notice.

You could use the same hardware setup, but instead use rsnapshot. It’s like Apple Time Machine (or vice versa) in that it does repeated backups over time, only backing up the changed or new files since the last run. It saves space by hard-linking files across backups, so you don’t have duplicate files.

I do this on my systems. I have a central server in my loft which backs up via rsnapshot over ssh to a bunch of remote servers, and local machines. It runs multiple times a day, and keeps a long history of my backups.

I wrote up how to set this up on my blog a few months ago.

I do use syncthing too, which keeps files between machines in sync, and I also have a central server so I do have a copy of everything currently in my synced folders. So in the event a laptop is lost, stolen or broken, I do have whatever is in the sync folder on my server too, but it doesn’t keep a history, or protect against deletion as I mentioned, like rsnapshot does.

2 Likes

Thank you for the help. I’ve read your blogpost and have a question.
The systems that need to have files backed up, aren’t online 24/7. Would this be a problem for rsync?
Is there a way for rsync (on the system that has files to backup) to start and connect with the pi, on boot? And have a backup running in the background?

Even if the systems are not on 24/7, they’re on enough of the time to get a good backup, given the cron jobs run 4 times a day. You can obviously set the jobs to run at appropriate times. You could also start a backup on boot, for sure.

1 Like

Allright! That solves it.
A raspberri pi with a few hard drives and rsync. We’re good to go!

Thank you for the help!

1 Like

I have an easy job, because I run Ubuntu 21.04 with OpenZFS 2.0.2 on desktop and laptop. I use the laptop only, when I’m on the road, so last year I use it mainly to back-up my desktop with ZFS “send | ssh receive”. I have even a second backup, that is also using the same ZFS “send | ssh receive”.

That 2nd backup runs FreeBSD 13.0 on OpenZFS 2.0 too. FreeBSD because the system is a 32-bits 2003 Pentium 4 HT (3.0GHz); 2 GB DDR (400MHz) with 4 HDDs together 1.21 TB; IDE; SATA-1; 2.5" and 3.5" :slight_smile: :slight_smile: If you save stuff, you always can reuse it!

OpenZFS is extremely efficient because you are sending the difference between two snapshots, so the sender exactly knows which records (default 128K) to send. Note it does not send the changed files completely, but only the changed records in the files. Besides by default all storage is lz4 compressed. It sends the compressed records, so it has to send far less data with my compression ratio of ~1.8.

My Pentium takes ~1 hour to process that weekly backup, mainly, because one of the CPU thread runs at 95%, reducing the transfer speed to 200Mbps. That is the compromise, if you use an almost 20 year old CPUs with absolutely the most modern software :frowning: :slight_smile: Both FreeBSD and Ubuntu were released in April.

1 Like