silos branch
Branch a database, list and inspect branches, and restore a branch to a point in time.
The silos branch command group manages branches —
copy-on-write forks of a database. Branching is instant because it forks the
underlying snapshots rather than copying data, which makes it ideal for previews,
tests, and experiments.
silos branch <subcommand> [options]branch list
List the branches of a database.
silos branch list my-appThe positional argument is the database ID or name.
branch create
Create a new branch from a database. By default the branch forks from main.
silos branch create my-app previewFork from a specific parent branch:
silos branch create my-app hotfix --parent preview| Argument / flag | Description |
|---|---|
<database> | Database ID or name to branch. |
<name> | Name for the new branch. |
--parent <name>, -p | Parent branch to fork from. Defaults to main. |
branch get
Show the details of a branch, including its parent and current state.
silos branch get previewThe positional argument accepts a branch ID (br_...) or name.
branch restore
Restore a branch to an earlier point in time. You can target either a specific write-ahead-log position (LSN) or a timestamp.
Restore to a timestamp:
silos branch restore preview --timestamp 2026-06-01T12:00:00ZRestore to an LSN:
silos branch restore preview --lsn 0/1ABC123| Flag | Description |
|---|---|
--lsn <lsn> | Target LSN to restore to. |
--timestamp <iso8601> | Target timestamp in ISO 8601 format. |
Point-in-time restore relies on retained WAL. How far back you can restore depends on your plan's retention window.
branch delete
Delete a branch. This removes the branch and its divergent state, but does not affect its parent.
silos branch delete previewSkip the confirmation prompt:
silos branch delete preview --force| Flag | Description |
|---|---|
--force, -f | Skip the confirmation prompt. |
Deleting a branch is irreversible. Make sure nothing depends on it (including child branches) before you remove it.
Connecting to a branch
Every branch gets its own connection string. Pass --branch to the db connection-string command:
psql "$(silos db connection-string my-app --branch preview)"See silos db for details.