stas 2002/12/20 18:04:35 Modified: src/docs/1.0/guide snippets.pod Log: a corrected version of the backup script Submitted by: Miroslav Madzarevic, [EMAIL PROTECTED] Reviewed by: stas Revision Changes Path 1.14 +12 -6 modperl-docs/src/docs/1.0/guide/snippets.pod Index: snippets.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/1.0/guide/snippets.pod,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- snippets.pod 20 Dec 2002 06:13:29 -0000 1.13 +++ snippets.pod 21 Dec 2002 02:04:35 -0000 1.14 @@ -1492,22 +1492,28 @@ Here is another version using C<File::Backup>: - #!/usr/bin/perl -w + #!/usr/bin/perl + # written by Miroslav Madzarevic, [EMAIL PROTECTED] use strict; + umask 0177; + use File::Backup qw|backup|; backup( - 'from' => "/home/mire/www", - 'to' => "/opt/backup/box/some_dir", + 'from' => "", + 'to' => "/opt/backup/mysql/backup", 'torootname' => "example_backup_", 'keep' => 4, - 'tar' => "/bin/tar", + 'tar' => "/usr/bin/mysqldump", 'compress' => "/usr/bin/bzip2", - 'tarflags' => "cvf", + 'tarflags' => "example -uroot -proot_pass -a >", 'compressflags' => "", - 'tarsuffix' => '.tar', + 'tarsuffix' => '.sql', ); + + + Now make the script executable and arrange the crontab entry to run the backup script nightly. Note that the disk space used by the
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]