Knowledgebase:
Tar over SSH
Posted by rbTech Staff, Last modified by rbTech Staff on 13 July 2015 02:46 PM
Because sometimes I have the hardest time remembering the simplest things...
[[email protected] ~]# tar cvzf - /path/to/sourcefiles | ssh {user}@{some.host.tld} "cat >/path/to/tarfile.tgz"

or to pull from another host:

[[email protected] ~] ssh -l {remoteuser} {some.host.tld} "tar cv - /path/to/sourcefiles" >some.host.tld.tar

Oy...

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).