DBA::Backup

DBA::Backup is the core module for managing automated database backups.
Download

DBA::Backup Ranking & Summary

Advertisement

  • Rating:
  • License:
  • APSL
  • Price:
  • FREE
  • Publisher Name:
  • Sean P. Quinlan
  • Publisher web site:
  • http://search.cpan.org/~seanq/

DBA::Backup Tags


DBA::Backup Description

DBA::Backup is the core module for managing automated database backups. DBA::Backup is the core module for managing automated database backups.SYNOPSISNOTICE! This is currently a broken partial port from the origal working MySQL specific module. I hope to have the port finished and a functional version uploaded soon. Email me or the list for more information.The mailing list for the DBA modules is perl-dba@fini.net. See http://lists.fini.net/mailman/listinfo/perl-dba to subscribe. use DBA::Backup; my $dba = new DBA::Backup(%params); die "Can't initiate backups: $dba" unless ref $dba; $dba->run(%conf_overides); $dba->log_messages(); $dba->send_email_notification();new()Create new DBA::Backup object. Use this object to initiate backups.OPTIONS:CONF_FILE: Location of configuration file to use. Default is /etc/dba-backup.yml. Please keep in mind that conf files for any specific servers to be backup will need to be in the same location.LOG_FILE: Location to write process log file.BACKUP: If true will force full database backups.ADD_DATABASES: Specify additional databases to be backed up. ** brokenusage() Prints an usage message for the program on the screen and then exits.run() This is where most of the work in the program is done. It logs some messages to the log file and invokes the subroutines for database backup and log backup and rotation._test_create_dirs Test for the existence and writeability of specified directories. If the directories do not exist, attempt to create them. If unable to create writeable directories, fail with error._rotate_dump_dirs() The dump directories contain output from both the full, weekly mysql dump as well as the incremental binary update logs that follow the dump (possibly multiple binlogs per day). Rotate these directory names to conform to convention: /00/ - most recent dump /01/ - next most recent ... /_NN/ - oldest Where N is - 1 (in the config file). /new/ is a temporary directory created from _backup_databases. This will be renamed 00/, 00/ will be renamed 01/, and so on._tidy_dump_dirs() The dump directories contain output from both the full, weekly mysql dump as well as the incremental binary update logs that follow the dump (possibly multiple binlogs per day). Sometimes a user might delete a directory between backup runs (particularly if it has bad dumps). This function is intended to be run before backups start. It will Attempt to make directory names to conform to convention: /00/ - most recent dump /01/ - next most recent ... /NN/ - oldest If there are missing directories, _tidy_dump_dirs will create a directory to take its place, such that 00/ should always exist and there should be no gaps in the numbering of old directories. In other words, N+1 should be the total number of directories in . If there are no gaps to begin with, _tidy_dump_dirs does not rename anything. This function will also delete any xx directories that exceed the config variable. It will never touch /new/. It will never modify the contents of any of these subdirectories (unless its deleting the whole subdir). It will create and /00/ if they do not exist.send_email_notification() Sends the data from the 00 run of the program which gets stored in the log file by email. The exact behaviour for this subroutine is controlled by the varibles in section in the config fileRequirements:· Perl· Mail::Sendmail # if you want email reports· YAML· Sys::Hostname· File::Copy· File::Path Requirements: · Perl · Mail::Sendmail # if you want email reports · YAML · Sys::Hostname · File::Copy · File::Path


DBA::Backup Related Software