Backup one database with xtrabackup

Hello ;

On my cluster PXC, I have several databases. I want to backup only one of them. But the instruction I find out in the manual don’t show how to do it .

I juste find how to backup all the databases, or how to do an incremental backup. Does someone know some particular command?

Thanks in advance.

Percona Xtrabackup do supports Partial Backups. i.e. backup particular database/tables.
You need to use --include, --tables-file or --databases option to backup selected database/tables.


$ mysql --skip-column-names -e “SELECT CONCAT(table_schema,’.’,table_name) FROM information_schema.tables WHERE table_schema = ‘mydb’;” > tables.txt
$ innobackupex --tables-file=tables.txt /path/to/backupdir/

You can also use mysqldump command as like below mentioned for taken a single mysql database backup.

mysqldump -uabc -pabc dbname > dbname.sql

if you need single table then

mysqldump -uabc -pabc dbname tablenae > table.sql