squashfs-tools-ng icon indicating copy to clipboard operation
squashfs-tools-ng copied to clipboard

Binary patching tools

Open AgentD opened this issue 4 years ago • 1 comments

A very often demanded feature:

  • Given two SquashFS images, produce a small binary patch file.
  • Transmit the patch file somewhere (e.g. an embedded device with a SquashFS rootfs).
  • Given the first image and the patch file, reproduce byte-for-byte the second image.

Producing the patch file will be added to sqfsdiff that does all the heavy lifting. A second program sqfspatch that is as dumb as possible and designed for a resource constrained setting applies the patch.

The patch format itself will be a custom format to take maximum advantage of the knowledge about the internal SquashFS structure and more likely stream compressed.

AgentD avatar Jun 11 '20 13:06 AgentD

It would also be useful to be able to directly produce a patch for a squashfs file directly from the source.

I currently use squashfs for my secondary backups (borg is my main one, and it runs hourly), but I currently need to use a combination of overlayfs and the squashfs tools to do differential backups from the full snapshots (I take a full one every 2 months, then do a differential from that every week, and discard old ones).

pgaskin avatar Jun 12 '20 17:06 pgaskin