From: Carl Baldwin Date: Mon, 24 Oct 2005 19:30:21 +0000 (-0600) Subject: Added restore script X-Git-Tag: release-0.4~73 X-Git-Url: http://git.pippins.net/embedvideo/.git/%7Bnolink%7D?a=commitdiff_plain;h=cb9371796a05c3ab8e74310e78a8d75e980a7b19;p=backups%2F.git Added restore script --- diff --git a/scripts/restore-script.sh b/scripts/restore-script.sh new file mode 100644 index 0000000..402bb84 --- /dev/null +++ b/scripts/restore-script.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +if [ $# != 1 ]; then + echo >&2 "Usage: $0 " + echo >&2 "Example: $0 /" + exit 1 +fi + +tmpdir=/tmp/restore-$(date +%Y%m%d%H%M%S) + +export PATH=$tmpdir:/bin:/usr/bin + +# Get the device with the CD in it here +device=/dev/hdc + +for date in $(cat $dbfile | list-dates.sh); do + eject $device + echo >&2 "Please insert backup disk: $date" + echo >&2 "Then press any key" + read bogus + # Mount the media + # rsync-cmd.sh won't work here in its current encarnation + cat $dbfile | files-from-date.sh | rsync-cmd.sh $1 +done