From: Carl Baldwin Date: Mon, 24 Oct 2005 19:29:56 +0000 (-0600) Subject: Regular commit X-Git-Tag: release-0.4~74 X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/images/static/gitweb.js?a=commitdiff_plain;h=57c4edfa25af631f98166dde7ff1ae9c645ca962;p=backups%2F.git Regular commit --- diff --git a/main.cpp b/main.cpp index b630ec8..b0b6f11 100644 --- a/main.cpp +++ b/main.cpp @@ -144,7 +144,7 @@ int main() { // 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 @@ -214,6 +214,8 @@ int main() { // Write the 'final' list to stdout copy_filenames( final.begin(), final.end(), ostream_iterator( cout, "" ) ); + cerr << now << endl << endl; + cerr << "Need backing up..." << endl; cerr << " Added Bytes: " << added_bytes << endl; cerr << " Added Blocks: " << added_blocks << endl; diff --git a/scripts/drive.sh b/scripts/drive.sh index 0918412..63ac79c 100755 --- a/scripts/drive.sh +++ b/scripts/drive.sh @@ -14,22 +14,39 @@ export PATH=$scriptsdir:$bindir:$PATH 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