Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glensc/bacula-backup-mysql
MySQL backup hook for Bacula
https://github.com/glensc/bacula-backup-mysql
Last synced: 3 months ago
JSON representation
MySQL backup hook for Bacula
- Host: GitHub
- URL: https://github.com/glensc/bacula-backup-mysql
- Owner: glensc
- Created: 2012-06-13T19:03:05.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-05-30T09:25:41.000Z (over 8 years ago)
- Last Synced: 2024-04-14T07:29:32.854Z (9 months ago)
- Language: Perl
- Size: 32.2 KB
- Stars: 9
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.pod
Awesome Lists containing this project
README
=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 in Bacula.
=head1 CONFIGURATION
Config starts with CclustersE> block, which you can define several
database instances to be backed up.Each C should define connection dsn and databases to be backed up.
To define connection dsn, you can also define common options in
CclientE> section, those options would be shared for each cluster
which has not overriden the specific option.In CclusterE> sections, you should list databases to be
backed up. You can use C options to explicitly list
which databases should be backed up, and C options
to explicitly list those that should not.Additionally C supports table regexp, which is passed
directly to L. This allows you to include or exclude tables from
each database backup.Unless you only specify C options, all databases
which can be seen with a C query are considered for
backup; any C options will reduce this list.Since v0.6 it's possible to do SQL dump backups with L. Use this if you want to backup InnoDB databases.
Option name is C, which takes values C (default) and C.Since v0.7 you can pass arbitary options to C or C
using C or C respectively. Use this to
pass options like C<--old_server>.Ordinarily, using C and C options
in the same C cause the C option to be
unnecessary, as the existence of any C options implicitly
includes all available databases obtained from C.
However, when using a C of C, the
C option can be further configured to specify the
exact tables to be backed up, giving the user far more control over
the process.Dump type C allows you to pass C<--record_log_pos log-pos-table>
option to C. The C table must already exist, see
C for the table schema. Please note that this option is
not safe to use when backing up more than one database, because current
operation backs up each database with separate C call and so the
log pos is saved with each call overwriting the previous.=head1 EXAMPLE CONFIGURATION
# clusters to backup
# there is nothing special about name "mysql", name just picked as convience
cluster mysql
cluster eventum
cluster forums
cluster selected_dbs
# client connection parameters, can be overriden per cluster
user mysql
password secret
# global options, can be overriden per cluster
tmpdir /srv/bacula/tmp
outdir /srv/bacula/mysql
# mysql cluster: backup all but mysql database
socket /var/lib/mysql/mysql.sock
exclude_database mysql
# forums cluster: exclude phorum_forums and phorum_users tables
user mysql
socket /var/lib/mysql/mysql.sock# 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
socket /var/lib/mysql/mysql.sock
exclude_database mysql# can be specific about tables when using mysqlhotcopy:
include_database teensForum5./~(phorum_forums|phorum_users)/
=head1 BUGS
If you find bugs in L,
file the reports into L
or even better, send L with a fix.There are also bugs in L,
see from L
if your version nees patching.In C mode C option is useless if cluster contains
more than one database.=head1 AUTHOR
Copyright (C) 2009-2016, Elan RuusamEe
=head1 SEE ALSO
http://www.bacula.org/,
L=cut