bacula-backup-mysql
bacula-backup-mysql copied to clipboard
MySQL backup hook for Bacula
=head1 NAME
bacula-backup-mysql - A hook for Bacula to backup mysql databases using mysqlhotcopy or mysqldump.
=head1 SYNOPSIS
Job { Name = "example.org-mysql" ... # This prepares the backup Client Run Before Job = "/usr/sbin/bacula-backup-mysql" # This deletes the copy of the catalog Client Run After Job = "/usr/sbin/bacula-backup-mysql -cleanup" }
=head1 DESCRIPTION
This is a script to be setup as C<Client Run Before Job> in Bacula.
=head1 CONFIGURATION
Config starts with C<E
Each C
To define connection dsn, you can also define common options in
C<E
In C<E
Additionally C<include_database> supports table regexp, which is passed directly to L<mysqlhotcopy(1)>. This allows you to include or exclude tables from each database backup.
Unless you only specify C<include_database> options, all databases
which can be seen with a C
Since v0.6 it's possible to do SQL dump backups with L<mysqldump(1)>. Use this if you want to backup InnoDB databases.
Option name is C<dump_type>, which takes values C
Since v0.7 you can pass arbitary options to C
Ordinarily, using C<include_database> and C
Dump type C
=head1 EXAMPLE CONFIGURATION
clusters to backup
there is nothing special about name "mysql", name just picked as convience
client connection parameters, can be overriden per cluster
global options, can be overriden per cluster
mysql cluster: backup all but mysql database
forums cluster: exclude phorum_forums and phorum_users tables
# include_database can also support table regexp for mysqlhotcopy:
include_database teensForum5./~(phorum_forums|phorum_users)/
selected_dbs cluster: backup all except mysql, and be specific about tables
in the teensForum5 database
# can be specific about tables when using mysqlhotcopy:
include_database teensForum5./~(phorum_forums|phorum_users)/
=head1 BUGS
If you find bugs in L<bacula-backup-mysql(1)>, file the reports into L<Bugtracker|https://github.com/glensc/bacula-backup-mysql/issues> or even better, send L<Pull Request|https://github.com/glensc/bacula-backup-mysql/pulls> with a fix.
There are also bugs in L<mysqlhotcopy(1)>, see from L<Wiki|https://github.com/glensc/bacula-backup-mysql/wiki> if your version nees patching.
In C
=head1 AUTHOR
Copyright (C) 2009-2016, Elan RuusamE
=head1 SEE ALSO
http://www.bacula.org/, L<Bacula wiki: Application specific backups: mysql|http://wiki.bacula.org/doku.php?id=application_specific_backups:mysql>
=cut