Copy Sparse Files with Rsync

Patrick Jayet
Jun 4, 2007 · 1 min read

Updating my backup script that is using rsync, I have just realized that without further options, rsync does not handle well copying sparse files (i.e. files that are for instance holding a file system and that just take the space needed by their actual size). A consequence is that on the target file system, the sparse file won’t be any longer a sparse one, i.e. will take its maximal size.

Fortunately, adding the -S option to rsync will do the trick, for instance

XRB’s Blog

Random thoughts of a Software Engineer

Patrick Jayet

Written by

Polyglot (FR, DE, EN, ES), polyglot programmer (Java, Groovy, Ruby, Swift, Objective-C, Scala, Python, O’Caml) polyglot methodologist (Scrum, Kanban, Lean).

XRB’s Blog

Random thoughts of a Software Engineer