- Snapshots are point-in-time, read-only copies of a single box’s root. Restore one onto the same box to roll its state forward or backward.
- Bases are reusable, read-only templates. Every box you create is a writable clone of a base, so a base lets you bake an environment once and stamp out many boxes from it.
Snapshots
A snapshot is a read-only copy of one box’s root filesystem at a moment in time. Snapshots are namespaced per box: you can only restore a snapshot onto the box it was taken from. There is no cross-box restore.Create a snapshot
v0, v1, v2, and so on, taking the next number above the highest existing one.
To set the name yourself, pass it as a positional argument, and add a description with -m:
--name flag, which overrides the positional argument. Creating a snapshot whose name already exists returns a conflict.
Snapshot names must be safe name components: 1-63 characters, lowercase
a-z0-9-, starting and ending alphanumeric, and no --.List snapshots
NAME, SIZE, CREATED, and DESCRIPTION columns. The created timestamp is RFC3339.
Restore a snapshot
Diffing against a snapshot
Usezomg diff to see what has changed in a box’s root filesystem since a snapshot. Diffs are root-only by construction.
Diffs do not include attached data volumes or system/project volumes. zomg diff file rejects paths under /home, /box/bin, /box/all, and /box/proj instead of resolving them through those mounts.
Status
--against, the diff compares against the most recent snapshot. If the box has no snapshots, the command reports that you must specify one:
+), modified (~), and deleted (-) paths, or No changes when the trees match.
A single file
added, deleted, modified, or unchanged; for a modified file, a unified diff is included.
File diffs are limited to 1 MB. Diffing a file larger than that returns an error. Use
--against here too to pick a specific snapshot.Bases
A base is a read-only template filesystem. Every box you create is a writable btrfs clone of a base:box-base alias. Bases are read-only, so cloning never modifies the template.
List and inspect bases
NAME, VERSION, SIZE, and CREATED.
To inspect one base, including its versions and the build script of each:
VERSION, KIND, TAG, BUILDER, PARENT, SIZE, and CREATED. The TAG column holds the build script’s sha256. You can filter versions by that sha256 with --tag:
Building a base from a Dockerfile
zomg base build builds a base image from a Dockerfile in your current directory:
linux/amd64, and the image is tagged <name>:latest (lowercased). Zomg auto-detects a container engine in order: docker, then podman, then nerdctl.
On a non-x86_64 host using Docker, docker buildx is required to cross-build for linux/amd64. With buildx, Zomg runs docker buildx build --platform linux/amd64 ... --load; otherwise it runs a plain build --platform linux/amd64. Zomg then checks the image architecture is amd64 and fails on a mismatch.
Once built, Zomg exports the image’s root filesystem as a .tar.gz and uploads it as a new base.
Installing a base on demand
Usezomg base install to add one of the repository’s maintained bases to a running environment without repeating a full setup:
update when you intentionally want the force path:
Saving a base from a box
To turn a box’s current root filesystem into a reusable base, usezomg base save with the new base name first and the source box second:
Importing a base from a tarball
You can import a base directly from a.tar.gz of a root filesystem:
--file flag is required. To layer the tarball on top of an existing base, pass a parent:
--parent is also available as -p. With a parent, Zomg snapshots that parent and extracts the tarball on top of it; without one, it extracts into a fresh empty filesystem. Either way, Zomg verifies the base architecture and sets the new base read-only.
On
base import, -p means --parent, not --project. This command has no --project flag.Versioning and aliases
Base names are versioned automatically. The first time you save or import a given name, Zomg writes a subvolume under that exact name and registers an alias pointing at it. Each later write of the same name gets a timestamp suffix like-v20260101120000, and the alias moves to the newest version.
When you run zomg create --base my-base, Zomg resolves the alias to its latest version and clones that. To pin a box to a specific older version, pass the exact version name as --base.
Deleting bases
Base deletion is explicit about whether you are removing an alias or one immutable version:Where to go next
Boxes
How boxes are created, cloned, and torn down.
Data volumes
Snapshot and back up volume data, which root snapshots and bases do not capture.
Environment
The runtime layout inside a box’s root filesystem.
API reference
The snapshot, diff, and base HTTP endpoints.