Skip to content

feat(postgres): restore a database to a point in time - #418

Draft
clankergoose wants to merge 6 commits into
mainfrom
feat/postgres-point-in-time
Draft

clankergoose wants to merge 6 commits into
mainfrom
feat/postgres-point-in-time

Conversation

@clankergoose

@clankergoose clankergoose commented Nov 30, 2026 •

Copy link
Copy Markdown

What

Two commands for point in time recovery (PITR):

prisma postgres pitr show <database>
prisma postgres pitr restore <database> --to 2026-11-30T12:00:00Z --name orders-restored

show prints the oldest and newest time available. restore creates a new database and prints its connection URL once. The source database does not change.

Draft until the API ships

  • Needs prisma/pdp-control-plane#6260. Until it is deployed, show answers 404 and restore is refused.
  • The published SDK does not have the new path, so getPointInTime uses a type cast. Remove it when the SDK is updated.

Testing

pnpm typecheck and pnpm --filter @prisma/cli test pass.

Both commands are in the e2e EXCLUSIONS: the API does not serve show yet, and restore needs a backup that a database made during a run does not have. They have not run against the real API.

🤖 Generated with Claude Code

Add `postgres point-in-time show` and `postgres point-in-time restore`.
They need the Management API's point in time recovery endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@pkg-pr-new

pkg-pr-new Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@prisma/cli@418
npx https://pkg.pr.new/@prisma/cli-engine@418

commit: 4380410

tylerhogarth and others added 5 commits November 30, 2026 17:17
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…very

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants