Skip to content
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

nixus.zfs-snap: ZFS snapshots before switching configuration (+cleanup) #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eyJhb
Copy link
Collaborator

@eyJhb eyJhb commented Jan 14, 2022

This module adds support for making a ZFS snapshot on the node that is to be deployed to, before the configuration is switched.
This is nice in cases such as Nexcloud, which will run a migration when switching and if it fails you can no longer switch back to the previous version.

There is also the option of doing cleanup of the previous snapshots, which will by default keep the last 30 snapshots.
If this is set to 0, it will delete the snapshots right after a successful switch.
If set to a negative number ie. -1, it will keep them forever, and an external tool might be run to delete them on a interval.

To allow non-root users to create snapshots zfs allow nix-deployer snapshot rpool/safe/persistent should be used.
I do not like allowing the same user to delete snapshots, as it includes snapshots not made by nixus as well, and would rather use an external program to handle this for me.

@infinisil infinisil force-pushed the master branch 2 times, most recently from 71ac68e to 0104013 Compare May 26, 2023 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant