For a long time I've been using rsync and a usb cable to get the photos from my phone's SD card onto the PC. This is the current command:
rsync -azvu --ignore-existing --progress SD-Karte/DCIM/Camera/ /home/cardamom/Pictures/PhonePictures/
It took me a while to get it right by trial and error and reading the docs. There are probably many thousand of photos in each directory but one would not think that it would take a computer that long to compare two lists a thousand long and if there is anything in the source which is not in the destination, bring it accross.
Yet, if I take a single extra photo with the phone, or even no extra photo, it will sit there for what feels like two or three minutes thinking and then transfer the one photo in about a second.
Am not sure if the bottleneck is in the rsync command which is doing something I don't need like comparing hashes of file, or if it is in the SD card of the old smartphone, which somehow has some big inefficiency.
Is there anything inefficient in the rsync command, or otherwise some kind of measure to make it go quicker inside the phone?
-z
, (along with-v
and--progress
) but each sync will need to fetch info of 1000s on computer and 1000s on phone, that take time. – Archemar Jun 12 '20 at 14:37-z
means 'compress' which sounds like a performance thing more than a functionality thing, will try without that now and see what happens. – cardamom Jun 12 '20 at 14:42-z
gone it is taking just as long. I think that both-v
and--progress
do much the same thing, ie tell you what it is doing. Since the slowness happens when almost nothing except 'sendng incremental file list' is printed, and the actual transferring, which is printed on the screen happens quickly, can't see how removing them would help. I think it's probably the SD card on the phone and there is not much you can do to speed this up but empty the photos folder out. – cardamom Jun 12 '20 at 14:52find /SD-Karte/DCIM/Camera -ls
and find out how long it takes. It is more or less whatrsync
has to do. If the find takes a long time, then the issue is your connection to the phone and it might be improved with other mount options, if you tell us how it is mounted now. – Eduardo Trápani Jun 12 '20 at 23:07