Berserk Docs

Managing with the CLI

Manage databases, tables, views, tokens and remote sites with bzrk

bzrk manages a cluster's resources from the terminal. Install the CLI and sign in first: Berserk CLI.

Identifying resources

Each command reaches a resource by one kind of identifier (bzrk help resources prints the same):

IdentifierResources
Name or iddatabase, table, view, service account, site principal, remote site
Nameingest token, connection, profile
Path, a slash-separated name such as oncall/nightly-error-digestworkflow, alert, dashboard
Idworkflow run, running query (bzrk ps), service account token, site token, remote table

Tables, views and ingest tokens belong to a database: --database, else the profile's database, else default.

Anyone signed in can list and read databases, tables, views and ingest tokens. Creating, changing, deleting or restoring one takes an admin or a maintainer, and so do the bzrk admin janitor, stream and vidx commands that change anything. Anyone else is refused with a permission error.

A command group run without a command runs its list, or status for bzrk auth, bzrk admin vidx and bzrk admin vidx writes: bzrk table is bzrk table list. A group without either prints its help and exits 2.

--database and the output formats (--json, --csv, --tsv) work only with the commands that read them, and bzrk <command> -h lists them under Global options; elsewhere they are refused with exit 2.

Deleting and restoring

A deleted database, table, view or ingest token can be restored for a while: 5 minutes for a view, longer for the rest. The delete prints the date it stays restorable until, and so does list --include-deleted:

bzrk table delete events
# Deleted table 'events'. Restorable for 7 days, until 2026-05-27T10:00:00+00:00: `bzrk table restore events`
bzrk table list --include-deleted
bzrk table restore events
  • --immediate skips the restore window: the database or table cannot be restored, and its data is cleaned up within minutes.
  • A database that still has tables, views or ingest tokens is deleted only with --cascade (--dry-run lists them), and bzrk database restore restores what the cascade deleted.
  • A table is not deleted while a view or an ingest token uses it; change those first with bzrk view set-tables or bzrk ingest-token update-routing.
  • A deleted name stays taken until it can no longer be restored. A restored ingest token works again with its old value.
  • --json lists carry deleted_at and restorable_until for a deleted row.

Workflows, alerts, dashboards and connections cannot be restored.

Connecting clusters

One cluster can query another's tables (Querying other clusters). On the cluster being queried, an admin creates a site principal and its token; on the cluster querying it, an admin registers the remote site with that token and maps its tables:

# On the cluster being queried
bzrk site-principal create acme-eu --databases logs,traces
bzrk site-principal token create acme-eu to-acme-eu --simple > token.txt

# On the cluster querying it: the token is read from stdin, never from the command line
bzrk remote-site add acme-eu --url https://berserk.acme.example --cluster-function no < token.txt
bzrk remote-site table map acme-eu --local-database default --local-name AcmeLogs \
  --remote-database logs --remote-table Logs

--databases (all, or a comma-separated list) and --cluster-function (yes or no) have no default. bzrk site-principal also takes list, get, set-databases, enable, disable, delete and token list|revoke; bzrk remote-site takes list, get, update, set-token, remove and table list|unmap. A token is rotated by creating a new one, bzrk remote-site set-token, and revoking the old one.

Operator commands

The bzrk admin vidx commands, for an operator rolling out a new vector-index format, are on Operator Commands.

On this page