Answer the question
In order to leave comments, you need to log in
Database backup with Percona xtrabackup
Hey! I have been struggling with the task for quite some time, it seems that it is time to ask for advice.
There is mysql innodb with percona, Server version: 5.5.28-29.2-log Percona Server (GPL), Release 29.2. There is a desire to take a backup from one database on this server, and upload it to the same server, but to another database. The dumps are quite large (currently 45Gb, but maybe 200), so mysqldump is not suitable.
In the muscle, innodb_import_table_from_xtrabackup and innodb_file_per_table are set.
Removing a backup
cd /path/to/backup/ && sudo rm -r * && sudo xtrabackup --backup --datadir=/SSD/mysql --target-dir= /path/to/backup/ --tables="^source_db[.].*"
xtrabackup --prepare --export --target-dir=/path/to/backup/
mysql -'user' -p'pass' -e 'CREATE DATABASE IF NOT EXISTS destination_db DEFAULT CHARSET utf8;'
mysql -'user' -p'pass' destination_db < database_schema.sql
mysql -u'user -p'pass' -Nse 'show tables' destination_db | while read table; do mysql -u'user' -p'pass' -e "ALTER TABLE $table DISCARD TABLESPACE" destination_db; done
find /path/to/backup/source_db -name '*.ibd' -exec sudo cp {} /SSD/mysql/destination_db \;
chown -R mysql:mysql /SSD/mysql/destination_db/
sudo chmod -R 660 /SSD/mysql/destination_db/
mysql -u'user' -p'pass' -Nse 'show tables' destination_db | while read table; do mysql -u'user' -p'apass' -e "ALTER TABLE $table IMPORT TABLESPACE" destination_db; done
Answer the question
In order to leave comments, you need to log in
Here's a guy with a similar problem. I see you have the same thing
unixway.info/mysql/innodb-the-error-means-mysqld-does-not-have-the-access-rights-to-the-directory/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question