Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
# mysqldump from replica (stops SQL thread briefly for consistent point) mysqldump --single-transaction --master-data=2 \ --all-databases -u root -p > backup.sql # XtraBackup (hot backup, no locking) xtrabackup --backup --target-dir=/data/backups/full xtrabackup --prepare --target-dir=/data/backups/full # Restore to new instance xtrabackup --copy-back --target-dir=/data/backups/full # Stop SQL thread before mysqldump to freeze replica position STOP REPLICA SQL_THREAD; -- backup -- START REPLICA SQL_THREAD;
Result
Open