Same files backed up using different machines and different methods


Hi everyone, and Happy New Year!

I have a quick question regarding my restic scenario. I have a dataset (~10TB) that needs to be securely geo-replicated for survivability. So the HDDs containing the restic repository will be physically moved into a different country and installed in a new server. After that, we will continue to do periodic incremental backups to the same repository that is now accessed through WAN.

So to save time and money I want to create initial backup using some server S1 at my local premise over LAN and NFS. All the perform incremental backups using some other server S2 over WAN and SFTP.

After doing preliminary tests I can see that created snapshots differ by the host name (i.e., S1 vs. S2 which is expected) and the Paths (because S1 and S2 have different relative paths towards the dataset). However, despite these differences, restic successfully detects that the backed up files are the same and avoids data duplication (great!).

I just want to confirm that what I am doing is an expected use case for restic and backing up the same files from different machines towards one repository will not cause some known problems.



It is expected and supported. The worst case would be restic re-reading all 10TB of data locally again, but it won’t send the data over the network as the repo already contains the data. You can maybe do some tricks with --parent to avoid that, but if you let it re-read everything once then you’ll be fine :slight_smile:


Great! Thank you for the answer!


For the record: the repo format is even compatible for all the different backends, so you could sync your data up to B2 or S3 and then use that directly.


Note that you can use --host when creating a backup to force a hostname for the backup. You can make creative use of chroots to simulate the path structure of S2 on S1.

(Though, in the long term, this will not matter. It only means the first backup on S2 will take a bit longer since there is no parent snapshot to compare to.)

I’m not sure that would really help since the path structure is different.