projects
/
backups
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
fc9ecb5
)
Regular commit
author
Carl Baldwin
<cnb@ball.(none)>
Mon, 24 Oct 2005 19:29:56 +0000
(13:29 -0600)
committer
Carl Baldwin
<cnb@ball.(none)>
Mon, 24 Oct 2005 19:29:56 +0000
(13:29 -0600)
main.cpp
patch
|
blob
|
history
scripts/drive.sh
patch
|
blob
|
history
diff --git
a/main.cpp
b/main.cpp
index b630ec8e78f42649351b3c66f2d3cdaa198c6fb3..b0b6f1194e739ea632e0d273dd7bad63b8b3bcdc 100644
(file)
--- 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;
// 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
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<string>( cout, "" ) );
// 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;
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 09184121bf25dda6889325a661ca3b35b06fe9df..63ac79c5c7c572c2c7ac1d1a134feb8b6338fb44 100755
(executable)
--- 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
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"
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"
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 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