New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support pruning LXD snapshots #733
Comments
Some of my notes on using LXD with ZFS: Configure lxd's zfs.clone_copy option Before we start creating containers, each of which will be given its own ZFS dataset within the pool, we should configure how LXD handles the creation of new containers. Setting
Disabling this option uses a little more disk space for each new container but makes more sense if you are making use of per container ZFS snapshots via LXD and to improve ease of data recovery. Creating ZFS snapshots with LXD LXD supports creating ZFS snapshots of instances. You need to configure the LXD snapshots.schedule, snapshots.expiry and the snapshots.pattern options. For Hermes, we want to create a snapshot twice a day and retain 6 months of snapshots:
If you don't configure snapshots.pattern, LXD defaults to naming the snapshots @snapshot-snap0, without the time and date.
Note that by default, LXD won't let you restore a ZFS snapshot of a container other than the very latest snapshot unless volume.zfs.remove_snapshots is enabled:
|
|
I'm using syncoid to backup some some ZFS based containers from my LXD server onto another remote pool and I'd like to be able to use sanoid to prune the old snapshots but it doesn't look like sanoid can prune datasets whose snapshots weren't created by itself currently.
LXD doesn't timestamp the names of its snapshots by default but its easy enough to make it do that as documented at the bottom of the Instances page by configuring
snapshots.pattern
and thats the format of snapshots I'd like to be able to prune with sanoid.The text was updated successfully, but these errors were encountered: