- 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
+ success=false
+ while ! $success; do
+ eject $device
+ echo >&2 "Please insert backup disk: $date"
+ read bogus
+
+ # Mount the media
+ mount -t ext2 $device $mountdir
+ if [ "" != "$(grep -l $date $mountdir/backup-status.txt)" ]; then
+ success=true
+ else
+ echo >&2 "This doesn't seem to be the right disk."
+ fi
+ done
+
+ rsyncopts="-l -p -t -g -o -0 --files-from=- --stats --progress "
+ cat $dbfile | files-from-date.sh | rsync $rsyncopts $1 $2