How to copy directory from one Linux server to another with a minimum in-between period?

Posted by yegor256 on Server Fault See other posts from Server Fault or by yegor256
Published on 2012-06-08T08:52:55Z Indexed on 2012/06/08 10:42 UTC
Read the original article Hit count: 214

Filed under:
|
|

I have a rather big directory on one server (over 4000 files), which I'd like to copy to another server (which contains a previous version of this directory). rsync is the first option, but it will put the destination folder into waiting status for a rather long period of time (more than a minute).

I'd like to do it a bit differently:

  1. gzip the source folder
  2. scp the archive to the destination server
  3. gunzip the file there
  4. delete the archive at the source and the destination

What is the best way to accomplish all this?

© Server Fault or respective owner

Related posts about linux

Related posts about rsync