Skip to content

Instantly share code, notes, and snippets.

@indication
Created September 28, 2012 18:47
Show Gist options
  • Save indication/3801494 to your computer and use it in GitHub Desktop.
Save indication/3801494 to your computer and use it in GitHub Desktop.
Supports shadow copy on zfs on linux
MOUNTPOINT=`sudo zfs get -o value mountpoint storage/share | tail -1`
SNAPPOINT=.zfs/snapshot/0weeks_later
SNAPDATE=`sudo zfs get -o value creation storage/share@0weeks_later | tail -1`
DEFAULT_TZ=`date +%Z`
CALCGMT=`date -d "$SNAPDATE $DEFAULT_TZ" -u "+%Y.%m.%d-%H.%M.%S"`
NAMEDATE=@GMT+$CALCGMT
echo $SNAPDATE
echo $NAMEDATE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment