Postgres cloning ΒΆ

Cloning creates a separate, writable Postgres database from a source database's backups. Point-in-time restore uses the same operation with an explicit target time. The source remains unchanged, and no workloads move automatically.

For steps, see Clone or restore Postgres.

Source and configuration ΒΆ

The clone has a different name from its source and belongs to the same team and environment.

SettingDefaultChanges allowed at creation
PostgreSQL major versionSource's versionNone
ExtensionsSource's extensionsConsole allows adding available extensions, but not removing source extensions. CLI inherits the source's extensions
High availabilitySource's settingEnable or disable
CPU and memorySource's configured requestsOverride independently
Disk sizeSource's configured sizeIncrease, but not decrease

The source's configuration is read when the clone is created, not from the selected point in time. Later changes to the source do not update the clone.

Target time ΒΆ

Without an explicit time, CLI and Console request a point 10 minutes before submission. This buffer accounts for recent write-ahead logs that may not yet be archived. The clone does not include the source's most recent writes.

An explicit time must fall within the source's available recovery window and must not be in the future. A source without a recovery window cannot be cloned yet. An accepted target time does not guarantee success: cloning can still fail if required backup data or write-ahead logs are unavailable.

ClientTime format
CLI --atLocal time, such as 2026-11-16 12:00 or 2026-11-16T12:00:00. RFC3339 with Z or an explicit offset is also accepted. Whole-second precision only
Console Specify timeDate and time in the browser's local time zone, with minute precision. Empty or collapsed means the default clone point

Local times skipped by a daylight-saving clock change are rejected. A repeated local time selects the earlier occurrence. CLI timestamps with an explicit offset are unambiguous.

CLI flags ΒΆ

Command: nais postgres clone <SOURCE> <NEW-NAME> --team <TEAM> --environment <ENVIRONMENT>

FlagDescription
--atTarget time. Omitted means about 10 minutes ago
--high-availability true|falseOverride the source's high-availability setting
--cpuOverride the source's CPU request, for example 500m
--memoryOverride the source's memory request, for example 2Gi
--disk-sizeOverride the source's disk size, for example 50Gi. Must not be smaller than the source's
--yes, -ySkip the confirmation prompt

Completion status ΒΆ

Cloning runs asynchronously. nais postgres get reports Clone status separately from the database's Status. A database marked Ready does not by itself mean cloning is complete.

Completed means the clone is independent of the source and has its own backup. Source deletion is blocked while dependent clones still need its backups. The clone builds its own backup history; the source's earlier recovery window does not become part of it.

Failed includes the failure message. A failed clone is not a usable restored database.