只限于文件小而多的情况,传输单个大文件两者应该是一样地

备份,从远端,到本地

% ssh someone@somewhere "cd /my/big/folder; tar cvzf - ." > /my/backup.tgz

还原,从本地,到远端

% ssh someone@somewhere "tar xvzf - -C /my/new/directory/" < /my/backup.tgz

备份,从本地,到远端

% cd /my/big/folder; sudo tar cvzf - . | ssh someone@somewhere "dd of=/my/backup.tgz"

还原,从远端,到本地

% ssh someone@somewhere "cat /my/backup.tgz" | tar xzvf - -C /my/new/directory/