PerconaDB

Iš Žinynas.
Peršokti į: navigacija, paiešką

Backup[keisti]

xtrabackup --backup --target-dir=backup_dir/

Restore[keisti]

xtrabackup --prepare --target-dir=backup_dir/
rsync -avrP backup_dir/ /var/lib/mysql/
chown -R mysql:mysql /var/lib/mysql

Klaidų sprendimas[keisti]

Vienos DB backup/restore[keisti]

backup[keisti]

innobackupex --databases="duombaze" backupas/
innobackupex --apply-log --export backupas/2017-04-05_16-53-54/
tar cfpz backupas.tar.gz backupas/
scp -r backupas.tar.gz root@remote:

restore[keisti]

systemctl stop mysql
tar xzf backupas.tar.gz
rsync -avrP backupas/2017-04-05_17-07-09/duombaze /var/lib/mysql/
chown -R mysql:mysql /var/lib/mysql
systemctl start mysql

MySQL Dump[keisti]

mysqldump --single-transaction duombaze > duombaze.sql

Sudėjimas (serveryje įjungiame permissive režimą)

mysql > select @@pxc_strict_mode;  
mysql > SET pxc_strict_mode=PERMISSIVE;

Suimportavus atstatome:

mysql > SET GLOBAL pxc_strict_mode=ENFORCING; 

InnoDB: Cannot calculate statistics for table `clients`.`blah` because the .ibd file is missing.[keisti]

ALTER TABLE clients IMPORT TABLESPACE; show warnings;

Crash recovery[keisti]

https://www.percona.com/blog/2014/09/01/galera-replication-how-to-recover-a-pxc-cluster/
service mysql start --tc-heuristic-recover=0
service mysql start --tc-heuristic-recover=ROLLBACK
service mysql start --tc-heuristic-recover=COMMIT