0

I would like to copy a folder hierarchy composed of 20k text files of about 10..500kB each.

I initially tried:

scp -r server:${REMOTE} ${LOCAL}

But it was too slow, so I tried with rsync instead:

scp -zr server:${REMOTE} ${LOCAL}

Again it was too slow, it took about 2 hours to complete.

I came across a third solution which was:

ssh server tar czf ~/tmp.tar.gz --directory=$(dirname $REMOTE) ${REMOTE}
scp server:tmp.tar.gz .
tar xzf --directory=${LOCAL} tmp.tar.gz

It is much faster but less convenient to use and I have to make sure tmp.tar.gz does not already exist.

Is there any intermediate alternative?

5

0

You must log in to answer this question.

Browse other questions tagged .