{
  "slug": "railway-postgres-pitr-management-42e150d8b35a",
  "title": "Railway Postgres PITR management",
  "tools": [
    "railway"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-08T01:06:37.000Z",
  "announced_at": "2026-08-08T01:06:37.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "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.",
    "examples": [
      "railway postgres pitr status --service <service>\nrailway postgres pitr enable --service <service>\nrailway postgres pitr disable --service <service> --yes",
      "railway postgres pitr progress --service <service> --watch\nrailway postgres pitr cancel --service <service>\nrailway postgres pitr clear --service <service>",
      "railway postgres pitr restore --service <service> --at <timestamp> --yes\nrailway postgres pitr backup list --service <service>\nrailway postgres pitr schedule set --service <service> --none"
    ],
    "gotchas": [
      "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."
    ]
  },
  "why_it_matters": "Inspect, enable, disable, restore, or manage point-in-time recovery for a Postgres environment or HA cluster.",
  "sources": [
    "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"
  ],
  "rank": 0.95037,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3-rejudge+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-20261016",
    "verdict_id": "wave1b-20261016:wave1b-20261016-f7d60bcc72fa9d29-3:rescue",
    "evidence_hash": "77f239bcc490b829686a650ec6614beada76a7b7951eb42bad71415c0a1158c7"
  },
  "review": {
    "draft_hash": "c1df6ae7af14d89a552754462d7440541c35b1369d3ac5f2b1abd1e3e5491e55",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-20261016:rescue",
    "reason": "Rescue path: first rejected only because the extracted card lacked usage; judged again on the enriched card, 3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.95 >= 0.9; 2 needed) and Jev gave 0.78 (>= 0.6 needed)."
  }
}
