On 3/5/22 14:36, G.W. Haywood via BackupPC-users wrote:
On Sat, 5 Mar 2022, Les Mikesell wrote:
Unix/Linux has something calle 'sparse' files used by some types of
databases where you can seek far into a file and write without
using/allocating any space up to that point. The file as stored may
not be large but most tools to copy it will act as though the empty
parts were filled with nulls.
I can't remember the last time I saw a sparse file used *anywhere* in
'real life', although they are occasionally found in malicious mail.
One common legitimate use case for sparse files is virtual disk images.
I run a fair number of virtual machines at work (I think we're currently
at around 90 of them) and sparse files allow me to have a VM with a "1
TB" virtual disk that only takes up a few dozen GB of real disk space
and grows as needed to hold additional data.
As Les said, copying these files (with, e.g., `cp`) takes time
proportional to their virtual size, not their physical size, even though
the smaller physical size is preserved by the operation. Don't know
whether this applies to rsync, though. Might need to try that next time
I need to duplicate one, just to see whether rsync handles sparse files
smarter/faster than other tools.
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/