xtrabackup

command
v8.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

The `xtrabackup` plugin for SHIELD implements backup + restore functionality for the cf-mysql-release.

PLUGIN FEATURES

This plugin implements functionality suitable for use with the following SHIELD Job components:

Target: yes
Store:  no

PLUGIN CONFIGURATION

The endpoint configuration passed to this plugin is used to identify how to to connect to a MySQL instance co-located on the same machine.

Your endpoint JSON should look something like this:

{
    "mysql_user":           "username-for-mysql",
    "mysql_password":       "password-for-above-user",
    "mysql_databases":      <list_of_databases>,       # OPTIONAL
    "mysql_datadir":        "/var/lib/mysql",          # OPTIONAL
    "mysql_xtrabackup":     "/path/to/xtrabackup",     # OPTIONAL
    "mysql_temp_targetdir": "/tmp/backups"             # OPTIONAL
    "mysql_tar":            "tar"                      # OPTIONAL
}

Default Configuration

{
    "mysql_tar"           : "tar",
    "mysql_datadir"       : "/var/lib/mysql",
    "mysql_xtrabackup"    : "/var/vcap/packages/shield-mysql/bin/xtrabackup",
    "mysql_temp_targetdir": "/tmp/backups"
}

mysql_databases: This option specifies the list of databases to back up. It accepts a string argument or path to a file that contains the list of databases to back up. The list is of the form "databasename1[.table_name1] databasename2[.table_name2]". If this option is not specified, all databases containing MyISAM and InnoDB tables will be backed up.

mysql_datadir: This option specifies MySQL's datadir.

mysql_xtrabackup: This option specifies the absolute path to the `xtrabackup` tool.

mysql_temp_targetdir: This option specifies the absolute path to a temporary directory used by the `xtrabackup` tool to backup the MySQL databases. It must be empty after each run of the plugin.

mysql_tar: This option specifies the absolute path to the `tar` tool.

BACKUP DETAILS

The `xtrabackup` plugin backs up all data in the data directory. If the `databases` option is specified the plugin will only back up these databases.

RESTORE DETAILS

To restore, the `xtrabackup` plugin moves back the backed up data files to the MySQL data directory. The MySQL data directory needs to be empty before the restore operation.

DEPENDENCIES

This plugin relies on the `xtrabackup` and `tar` utilities. Please ensure that they are present on the system that will be running the backups + restores for MySQL.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL