Railway Postgres PITR management
Introduced 2026-08-08 · score 0.95
HOW TO USE IT
When managing PITR for a Postgres service, use `railway postgres pitr` with the needed subcommand and `--service <service>`; for HA changes, follow progress until terminal and match the workflow ID.
railway postgres pitr status --service <service>
railway postgres pitr enable --service <service>
railway postgres pitr disable --service <service> --yesrailway postgres pitr progress --service <service> --watch
railway postgres pitr cancel --service <service>
railway postgres pitr clear --service <service>railway postgres pitr restore --service <service> --at <timestamp> --yes
railway postgres pitr backup list --service <service>
railway postgres pitr schedule set --service <service> --noneWHY THIS HELPS
Inspect, enable, disable, restore, or manage point-in-time recovery for a Postgres environment or HA cluster.
REQUIREMENTS AND LIMITATIONS
- Version: v5.33.0
- --service <service>: Target service name or ID; defaults to the linked service.
- --at <timestamp> (required): PITR restore time: RFC3339, `YYYY-MM-DD HH:MM:SS` local time, or relative offset such as `30m`, `2h`, or `1d`.
- --new-service-name <name>: Name for the restored service; defaults to `<source>-restored-YYYYMMDD-HHMM`.
- --yes / -y: Skip confirmation prompt for disable, restore, backup delete, or backup restore.
- --no-deploy: Commit enable/disable config change without triggering deploy; standalone only, since HA changes apply live.
- --watch: Poll HA workflow progress until a terminal phase.
- backup create --name <label>: Optional label for an on-demand backup; defaults to `Manual`.
- backup delete <id> [<id> ...] (required): One or more backup IDs to delete.
- backup lock <id> (required): Backup ID; removes its expiration so it is kept indefinitely.
- backup restore <id> (required): Backup ID to restore from.
- schedule set --daily / --weekly / --monthly (required): Select one or more automatic backup frequencies; these options can be combined.
- schedule set --none (required): Remove all automatic backup schedules; existing backups remain. Conflicts with `--daily`, `--weekly`, and `--monthly`.
- Prerequisite: Install Railway CLI; authenticate and link/select the project, environment, and service before running commands.
- Prerequisite: PITR is documented for Postgres single-node services and HA clusters; progress, cancel, and clear apply to HA clusters.
- HA enable/disable follows a rolling workflow and progress record; matching by workflow id prevents a stale record from indicating completion.
- The HA workflow has a 30-minute deadline; FAILED surfaces the workflow’s own error.
- Volume-instance ids resolve through environment volumeInstances; the config’s volumeMounts key is the VOLUME id, which backup mutations reject.
- Every environment-config fetch is decrypted; the supplied span truncates before the remainder of this qualification.
FIRST-PARTY EVIDENCE
- https://github.com/railwayapp/cli/releases/tag/v5.33.0
- https://github.com/railwayapp/cli/pull/1052
- https://github.com/railwayapp/cli/blob/v5.33.0/src/commands/postgres/pitr.rs
- https://docs.railway.com/cli
- https://docs.railway.com/volumes/point-in-time-recovery
Check the installed version and the source before using it. Entry JSON