File chunking and deduplication 00:00:01 Two backups share their edges A backup operator has two versions of a field recording. Split the first into three chunks and call them A, B, and C. Our goal is to restore either version without storing every byte twice. An edit replaces just the middle chunk. The second version needs A, D, and C. Which payload must travel to storage if the repository already contains the first backup? Copy D once, then publish a second manifest in the new order. A and C can be reused because their actual byte sequences are unchanged. Say the three letters aloud in order and you have the simplest possible restore plan. The manifest needs lengths and ordering information as well as chunk identities, so readers can rebuild exactly the original byte stream. 00:00:51 Use content identities and manifests Compute a strong content digest for each chunk under one documented algorithm. Identical input bytes produce the same digest. Treat a matching digest as a content-address candidate under the repository’s verification rules. If the object for D is absent, put it durably. Concurrent writers can converge on one verified object. Publish the completed manifest only after its required chunks are readable. Two separate manifests now track the versions: one for A-B-C and one for A-D-C, each with the correct chunk order. Four distinct chunk objects can serve six manifest references. That saves payload storage but not all backup overhead. Each version still has metadata, and a shared object can have a larger failure impact. 00:01:42 An old restore still needs B Restoring version one means following the original manifest, which still references chunk B, even though it’s no longer in the current backup. Chunks A and C are identical in both versions, so they can safely serve both manifests without duplication. Even if the first manifest is deleted, chunk B must remain until no active restore or backup depends on it. Complete the restore under an authorized, pinned version. Verify each chunk and the reconstructed file against trustworthy expected metadata. A hash supplied by an arbitrary caller is no permission to read a shared object. 00:02:20 Boundaries affect reuse With fixed-size chunks, inserting data shifts all later boundaries, breaking alignment and reducing reuse. Content-defined chunking uses rolling hashes to find natural boundaries, which often preserve alignment after changes. An insertion near the front can disturb many fixed offsets while later content-defined boundaries can resynchronize. Whether this pays off depends on the data, chunk size policy and extra computation. A boundary-finding hash chooses where to cut. A strong content digest identifies the resulting bytes. Those roles can use different algorithms. Neither method can promise that two genuinely different payloads will deduplicate. 00:03:02 Clean up with evidence Before garbage collection, the system marks all chunks reachable from active manifests to prevent accidental deletion. Check access through the authorized backup namespace. Use a strong digest and an integrity policy; if two different byte strings are suspected to share a digest, recomputing that same digest alone cannot distinguish them. Restore both versions and compare their bytes with the expected originals. A space-saving report is persuasive only if the operator can still recover yesterday’s B and today’s D in the correct position. Protect new manifests and in-flight restores across the collection window, for example with a snapshot and a grace period. A concurrent upload must not publish a pointer to a chunk the collector has already removed.