Created
February 15, 2012 14:24
-
-
Save btedev/1836088 to your computer and use it in GitHub Desktop.
Efficient file copying using pigz and nc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From Tumblr slidedeck "Massively Sharded MySQL" (http://assets.en.oreilly.com/1/event/74/Massively%20Sharded%20MySQL%20at%20Tumblr%20Presentation.pdf): | |
Our shard-split process relies on creating new slaves quickly, which involves copying around very large data sets. | |
For compression we use pigz (parallel gzip), but there are other alternatives. | |
On destination box: | |
$ nc -l [port] | pigz -d | tar xvf - | |
On source box: | |
$ tar vc . | pigz | nc [destination hostname] [port] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment