Home > Database > Mysql Tutorial > body text

How to use xtrabackup to back up mysql database

藏色散人
Release: 2020-01-26 15:49:36
forward
1915 people have browsed it

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
Copy after login

2. Back up the specified database db_c

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

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!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template