Created
May 5, 2013 09:00
Revisions
-
There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ #!/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 "------------------------"