Skip to content

On-disk layouts

This page shows the on-disk shape of each destination layout at the remote. For the behavior behind each, see the destination layout guides.

A tree shaped like the local volumes:

<dest.root>/
pictures/
2024/cat.jpg
.squirrel-history/run-7/2024/cat.jpg # prior content of cat.jpg
.squirrel-index/run-12 # receipt for run 12 (native mirrors)
.squirrel-index/index-20260604T120000.000Z-run-12.db # global index snapshot (ride-along)
docs/
invoice.pdf
.squirrel-history/run-9/invoice.pdf

A shared objects/ directory at the root and index/ under each per-volume directory (plus the same .squirrel-index/ ride-along):

<dest.root>/
objects/
26e7…e5ad # raw bytes of one BLAKE3 content, uploaded once
9f3a…1c02
pictures/
index/run-12 # immutable manifest segment for run 12
index/run-13
.squirrel-index/index-…-run-13.db

Adds a shared packs/ directory (tar.zst bundles of small files plus one placement map per run) alongside the same objects/ and index/:

<dest.root>/
objects/
26e7…e5ad # large files (>= pack_threshold)
packs/
9f3a…1c02 # one immutable tar.zst pack of small files
map-13 # placement map for run 13
pictures/
index/run-13
.squirrel-index/index-…-run-13.db

The trees above show an unencrypted destination. Add a crypt block to a content-addressed or packed destination and squirrel names each artifact by a keyed BLAKE3 hash derived from the crypt passwords, so no content hash or volume name appears at the remote:

<dest.root>/
.squirrel-naming # records the naming scheme (carries no key material)
objects/<name("object", blake3)> # keyed name of the content hash
packs/<name("pack", pack)> # keyed name of the pack key
packs/map-13 # run id in clear
<name("volume", volume)>/ # keyed volume directory
index/run-13 # run id in clear
.squirrel-index/index-…-run-13.db

A mirror is unchanged: its names are the volume’s own paths. Run identifiers stay in clear so segments and placement maps still sort into replay order without the key — see deriving the stored names.

Four directory names are reserved and filtered out of all sync and restore transfers (and from peer-sync), so squirrel’s own bookkeeping is never mistaken for user content:

DirectoryPurpose
.squirrel-history/run-<id>/Prior bytes of the files a sync run replaced on a mirror.
.squirrel-index/Ride-along index snapshots, and a native mirror’s receipts.
.squirrel-restore-history/run-<id>/Files displaced by an --in-place restore.
.squirrel-staging/run-<id>/In-flight writes on a destination squirrel writes itself, in any layout, renamed onto their names once confirmed.

One reserved file sits at the destination root rather than in a volume tree: .squirrel-naming, which records the artifact-naming scheme of an encrypted content-addressed or packed root. It is the gate that stops two naming schemes from being mixed into one root, and it never carries key material.

A directory literally called .squirrel-history or .squirrel-staging in your source volume is also filtered (with a warning) to keep the reserved name out of the destination tree by accident.

The JSONL formats inside index/run-<id> and packs/map-<run> are documented in Manifest & pack formats.