nais postgres clone
nais postgres clone SOURCE POSTGRES [flags]
Create a new Postgres from the backups of an existing one. Without –at the clone is made from the latest available point, approximately 10 minutes ago. The new database is created in the same team and environment as the source, with the same PostgreSQL version and extensions. The source is not changed and no applications are moved to the new database. Availability and resources default to the source’s configuration; the disk cannot be smaller than the source’s. Cloning continues asynchronously.
Options
--at- Point in time to clone from, in local time (e.g. “2026-11-16 12:00”) or RFC 3339 with offset. Defaults to the latest available point, about 10 minutes ago.
--cpu- Requested CPU, e.g. 100m. Defaults to the source’s request.
--disk-size- Requested disk size, e.g. 10Gi. Defaults to the source’s size and must not be smaller.
--high-availability- Enable or disable high availability (true or false). Defaults to the source’s setting.
--memory- Requested memory, e.g. 512Mi. Defaults to the source’s request.
-y,--yes- Confirm without a prompt.
Inherited options
--config- Specify the
PATHto the configuration file. --confirm-login- Ask for confirmation before starting required login flows. Interactive terminals only.
-e,--environment- Select or filter by Nais
ENVIRONMENT, for example dev-gcp or prod-gcp. Overrides the environment configured with nais defaults set environment. --no-colors- Disable colors in the output.
-t,--team- Select the Nais
TEAMthat owns the resources. Overrides the team configured with nais defaults set team. -v,--verbose- Set verbosity level. Use -v for verbose, -vv for debug, -vvv for trace.
Examples
# Clone a Postgres from the latest available point.
$ nais postgres clone my-postgres my-clone -t my-team
# Clone a Postgres as it was at a point in time (local time).
$ nais postgres clone my-postgres my-clone --at "2026-11-16 12:00" -t my-team
# Clone with more resources than the source.
$ nais postgres clone my-postgres my-clone -t my-team -e dev-gcp --cpu 500m --memory 2Gi --disk-size 50Gi