File::Rotate::Backup

File::Rotate::Backup is a Perl module to make backups of multiple directories and rotate them on UNIX.
Download

File::Rotate::Backup Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Don Owens
  • Publisher web site:
  • http://search.cpan.org/~dowens/File-Rotate-Backup-0.13/lib/File/Rotate/Backup.pm

File::Rotate::Backup Tags


File::Rotate::Backup Description

File::Rotate::Backup is a Perl module to make backups of multiple directories and rotate them on UNIX. File::Rotate::Backup is a Perl module to make backups of multiple directories and rotate them on UNIX.SYNOPSIS my $params = { archive_copies => 2, dir_copies => 1, backup_dir => '/backups', file_prefix => 'backup_' secondary_backup_dir => '/backups2', secondary_archive_copies => 2, verbose => 1, use_flock => 1, }; my $backup = File::Rotate::Backup->new($params); $backup->backup(, , ]); $backup->rotate;This module will make backups and rotate them according to your specification. It creates a backup directory based on the file_prefix you specify and the current time. It then copies the directories you specified in the call to new() to that backup directory. Then a tar'd and compressed file is created from that directory. By default, bzip2 is used for compression.This module has only been tested on Linux and Solaris.The only external programs used are tar and a compression program. Copies and deletes are implemented internally.METHODSnew(%params) my $params = { archive_copies => 2, dir_copies => 1, backup_dir => '/backups', file_prefix => 'backup_' secondary_backup_dir => '/backups2', secondary_archive_copies => 2, verbose => 1, use_flock => 1, dir_regex => 'd+-d+-d+_d+_d+_d+', file_regex => 'd+-d+-d+_d+_d+_d+', }; my $backup = File::Rotate::Backup->new($params);Creates a backup object.archive_copiesThe number of old archive files to keep.no_archiveIf set to true, then no compressed archive(s) will be created even if archive_copies is set.dir_copiesThe number of old backup directories to keep.backup_dirWhere backups are placed.file_prefixThe prefix to use for the backup directories and archive files. When the directories and archive files are created, the name for each is created by appending a timestamp to the end of the file prefix you specify.secondary_backup_dirOverflow directory to copy files to before deleting them from the backup directory when rotating.secondary_archive_copiesThe number of archive files to keep in the secondary backup directory.verboseIf set to a true value, status messages will be printed as the files are being processed.use_flockIf set to a true value, an attempt will be made to acquire a write lock on any file to be removed during rotation. If a lock cannot be acquired, the file will not be removed. This is useful for concurrency control, e.g., when your backup script gets run at the same time as another script that is writing the backups to tape.use_rmIf set to a true value, the external program /bin/rm will be used to remove a file in the case where unlink() fails. This may occur on systems where the file being removed is larger than 2GB and such files are not fully supported.dir_regexRegular expression used to search for directories to rotate. The file_prefix is prepended to this to create the final regular expression. This is useful for rotating directories that were not created by this module.file_regexRegular expression used to search for archive files to rotate. The file_prefix is prepended to this to create the final regular expression. This is useful for rotating files that were not created by this module.Requirements:· Perl Requirements: · Perl


File::Rotate::Backup Related Software