From cb9371796a05c3ab8e74310e78a8d75e980a7b19 Mon Sep 17 00:00:00 2001 From: Carl Baldwin Date: Mon, 24 Oct 2005 13:30:21 -0600 Subject: [PATCH] Added restore script --- scripts/restore-script.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 scripts/restore-script.sh 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 -- 2.34.1