Created
May 5, 2013 09:00
-
-
Save anonymous/5520209 to your computer and use it in GitHub Desktop.
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 | |
LOGG=/home/fille/Loggar/snapshots.txt | |
touch $LOGG | |
exec >> $LOGG 2>&1 | |
DATE=$(date +%Y%m%d) | |
echo "" | |
echo "Written by snapshot.sh" | |
echo "-------------------------" | |
date "+%Y-%m-%d %H:%M" | |
zfs snapshot storage/privat@$DATE | |
if [ $? == 0 ] | |
then | |
echo "Snapshot of privat taken" | |
else | |
echo "SNAPSHOTTING PRIVAT FAILED!" | |
fi | |
zfs snapshot storage/lagret@$DATE | |
if [ $? == 0 ] | |
then | |
echo "Snapshot of lagret taken" | |
else | |
echo "SNAPSHOTTING LAGRET FAILED!" | |
fi | |
zfs snapshot storage/os@$DATE | |
if [ $? == 0 ] | |
then | |
echo "Snapshot of os taken" | |
else | |
echo "SNAPSHOTTING OS FAILED!" | |
fi | |
echo "------------------------" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment