backups: Further enhancements to the script.
This commit is contained in:
parent
f202f3fc02
commit
383bc0f6bd
|
@ -21,14 +21,14 @@ my $db_backup = "db.backup.bz2"; # Lives in PO repo
|
|||
my $db_dsn = "dbname=photo"; # db dsn
|
||||
my $db_pass = "apache"; # db pass
|
||||
my $db_user = "apache"; # db user
|
||||
my $dest_dir = "/tmp"; # where we shove the ISO
|
||||
my $dest_dir = "/home/pizza"; # where we shove the ISO
|
||||
|
||||
$block = 2048; # CD/DVD uses 2K blocks
|
||||
$block = 2048; # CD/DVD/BD uses 2K blocks
|
||||
#$max = 700*1024*1024; # 700 MiB, (CD)
|
||||
#$max = 4700*1000*1000; # 4700 MB, (DVD)
|
||||
$max = 8500*1000*1000; # 8500 MB, (DVD-DL)
|
||||
#$max = 25000*1000*1000; # 25GB, (Blu-Ray)
|
||||
#$max = 50000*1000*1000; # 50GB, (Blu-Ray DL)
|
||||
#$max = 8500*1000*1000; # 8500 MB, (DVD-DL)
|
||||
$max = 25000*1000*1000 - 256*1024*1024; # 25GB, (Blu-Ray)
|
||||
#$max = 50000*1000*1000 - 256*1024*1024; # 50GB, (Blu-Ray DL)
|
||||
|
||||
$max -= 10*1024*1024; # Leave 10MiB free to account for block slop.
|
||||
|
||||
|
@ -106,5 +106,7 @@ print FLIST_FILE "/=$root/$db_backup\n";
|
|||
print FLIST_FILE "$indexfile\n";
|
||||
close (FLIST_FILE);
|
||||
|
||||
system("mkisofs -r -v -J -V $volume -graft-points -o $dest_dir/$indexfile.iso -path-list $flistfile");
|
||||
print "now run: sudo cdrecord dev=/dev/sdc -dao -eject -v $dest_dir/$indexfile.iso\n";
|
||||
my $cmd = "growisofs -dvd-compat -Z /dev/sr0 -r -v -J -V $volume -graft-points -path-list $flistfile";
|
||||
print "==> $cmd <==\n";
|
||||
|
||||
system($cmd);
|
||||
|
|
Loading…
Reference in New Issue