3 export PATH=$rundir:/bin:/usr/bin
6 echo >&2 "Usage: $0 <source-directory> <target-directory>"
7 echo >&2 "Example: $0 / /"
11 device=$(mount | grep "on $mountdir " | awk '{print$1}')
13 cp $mountdir/backups.db $mountdir/backup-status.txt $rundir
14 dbfile=$rundir/backups.db
16 for date in $(cat $dbfile | list-dates.sh); do
20 echo >&2 "Please insert backup disk: $date"
24 mount -t ext2 $device $mountdir
25 if [ "" != "$(grep -l $date $mountdir/backup-status.txt)" ]; then
28 echo >&2 "This doesn't seem to be the right disk."
32 rsyncopts="-l -p -t -g -o -0 --files-from=- --stats --progress "
33 cat $dbfile | files-from-date.sh | rsync $rsyncopts $1 $2