2 # Utility script to test restoring a previous snapshot. This will destroy
3 # the "current" snapshot and restore the old one in its place.
4 OBDDIR="`dirname $0`/.."
5 [ "$OBDDIR" = "" ] && OBDDIR=".."
6 . $OBDDIR/demos/config.sh
8 [ ! -d $MNTSNAP/lost+found ] && echo "need to run snapsetup.sh first" && exit 1
16 plog log "STARTING snaprestore"
17 $OBDDIR/class/obdcontrol -f << EOF
34 plog log "COMPLETE snaprestore"
36 plog mount -t obdfs -odevice=/dev/obd1 /dev/obd1 $MNTOBD