State Snapshot Transfer
Copying data files directly Concept.
This requires that the receiving server is initialized after the transfer. xtrabackup, and other methods fall into this category. These methods are much faster than mysqldump, but they have certain limitations. For example, they can be used only on server startup and the receiving server must be configured very similarly to the donor (e.g. innodb_file_per_table should be the same and so on). Some of these methods (e.g. xtrabackup) can be potentially made non-blocking on the donor. Such methods are supported via a scriptable interface.
How to copying data files directly.
on donor server
1. create backup
innobackupex –user=user –password=password –no-timestamp /data/backups/new_backup
innobackupex –apply-log /data/backups/new_backup
2. transfer backup to crashed server
on crashed server
1. untar backup file
tar xvfz /download/backup.tar.gz
2. back up /var/lib/mysql on crash server
mkdir -p /home/crashed
mv /var/lib/mysql/* /home/crashed
3. restore backup
innobackupex –copy-back /data/backups/new_backup/
4. finally, copy grastate.dat to /var/lib/mysql and edit state to 0
mv /data/backups/new_backup/grastate.dat /var/lib/mysql
vi grastate.dat
……
……
safe_to_bootstrap: 0
6. Start server
/etc/init.d/mysql start