Skip to content

keryx media rollback

Description

Repoint a media file at an earlier version from the workspace's ledger (spec 0040) — "put V2 back", without hunting for a content hash.

media.lock is re-pinned to that version's content and the working copy is restored from the object store. Because storage is content-addressed, the older blob is still there addressed by its hash — so a rollback is a manifest edit plus a fetch, never a re-upload.

History is append-only. Rolling back does not erase later versions: V3 stays in media.log and you can roll forward to it again. If you then push new content, it lands as the next version (V4).

Commit afterwards to record the rollback — the re-pinned media.lock is the change git tracks.

Usage

keryx media rollback <file> <version> -w <slug>
<file> Workspace-relative media path, e.g. vo/01.mp3.
<version> The target version — 2 or v2.
-w, --workspace The reel workspace slug (required).

Run keryx media rollback --help for the authoritative, always-current flag set.

Output

media rollback: vo/01.mp3 → v2 (22 bytes)
media.lock re-pinned and the working copy restored — commit to record the rollback.

With --output json, the envelope carries {file, version, sha256, size}.

Errors

  • Unknown version — the ledger has no such version for that file; the error points at keryx media versions to list what exists.
  • No object store configured — set the top-level storage: block (see keryx media).

See also