Home  >  Article  >  Database  >  How to use xtrabackup to back up mysql database

How to use xtrabackup to back up mysql database

藏色散人
藏色散人forward
2020-01-26 15:49:361765browse

How to use xtrabackup to back up mysql database

Use xtrabackup to back up mysql database

Recommended: "mysql tutorial"

1. Installation

1. Download the binary file directly

wget http://www.percona.com/downloads/XtraBackup/XtraBackup-2.1.9 /binary/Linux/x86_64/percona-xtrabackup-2.1.9-744-Linux-x86_64.tar.gz

Decompress and place it in the corresponding directory

2. Put the file Bin directory to add environment variables, or copy the executable file to the /usr/bin directory, otherwise

sh: xtrabackup_55: command not found

innobackupex: fatal error: no 'mysqld' group in MySQL options

Error

2, basic use

1.Full backup

innobackupex --user=root --password=123456 /mysql_backup

2. Back up the specified database db_c

innobackupex --user=root --password=123456 --include="db_c" /mysql_backup

3. Restore

Because the backup of xtrabackup is a physical backup, copy The corresponding file has been found, so the recovery also involves overwriting the file into the datadir directory of mysql and granting the corresponding permissions.

The above is the detailed content of How to use xtrabackup to back up mysql database. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete