It seems that the change to support this would be minimal, see below. All file writing during restore seems to be done by util.py/copyfileobj()
Unless I'm very much mistaken, the following change would do sparse files, _if_ (and only if) the target object is empty to begin with. If it isn't, this will keep blocks with old content when it shouldn't(big caveat). if all([ b == 0 for b in buf ]): outfp.seek(len(buf), 1) # Move forward len(buf) bytes else: bytes_written += len(buf) outfp.write(buf) as the replacement for what previously were the last two lines of the above. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1576051 Title: Duplicity cannot handle sparse files efficiently To manage notifications about this bug go to: https://bugs.launchpad.net/duplicity/+bug/1576051/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs