tar zcvf - it_dir | ssh nl85@tchost105.adminapps.cornell.edu tar zxvf - -C ~/  

http://www.cyberciti.biz/faq/howto-use-tar-command-through-network-over-ssh-session/

Hugh Edwards'

0.) overview: want to tar+copy Large fileset from root-owned location on shale1 to nubbhold-owned location on focus02
1.) copy root@shale1 id_dsa.pub TO nubbhold@focus02:authorized_keys
2.) on shale1:

    % cd to directory above "rover" directory
 
   % sudo -s   # act as root on shale1

3) on shale1

   % tar cf - rover  | ssh nubbhold@focus02.serverfarm.cornell.edu tar xf - -C /opt/CSCOnfc/NU_Billing/ &   # copy all of shale1:rover TO focus02:/opt/CSCOnfc/NU_Billing/

4) rover directory appears in focus02:/opt/CSCOnfc/NU_Billing/

  • No labels