Docs
CLI

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.

Terminal
silos branch <subcommand> [options]

branch list

List the branches of a database.

Terminal
silos branch list my-app

The positional argument is the database ID or name.

branch create

Create a new branch from a database. By default the branch forks from main.

Terminal
silos branch create my-app preview

Fork from a specific parent branch:

Terminal
silos branch create my-app hotfix --parent preview
Argument / flagDescription
<database>Database ID or name to branch.
<name>Name for the new branch.
--parent <name>, -pParent branch to fork from. Defaults to main.

branch get

Show the details of a branch, including its parent and current state.

Terminal
silos branch get preview

The 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:

Terminal
silos branch restore preview --timestamp 2026-06-01T12:00:00Z

Restore to an LSN:

Terminal
silos branch restore preview --lsn 0/1ABC123
FlagDescription
--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.

Terminal
silos branch delete preview

Skip the confirmation prompt:

Terminal
silos branch delete preview --force
FlagDescription
--force, -fSkip 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:

Terminal
psql "$(silos db connection-string my-app --branch preview)"

See silos db for details.

On this page