Support for transferring sparse files via scp/sftp correctly?

Chris Rapier rapier at psc.edu
Wed Mar 5 07:17:34 AEDT 2025



On 3/4/25 05:34, Philipp Marek via openssh-unix-dev wrote:
>> Does OpenSSH scp/sftp mode transfer sparse files correctly, i.e. are
>> holes skipped and not transferred as chunks of 0 bytes? [1]
>>
>> We're asking about sparse files in the >= 1PB range, which consists of
>> multi-TB holes with around 600-2000GB of valid data.
> 
> 
> Perhaps rsync would be a good fit here,
> it supports --sparse.
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

I think one of the issues you are going to face is that SEEK_DATA and 
SEEK_HOLE don't seem to be currently supported under OpenBSD. Since 
that's the home OS for OpenSSH this could create portability issues. 
While you can get around that with the judicious use of defines it means 
that the feature set will start to shift between different OSes.

Personally I think it's a good idea and I may explore it for HPN-SSH but 
I think it's going to be a hard sell for the OpenBSD community.

Chris

p.s. sorry for not replying correctly. My mail seems to be having issues 
and this is the only email in the thread I've seen.


More information about the openssh-unix-dev mailing list