Overview
There are times when I need to restore a slave from a backup of a
master or another slave, but too many times I have taken the
typical approach of taking the backup on the source server and
then copying it to the target server. This takes a great
deal of time, especially as your database grows in size.
These steps are going to detail how to use Netcat (nc) and
Percona Xtrabackup (innobackupexec) to stream the backup from the
source server to the target server, saving a great deal of time
by copying the data only once to the desired location.
While the data is streaming to the target server, it’s being
compressed and then uncompressed on the fly, reducing the amount
of traffic going across the network by around 85% to 90% (typical
backup compression ratios of MySQL Innodb I have witnessed are in
this range). I will also provide a simple script to
complete these steps to give you a start at creating your …
[Read more]