Need some tips on how to prune sanoid snaps on source AND syncoid copied snaps on target #887
Replies: 2 comments 3 replies
-
my current syncoid parameters woudl then copy all deleted snaps again.
That's not how replication works. Replication only adds snapshots to the
*top* of the tree, not to the base.
Say you've got snapshots 0-8 on the source, which your replicate to the
target. Now, you delete snapshots 0-7 on the target, and take a new
snapshot 9 on the source.
After you next replicate to the target, the target will have snapshots 8
and 9. It will not have 0-7, because replication can't go backwards--if you
*wanted* to restore the missing snapshots 0-7, the only way to do it would
be to destroy the entire backup and begin again with a full replication.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ovizii
-
You can keep a second configuration file for your external, and run sanoid
manually with the -c argument (IIRC; this is not a feature I personally
use) to point to that configuration. Something along the lines of:
sanoid -c /etc/sanoid/external.conf
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm sorry, but I am not sure I managed to adequately describe my question. Let me try and explain:
Say I have been running sanoid for a long time and have it configured as desired. It keeps a certain amount of hourly, daily, monthly and yearly snaps on the internal drives.
I am now trying to figure out, how to do a periodic / manual run of syncoid to sync certain datasets to an external hard drive.
I have managed this so far but I now realize that my external backup target is now a 1:1 copy of the source. This is not what I need. I would guesstimate that I would be pretty happy having 3 latest monthly snaps on my external backup target. (Open for other suggestions)
I am now wondering how one best does this. I don't think running sanoid with autoprune to clean up the backup target makes sense as my current syncoid parameters woudl then copy all deleted snaps again.
Currently this is my syncoid command:
syncoid --source-bwlimit=90M --recursive --sendoption=w source/dataset target/dataset
Beta Was this translation helpful? Give feedback.
All reactions