Last active
December 16, 2019 08:20
-
-
Save jcwilk/3d440f763762bccff16bd76a6b746bc2 to your computer and use it in GitHub Desktop.
Bash shortcuts for making working with zfs in ubuntu easier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jsnap(){ | |
ssdate=`date +%F_%T` | |
sudo zfs snapshot rpool/USERDATA/user_rzvwjy@"${ssdate}" | |
echo "Saved user data at ${ssdate}" | |
} | |
alias jsnapls="zfs list -t snapshot" | |
function jsnaprm(){ | |
sudo zfs destroy $1 | |
echo "destroyed snapshot $1" | |
} | |
function jsnapload(){ | |
sudo zfs rollback $1 | |
echo "rolled back to $1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment