Last active
February 26, 2016 07:18
-
-
Save mad4j/dbb0d2ad5a9320485b47 to your computer and use it in GitHub Desktop.
use tar command through network over ssh session
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 local to remote with local compression | |
#(less bandwidth, more local processing) | |
tar zcvf - /home/app | ssh root@192.168.1.1 "cat > /tmp/backup.tar.gz" | |
#from local to remote with remote compression | |
#(more bandwidth, less local processing) | |
tar cvf - /home/app | ssh root@192.168.1.1 "gzip > /tmp/backup.tar.gz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment