-
Hello! I have successfully set up sanoid such that it takes monthly, weekly, daily and hourly snapshots of my server and prunes them to my liking. That was really easy and I'm very thankful for this great tool! Now I want to backup to a remote server, where a history should also be kept (not just the latest state), lets say three months of snapshots. I am not sure what the intended or best way to do this is since (according to my understanding, please correct me if I'm wrong):
Sorry for having such many questions in the same post, but they all have to do with understanding how to best get to my goal of having my backup target keeping a history of all the snapshots it got sent during the last X time. How does one do this the best/correct way? The use for this.... is to protect against unnoticed accidental deletions (the backup-target will keep a longer history than the server, since it has more storage and not all datasets) or in the unlikely case of ransomware/accidental file deletion preceding (and getting synced to the backup target) a catastrophic failure (such as a fire) that destroys the source server file integrity. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Syncoid replicates ALL snapshots (which are newer than the latest common
snapshot) to the target.
All you need to do is run sanoid on the target, using either the hotspare
template (if replicating hourly) or the backup template (if replicating
daily), so that the sanoid instance on the target prunes old snapshots but
does **not** attempt to take new snapshots locally.
|
Beta Was this translation helpful? Give feedback.
After thinking about it a bit more I have concluded that using -I (and pruning with sanoid on target) as @jimsalterjrs said (by not specifying --no-stream) but using
--exclude-snaps=.*(?:frequently|hourly)
sufficiently solves the issue of temporary file inflation and is the best way to get the desired snapshot history on the target.Requires current master, or probably sanoid 2.3+