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
You're going to need to snap your root according to zsys convention (just using a date won't work), like this: | |
#!/bin/bash | |
DATE_HASH="$( date | cksum | cut -f1 -d' ' | tr -d '\n' | xargs -0 printf '%x\n' )" | |
zfs snapshot -r bpool@snap_"$DATE_HASH"_prepApt | |
zfs snapshot rpool@snap_"$DATE_HASH"_prepApt | |
zfs snapshot -r rpool/ROOT@snap_"$DATE_HASH"_prepApt | |
zfs snapshot -r rpool/USERDATA@snap_"$DATE_HASH"_prepApt |
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
#!/bin/bash | |
usage() { echo "Usage: $0 -p <POOL> (-s|-l)" 1>&2; exit 1; } | |
while getopts ":p:sl" o; do | |
case "${o}" in | |
p) | |
p=${OPTARG} | |
;; | |
s) |