First page Back Continue Last page Overview Graphics
SQL: it compresses well!
SQL dumps are big, inconvenient blobs that don't archive nicely like simple files do (more on that later). But, at least they compress well!
you@box:~$ mysqldump --all-databases | gzip –rsyncable -3 > /path/to/mysql-all.sql.gz
If you're doing it manually, you might want to remember our old friend pv and give yourself a progress bar:
you@box2:~$ mysqldump -h box1 --all-databases | pv | gzip --rsyncable -3 > /path/to/mysql-all-box1.sql.gz
Restoration is just as easy:
you@box2:~$ du -h mysql-all-box1.sql.gz
3.1G mysql-all-box1.sql.gz
you@box2:~$ cat mysql-all-box1.sql.gz | pv -s 3100M | zcat | mysql -h box1