create an archive of the folder /home/bob on a remote computer "remote" called bobhome.tgz
- Code: Select all
tar zcvf - /home/bob | ssh user@remote "cat > bobhome.tgz"
and the restore it back to the computer you are on
- Code: Select all
ssh user@remote "cat bobhome.tgz" | tar zpvxf -
or, if you moved to your server, unarchive the files and push them to a remote computer
- Code: Select all
ssh user@remote "cd /home/bob; tar zpvxf -" < bobhome.tgz