1

I am running my calculations on different local machines. Say I have folders AB/ with 95 folders in machine A and corresponding AB/ with 90 folders in machine B. If I run rsync operation, it tries to sync all 95 folders including tons of subfolders within each folders, making it quite inefficient. I want to just copy only 5 folders from machine A to machine B. What's the best way to achieve this goal?

Specifically, when I ran rsync -rv AB/ $USER@host:/path/to/AB it tries to match all the folders and subfolders and takes around 4-5 minutes for the whole operation, which is akin to scp the whole folders from A to B.

  • Normally, rsync only transfers new or modified parts (delta-transfer) to the target system. – Cyrus Jan 2 '18 at 0:08
  • That's what I thought, but when I ran "rsync -rv AB/ $USER@host:/path/to/AB" it tries to match all the folders and subfolders and takes around 4-5 minutes for the whole operation, which is akin to scp the whole folders from A to B. – mamun Jan 2 '18 at 0:11
1

You're using rsync incorrectly. Without the -a flag the program cannot find identical matches on size and timestamp, so it reverts to checksum comparisons.

Try this for copying instead:

rsync -av AB/ $USER@host:/path/to/AB

Incidentally, if $USER is your local account name, just omit it and let rsync default to that:

rsync -av AB/ host:/path/to/AB

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.