bin_SCRIPTS = \
        drive.sh \
        files-from-date.sh \
-       find-cmd.sh \
        list-dates.sh \
        restore-script.sh \
-       rsync-cmd.sh \
        restore.sh
 
-EXTRA_DIST = $(bin_SCRIPTS)
+EXTRA_DIST = $(bin_SCRIPTS) restore-header.sh
 
 restore_scripts = \
        files-from-date.sh \
 
 statusfile="$tmpdir/backup-status.txt"
 isomountdir="/backup/iso-mount"
 isoimage="/backup/iso-mount.iso"
+restorescript="$scriptsdir/restore.sh"
 
 echo "Creating the iso image in $isoimage"
 touch $isoimage
 touch $currentfiles
 chmod 600 $currentfiles
 echo "Running find to get the status of files"
-find-cmd.sh /home > $currentfiles
+{
+  for type in d f l; do
+    findformat="$type %#m %u %g %s %CY%Cm%Cd%CH%CM%CS 0 %p\0"
+    find /home -type $type -printf "$findformat"
+  done
+} > $currentfiles
 
 echo "Determining list of files to backup with lsbackups"
 {
 } | lsbackups > $backups 2>$statusfile
 
 echo "Running rsync to pack the image"
-cat $backups | rsync-cmd.sh $isomountdir
+rsyncopts="-l -p -t -g -o -0 --files-from=- --stats --progress"
+cat $backups | rsync $rsyncopts / $isomountdir
 
 echo "Copying over database and status file"
-cp $statusfile $backupdb $isomountdir
+cp $statusfile $backupdb $restorescript $isomountdir
 
 # umount $isomountdir
 
 
+++ /dev/null
-#!/bin/sh
-
-[ $# == 1 ] || exit 1
-
-{
-  for type in d f l; do
-    find $1 -type $type -printf "$type %#m %u %g %s %CY%Cm%Cd%CH%CM%CS 0 %p\0"
-  done
-}
 
 #!/bin/sh
 export rundir=/tmp/restore-$(date +%Y%m%d%H%M%S)
 if ! mkdir $rundir; then
-  echo 2> "Cannot create temp dir"
+  echo >&2 "Cannot create temp dir"
   exit 1
 fi
-echo $rundir
 
 unset CDPATH
 export mountdir=$(cd $(dirname $0) && pwd)
-echo $mountdir
 
 SKIP=`awk '/^__ARCHIVE_FOLLOWS__/ { print NR + 1; exit 0; }' $0`
 
 
 #!/bin/sh
 
-echo "Ran restore script with $@"
-
-exit 0
-
 export PATH=$rundir:/bin:/usr/bin
 
 if [ $# != 1 ]; then
   exit 1
 fi
 
-# Get the device with the CD in it here
 device=$(mount | grep "on $mountdir " | awk '{print$1}')
 
-cp $mountdir/backups.db $mountdir
+cp $mountdir/backups.db $mountdir/backup-status.txt $rundir
+dbfile=$rundir/backups.db
 
 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
+  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
 done
 
+++ /dev/null
-#!/bin/sh
-
-# This file just has some ideas about how to do the rsync command with the list
-# of file produced by lsbackups
-
-[ $# == 1 ] || exit 1
-[ -d $1   ] || exit 1
-
-# -H ? -W ?
-rsync_opts='-l -p -t -g -o -0 --files-from=-'
-
-other_opts='--stats --progress'
-
-# Should also include directories in there
-rsync $rsync_opts $other_opts / $1