mysqldump LVM Provider Configuration [mysqldump-lvm]¶
Backs up one or more MySQL databases by creating an LVM snapshot and then starting a instance of MySQL on top of it to then perform a mysqldump. This effectively produces a non-blocking logical backup.
[mysql-lvm]¶
snapshot-size = <size-in-MB>
The size of the snapshot itself. By default it is 20% of the size of the MySQL LVM mount or the remaining free-space in the Volume Group (if there is less than 20% available) up to 15GB. If snapshot-size is defined, the number represents the size of the snapshot in megabytes.
snapshot-name = <name>
The name of the snapshot, the default being the name of the MySQL LVM volume + “_snapshot” (ie Storage-MySQL_snapshot)
snapshot-mountpoint = <path>
Where to mount the snapshot. By default a randomly generated directory under /tmp is used.
innodb-recovery = yes | no (default: no)
Whether or not to run an InnoDB recovery operation. This avoids needing to do so during a restore, though will make the backup process itself take longer.
lock-tables = yes | no (default: yes)
Whether or not to run a FLUSH TABLES WITH READ LOCK to grab various bits of information (such as the binary log name and position). Disabling this requires that binary logging is disabled and InnoDB is being used exclusively. Otherwise, it is possible that the backup could contain crashed tables.
extra-flush-tables = yes | no (default: yes)
Whether or not to run a FLUSH TABLES before running the full FLUSH TABLES WITH READ LOCK. Should make the FLUSH TABLES WITH READ LOCK operation a bit faster.
[mysqld]¶
mysqld-exe = <path>[, <path>…] (default: mysqld in PATH, /usr/libexec/mysqld)
This provides a list of locations where the mysqld process to use might be found. This is searched in order of entries in this list.
user = <name>
The –user parameter to use with mysqld.
innodb-buffer-pool-size = <size> (default: 128M)
How large to size the innodb-buffer-pool-size.
tmpdir = <path> (default: system tempdir)
Path to the –tmpdir that mysqld should use.
log-error = <path> (default: tempdir/holland_lvm.log)
Define path for mysqld’s error log. The default location get cleaned up by Holland after the backup is complete. This settings allows the user to define the log file in another location and can be useful for debugging issue with the MySQL instance running on the snapshot.
New in version 1.0.9.
[mysqldump]¶
mysqldump-lvm supports almost all of the options from the mysqldump plugin. –master-data is not supported, as the mysqld process will not read binary logs, so this plugin will automatically disable bin-log-position, if set.
Binary log information from SOHW MASTER STATUS and SHOW SLAVE STATUS is recorded in the ${backup_directory}/backup.conf file under the [mysql:replication] section.
[compression]¶
Specify various compression settings, such as compression utility, compression level, etc.
method = gzip| gzip-rsyncable | pigz | bzip2 | pbzip2 | lzop | lzma | gpg | zstd
Define which compression method to use. Note that some methods may not be available by default on every system and may need to be compiled or installed.
For gpg compression, a key should already exist(
gpg --gen-key
) anddefault-recipient
must be configured in~/.gnupg/gpg.conf
.
inline = yes | no
Whether or not to pipe the output of the backup command into the compression utility. Enabling this is recommended since it usually only marginally impacts performance, particularly when using a lower compression level.
level = 0-9
Specify the compression ratio. The lower the number, the lower the compression ratio, but the faster the backup will take. Generally, setting the lever to 1 or 2 results in favorable compression of textual data and is noticeably faster than the higher levels. Setting the level to 0 effectively disables compression.
bin-path = <full path to utility>
This only needs to be defined if the compression utility is not in the usual places or not in the system path.
options = <string>
Add commandline options to the configuration compression command.
options = “-Q4”
split = yes | no
Defautls to no. If set the backup will be piped through the split command. This may be useful for user’s with large databases, as some backup systems perform better with many smaller files instead of 1 large one. This defaults to 1GB file size, so this option isn’t helpful if your dumps are smaller than that.
For python2.6, this option will be disabled if the subprocess32 module isn’t avaiable.
New in version 1.1.13.
MySQL connection info [mysql:client]¶
These are optional and, if left undefined, Holland will try to login using the standard .my.cnf conventions.
user = <user>
The user to connect to MySQL as.
password = <password>
The password for the MySQL user
socket = <socket>
The socket file to connect to MySQL with.
host = <host>
This would be used for connecting to MySQL remotely.
port = <port>
Used if MySQL is running on a port other than 3306.