mylvmbackup is a tool for quickly creating full physical backups of a MySQL server's data files. To perform a backup, mylvmbackup obtains a read lock on all tables and flushes all server caches to disk, makes an LVM snapshot of the volume containing the MySQL data directory, and unlocks the tables again. The snapshot process takes only a small amount of time. When it is done, the server can continue normal operations, while the actual file backup proceeds.
The LVM snapshot is mounted to a temporary directory and all data is backed up using the tar program by default. The archive files are created using names in the form of backup-
Alternatively, instead of tar, you can use rsync, rsnap or zbackup to perform the archiving.
The rsync backup can perform both local backups as well as backing up to a remote server using rsyncd or rsync via SSH.
rsnap is a wrapper around rsync to automatically maintain and rotate a given number of last backups (7 by default). It utilizes hard links to link to unchanged files for saving disk space.
zbackup is a globally-
Moreover, a backup type none is provided for cases where the user wants to use mylvmbackup only for creating the snapshots and intends to perform the actual backup by using the appropriate hooks. (Or for cases where the snapshot itself is considered to be the backup).
mylvmbackup also provides several methods for logging and reporting the progress and success of a backup run. The log messages can either be printed to the console (STDOUT) or logged via syslog.
Additionally, a report can be sent to you via email, and you can receive notifications about failures or successes via SNMP.
It is required to run mylvmbackup on the same host where the MySQL server runs. If your MySQL daemon is not listening on localhost or using the default socket location, you must specify --host or --socket. Even though mylvmbackup communicates with the server through a normal client connection to obtain the read lock and flush data, it performs the actual backup by accessing the file system directly. It is also a requirement that the MySQL server's data directory resides on an LVM volume. (It is, however, a good idea to do the LVM backup to a different partition than the one where the data directory resides. Otherwise, there is a good chance that LVM will run out of undo space for LVM snapshot maintenance and the backup will fail.)
Project information
- Licence:
- GNU GPL v2
View full history Series and milestones
trunk series is the current focus of development.
All code Code
- Version control system:
- Bazaar
- Programming languages:
- Perl
All packages Packages in Distributions
-
mylvmbackup source package in Xenial
Version 0.15-1 uploaded -
mylvmbackup source package in Trusty
Version 0.13-2 uploaded -
mylvmbackup source package in Precise
Version 0.13-2 uploaded -
mylvmbackup source package in Mantic
Version 0.15-1.3 uploaded -
mylvmbackup source package in Lunar
Version 0.15-1.3 uploaded
All bugs Latest bugs reported
-
Bug #1714045: fails to copy my.cnf if it is a symlink
Reported -
Bug #1689762: mylvmbackup does not work with password encrypted using sha256_password mysql plugin
Reported -
Bug #1618169: mylvmbackup and mysqld_multi
Reported -
Bug #1514927: Flush logs and lock tables order
Reported -
Bug #1507072: CentOS 7 LVM snapshot mount issue
Reported
All blueprints Latest blueprints
-
Possibility to skip cleanup or make a copy of posmountdir and cnfdir
Registered -
Replace the static mountdir name with a random one
Registered -
Support Btrfs snapshots
Registered -
Support logging events to a remote MySQL database
Registered -
Add support for direct to remote data directory for test and new slave systems
Registered