Skip to main content
ZWRM supports full backups and point-in-time recovery (PITR) for PostgreSQL databases. Backups are stored externally and can be used to restore into a new database instance.

Enable WAL archiving

Before creating backups, enable WAL (Write-Ahead Log) archiving on the database:
zwrm postgres backup enable <name>
Restart the database after enabling for changes to take effect. To disable WAL archiving:
zwrm postgres backup disable <name>

Create a backup

zwrm postgres backup create <name>
FlagTypeDefaultDescription
--typestringbaseBackup type: base or logical

Example

zwrm postgres backup create my-db --type base

List backups

zwrm postgres backup list <name>
Shows all backups for a database with their ID, type, status, size, and creation time.

Example

zwrm postgres backup list my-db

Delete a backup

zwrm postgres backup delete <backup-id>
Deleting a backup is permanent. You won’t be able to restore from it afterward.

Restore a database

Restore creates a new database from a backup. The original database is not modified.
zwrm postgres restore <name> --name <new-name>
FlagTypeDefaultDescription
--namestringName for the restored database (required)
--backupstringlatestSpecific backup ID to restore from
--pitrstringPoint-in-time recovery target (RFC 3339 timestamp)
--sizestringsame as sourceSize preset override: small, medium, large

Examples

Restore from the latest backup:
zwrm postgres restore my-db --name my-db-restored
Restore from a specific backup:
zwrm postgres restore my-db --name my-db-restored --backup abc12345
Point-in-time recovery to a specific moment:
zwrm postgres restore my-db --name my-db-restored --pitr "2026-03-10T14:30:00Z"
PITR requires WAL archiving to be enabled. The target time must fall within the range covered by available WAL segments.

Check restore status

zwrm postgres restore status <restore-id>
Shows the restore type, status, target database ID, and any error details.