// Track the total size of added files
unsigned long long added_blocks, added_bytes;
- sizes( backups.begin(), backups.end(), added_blocks, added_bytes );
+ sizes( added.begin(), added.end(), added_blocks, added_bytes );
file_vector modified_files;
// Backup files that have been modified
// Write the 'final' list to stdout
copy_filenames( final.begin(), final.end(), ostream_iterator<string>( cout, "" ) );
+ cerr << now << endl << endl;
+
cerr << "Need backing up..." << endl;
cerr << " Added Bytes: " << added_bytes << endl;
cerr << " Added Blocks: " << added_blocks << endl;
files="$tmpdir/files.db"
touch $files
chmod 600 $files
+echo "Running find to get the status of files"
find-cmd.sh /home > $files
db="$datadir/backups.db"
backups="$tmpdir/backup-list.db"
statusfile="$tmpdir/backup-status.txt"
+echo "Determining list of files to backup with lsbackups"
cat $files | lsbackups > $backups 2>$statusfile
isomountdir="/backup/iso-mount"
+isoimage="/backup/iso-mount.iso"
-# Create filesystem on iso image here
+echo "Creating the iso image in $isoimage"
+touch $isoimage
+# chmod 600 $isoimage
-# chmod 600 iso-image
+# Create filesystem on iso image here
+dd if=/dev/zero of=$isoimage bs=2048k count=2220
+mke2fs -b 2048 -F $isoimage
+echo "Mounting the iso image"
# Mount iso image here
+mount -t ext2 -o loop $isoimage $isomountdir
+
+echo "Running rsync to pack the image"
+cat $backups | rsync-cmd.sh $isomountdir
+
+echo "Copying over database and status file"
+cp $statusfile $db $isomountdir
-# cat $backups | rsync-cmd.sh $isomountdir
-# cp $statusfile $db $isomountdir
+# umount $isomountdir
+# Burn the iso image
+# dvdrecord [-dummy] [-overburn] -dao speed=8 dev=[ATAPI:]?,?,? iso-image.iso
+cat $statusfile | mailx -s "DVD Image available on ball, burn it!" carl@ecbaldwin.net