Skip to content

Instantly share code, notes, and snippets.

View tristanseifert's full-sized avatar
🏳️‍🌈

Tristan Seifert tristanseifert

🏳️‍🌈
View GitHub Profile
@tristanseifert
tristanseifert / backup.sh
Last active April 6, 2018 00:59
backup script
#!/bin/sh
# create snapshot
zfSnap -d -s -S -a 2m tank/data
# determine latest snapshot
BACKUPDIR=$(ls -td /mnt/tank/data/.zfs/snapshot/*/ | sort -r | head -1)
echo "Selected $BACKUPDIR for rsync backup..."