Created
July 31, 2013 17:11
-
-
Save kennwhite/6124007 to your computer and use it in GitHub Desktop.
Push backup from remote box 1 to remote box 2 through local (box 1 has no direct access to box 2)
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
#!/bin/bash | |
# Push remote box 1 to remote box 2 through local box (box 1 has no access to box 2) | |
ssh -i box1key user@remotebox1 \ | |
"tar -czvf - remotedir1" \ | |
| ssh -i box2key user@remotebox2 "cat >remotedir2.tgz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment