nais postgres branch create

nais postgres branch create POSTGRES [POSTGRES...] [flags]

Use create []. If the new branch name is omitted, prompt for it interactively. An explicit or default environment is used directly; otherwise resolve from the named Postgres, auto-selecting its sole environment or prompting for multiple (require -e noninteractively when ambiguous).

Options

--ago
Recover from this long ago, e.g. 2h, 30m or 1h30m (use either –at or –ago).
--at
UTC recovery point, e.g. 2026-10-06T10:00:00Z (use either –at or –ago).
--from
Source branch to recover from (defaults to the active branch).

Inherited options

--config
Specify the PATH to the configuration file.
-e, --environment
Specify the ENVIRONMENT to use for this command. Overrides the default environment from configuration.
--no-colors
Disable colors in the output.
-t, --team
Specify the TEAM to use for this command. Overrides the default team from configuration.
-v, --verbose
Set verbosity level. Use -v for verbose, -vv for debug, -vvv for trace.

Examples

# Prompt for a new branch name and restore from five minutes ago.
$ nais postgres branch create my-postgres --ago 5m

# Restore from the active branch as it was two hours ago.
$ nais postgres branch create my-postgres restored --ago 2h

# Restore from the active branch at a UTC timestamp (Z means UTC).
$ nais postgres branch create my-postgres restored --at 2026-10-06T10:00:00Z

# Restore from a specific source branch.
$ nais postgres branch create my-postgres restored --from main --at 2026-10-06T10:00:00Z