MySQL LVM Provider Configuration [mysql-lvm]

Creates an LVM snapshot of a running MySQL instance and performs a binary-based backup with minimal locking. MySQL must be running on an LVM volume with reserved space for snapshots. It is highly recommended that this volume be separate from the one storing the resulting backups.

[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.

force-innodb-backup = yes | no (default: no)

Whether to attempt a backup even if the mysql-lvm plugin thinks it cannot obtain a good backup. This can occur when innodb data files are outside of the mysql datadir or exist on entirely separate logical volumes.

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.

archive-method = tar | dir (default: tar)

Create a tar file of the datadir, or just copy it.

[tar]

exclude = pattern[, pattern…]

Patterns to exclude from archive. These should be relative paths and are almost always relative to the mysql data directory. For instance to exclude binary logs in the data directory from the backup you might specify: exclude = ./bin-log.*, mysql.sock

pre-args = <string>

Additional arguments to append to the tar commandline before the backup path is specified. This should be the full string as you might specify on the commandline. Shell globbing is not supported.

For instance you might add the /etc/my.cnf to the tar archive via: pre-args = -C /etc ./my.cnf

post-args = <string>

Additional arguments to append to the tar commandline after the backup path is specified. This should be a string exactly as you might specify on the commandline. Shell globbing is not evaluated.

[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) and default-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.