LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rsync runs slowly between two external hapd drives (https://www.linuxquestions.org/questions/linux-software-2/rsync-runs-slowly-between-two-external-hapd-drives-4175542347/)

Merlyn 05-12-2015 05:20 AM

rsync runs slowly between two external hapd drives
 
I have two external harddrives linked over usb 2.
I'm using rsync to copy data between them:

Quote:

rsync --progress -avcW '/media/merlyn/SAMSUNG/pictures' '/media/merlyn/5B0DFDEB2728C418/'
I have a lot of data to copy and it takes hours to complete. It will appear stuck at "sending incremental file list" for a long time before it starts to work.

Is there a way to improve performance? I do not want to compress the destination data.
Thank you.

sgosnell 05-12-2015 08:38 AM

The rsync command as you posted it won't work. You have unmatched ' characters. If you've copied that incorrectly, and you're really using it correctly, I only have one suggestion. If you're just copying files, use cp, not rsync. Rsync is not designed to do simple copying, it's designed to sync source and destination, and it has to thoroughly check both before it actually does anything. Compressing the data during the operation does not give compressed data at the destination, it just compresses it during the transfer and then decompresses it for writing. Most modern CPUs are much faster than USB2 bandwidth, so you may see some improvement in transfer times by using compression. The actual data on disk will be identical for source and destination. But in almost all cases, cp is faster than rsync if all you need is a copy of the source material. Rsync excels when there is already data in the destination, and all you want to do is transfer any modified files. If the destination is empty, use cp.

Merlyn 05-12-2015 09:20 AM

I corrected the '. I will try it with compression. Thanks.

rknichols 05-12-2015 10:02 AM

Compression, or the lack thereof, will not make any difference. Compression applies to network links, and here both source and destination are local.

Your problem is the "-c" option, which requires a match of checksums of files on both the source and destination. That is going to take a long time if there are a lot of large files that already exist at the destination. Without that option, rsync will just compare file modification times and sizes to see what needs to be transferred, and that is a very quick operation which, in most cases**, is sufficient.
** Binary executables modified by prelink retain their original modification times and can have changes to content without affecting the size. I have also seen some database files that somehow get updated without affecting their modification times.

Merlyn 05-13-2015 01:28 AM

Removing -c was the right thing to do. Thank you for your kind help.


All times are GMT -5. The time now is 03:40 AM.