LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   sftp large file transfer corruption (https://www.linuxquestions.org/questions/linux-networking-3/sftp-large-file-transfer-corruption-4175607330/)

TheLexx 06-05-2017 01:16 PM

sftp large file transfer corruption
 
When I transfer files over my LAN that are greater than 1 GB a few bytes get corrupted. I have tested with files that are under 100 MG and they transfer well. The corruption is so small that I need a program such as md5sum to detect the corruption. This is odd because I thought sftp had built-in error correction. I have used sftp with Finnix and with Gentoo and I get errors regardless. Has anyone else noticed this problem with sftp? has anyone found a workaround.

business_kid 06-05-2017 01:35 PM

To quote someone (was it Ashleigh Brilliant?)

"I don't have a solution for you but I certainly admire the problem."

Can you give us a bit more on the errors? Particularly, the offsets, and also if you're running on a 32bit or 64bit machine, and any other facts you notice as you compare originals with damaged. You will probably have to use some hex comparison program to get offsets, as I think diff is too text based. If you repeat a copy (original --> sftp --> file1, original --> sftp --> file2, diff file1 file2), do file1 & file2 differ?
The 32 or 64 bit matters because of data bus width; there could be a maximum size accidentally built in to sftp somewhere by the coding constructs.

Habitual 06-05-2017 01:40 PM

same here.
Of all the Ss, I use scp the most for file xfer.

Turbocapitalist 06-05-2017 01:56 PM

I usually use rsync for large transfers. Back when the net was less reliable, large transfers were very difficult and I never gained full trust in what we have now, even if it is better. So with rsync if the transfer works on the first time, it works. If it needs a retry or two, then there is little waste in retransmission.

Edit: and nowadays rsync works over SSH by default.

business_kid 06-06-2017 03:56 AM

Having come at this from the hardware end, and having had a career considering component internal capacitances, logic thresholds, speeds, cable capacitance, speed & leakage vs. temperature, etc., it is a continual wonder to me that what we have is as reliable as it is, and can be pushed as fast as they are currently doing. The signal at the receiving end of a long cable (or optic fibre) is a very different looking and inferior signal from what was transmitted.


All times are GMT -5. The time now is 03:30 PM.