🧱 Large files in blocks
Uploading a 40 GB .vhdx over FTP is fragile: any interruption forces a retry. That's why destinations without hard links (FTP/SFTP) chunk large files.
How it works
- A file ≥ 64 MiB is split into 4 MiB blocks.
- Each block is compressed with zstd when it pays off and stored on the destination at
<task>/bloques/ab/<hash>— the block's name is its own hash, so identical blocks are uploaded once even if they appear in different versions. - The file version is described by a manifest
<path>.iobk-bloques: the ordered list of its blocks. - In the index,
entries.storage = 'blocks'and themanifests/chunkstables remember what THIS engine uploaded.
Resuming
If an upload is cut at 80%, the next pass only resends the missing blocks — the ones already there are verified by hash, not re-uploaded.
Restoring
Reading a block-based version always goes through the manifest (blocks::open_version): the engine downloads the missing blocks, rebuilds and verifies. Transparent to you — you restore the file like any other.
Cleanup (GC)
blocks::gc only deletes blocks that this engine uploaded and that no living manifest references — it never touches blocks from other engines sharing the destination.
When it's not used
options.blocks = falseon the task disables it.- On local destinations (with hard links) it's unnecessary: the hard link / full copy rules there, which is instant.
Tips
- Large databases and virtual disks change in small pieces: blocks turn an impossible upload into viable incrementals.
- Compression helps on documents/dumps; on already-compressed video the engine detects it doesn't pay off and uploads the block as-is.