X-Git-Url: http://git.pippins.net/embedvideo/.git/static/gitweb.js?a=blobdiff_plain;ds=sidebyside;f=scripts%2Frestore-script.sh;fp=scripts%2Frestore-script.sh;h=402bb840cb7084966f1ad7522420d5d2d3547e7e;hb=cb9371796a05c3ab8e74310e78a8d75e980a7b19;hp=0000000000000000000000000000000000000000;hpb=57c4edfa25af631f98166dde7ff1ae9c645ca962;p=backups%2F.git 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