Syncthing + Restic 3-2-1 backup solution

Hello! Thank you for your work on Restic!

I am designing a backup system for my family. We have multiple roaming devices, and we have two home servers in two different locations. We have a shared family folder which we synchronize with syncthing.

Here’s my plan:

Sync the shared family folder among all devices, including both servers, by setting all devices to send/receive in syncthing.

On each roaming device, set up the home directory as a send-only syncthing folder, to be shared with both home servers and none of the other roaming devices. The home directory .stignore file would exclude the shared family syncthing folder, trash, cache, etc.

On each server, all of the syncthing folders would be stored in one place in the home directory:

~/syncthing
├── laptop1-homedir
├── laptop2-homedir
├── phone1-homedir
├── phone2-homedir
└── shared-family-folder

Then on the home servers, the restic backup would be as simple as:

restic backup -r ~/restic-repo ~/syncthing

My question is about how to synchronize the Restic backups between the two servers. The options I see so far:

  1. Don’t synchronize them. Create two separate repositories, and in event of restore, just pick one. This solution keeps backup really simple, but will make restoring and exploring old snapshots trickier, since the snapshots won’t be consistent between servers.

  2. Only call restic backup on one of the servers, then use restic copy to copy snapshots to the other server. This solution ensures that backups are consistent, but it means that backups won’t happen if server1 is down even if server2 is up. It also requires network access, sftp, maybe dynamic dns. These aren’t a big deal, but I’d prefer to KISS.

  3. Use syncthing to sync the restic repo. As discussed here, this seems like a bad idea since syncthing doesn’t know about restic repository structure, and it doesn’t perform any checks.

Which of these would you suggest for a new Restic user?

More broadly, do you have any suggestions on how to improve this setup?

Thank you!!!

Joseph

Hey, welcome to the forum :slight_smile:

I’d go with #1 personally, as I don’t think the restore would be an issue at all.
Furthermore, I can’t see any benefit to complicating things by adding copy, or synchronising the repository directory. Maybe I’m missing something though?

To explain my choice a bit more:

I’m assuming both servers back up/forget/prune in the same way to their own local repository
While the snapshots in each repository won’t be identical (they’ll have different metadata at least), their contents should be. This because the data being backed up from both servers is being synchronised by syncthing, and the backups are being triggered at approx the same time.

Put another way, I’m arguing the data in the snapshots should be consistent across both server repositories, even though the snapshot IDs/timestamps etc. won’t be.

I’d envision that when comes time to restore you would just use whichever server was physically closest to the target device to be restored to, and pick the snapshot from that servers local repository that covers the time period you want to restore the files from. Again, there’s no need to particularly worry about whether it’s the snapshot comes from server A or server B, as the snapshot data should be identical.

Aside from the simplicity, this setup also means if backups start failing on one server, or something happens to a repository, or something similar, you’ve got full redundancy with the repository/backup job on the other server.

Hi,

My gut feeling says option 1 would be even beneficial if you set different backup times for the different hosts, making them more granular.

I would personally not care consistency for family-related stuff (I hope no one is keeping a relational database on their synced folder).
As an extra idea, I could suggest finding a 3rd location if possible (e.g. an external s3 storage they can both reach), so they can copy both into same repo after they are done.

(also I liked the idea on the above post :slight_smile: )

@breatheoutbreathein, here another vote for the KISS option 1. I think @shd2h explained the reasoning well.

if you want to go option #3, then you can run restic check and restic check --read-data to verify the integrity of the sync’ed repository.

Thank you all (discourse won’t let me mention you all by name since I have a new account)! I’ll go with option #1. It makes sense to me that restoring would not be made too complicated, and that the redundancy would be good.

No relational databases in the family folder :wink:

I plan to use restic copy to copy the backups from one of the home server restic repositories onto a removable hard drive, which will be stored on-site. This will more than complete the 3-2-1 setup (three or four copies, on three or four different media, in two locations).

Thanks for the restic check and restic check --read-data suggestions.

Thanks for all your help!!!

1 Like

For future reference, instead of using restic copy to copy individual snapshots from the repo on one home server to removable hard drives, I simply backup to both repos at once with restic backup.