# Point-in-time recovery (PITR) (/docs/postgres/database/point-in-time-recovery) > For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL. Point-in-time recovery (PITR) for Prisma Postgres: restore to a timestamp in the last 7 days on Pro or 30 days on Business and Enterprise, into a new database. Location: Postgres > Database > Point-in-time recovery (PITR) Prisma Postgres supports point-in-time recovery (PITR) on Pro (7 days) and on Business and Enterprise (30 days). It is not available on Free or Starter. Point-in-time recovery (PITR) restores a Prisma Postgres database to a timestamp you choose, into a new database. Use it to get back rows that were deleted or changed by mistake. Unlike a [backup](https://www.prisma.io/docs/postgres/database/backups), it is not limited to the times of daily snapshots. For example, if a migration deleted a column at 14:05, restore the database as it was at 14:04. Then copy the data you need back into the original database. The restore always creates a new database. The original database is not changed, and your app keeps using it while the restore runs. ## Which plans have PITR, and how far back can you restore [#which-plans-have-pitr-and-how-far-back-can-you-restore] Point-in-time recovery is available on the Pro, Business, and Enterprise plans. On those plans, the restore window is how far back you can go. Free and Starter do not have point-in-time recovery: | Plan | Point-in-time recovery | What you can restore | | ---------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Free | No | Nothing. The Free plan has no backups. | | Starter | No | A [daily backup](https://www.prisma.io/docs/postgres/database/backups), kept 7 days and taken on days the database has activity. You restore to a daily snapshot, not to a time you choose. | | Pro | Yes | Any time in the last 7 days, from your earliest retained backup | | Business | Yes | Any time in the last 30 days, from your earliest retained backup | | Enterprise | Yes | Any time in the last 30 days, from your earliest retained backup | On Pro, Business, and Enterprise, the newest time you can choose is 10 minutes ago. The oldest time is your earliest retained backup, so it can be later than the start of the window: - A new database can be restored only after its first backup has finished. - After you [restore a backup](https://www.prisma.io/docs/postgres/database/backups#restoring-a-backup) in place, you can only restore to times after the next backup that finishes. - Some older databases do not support point-in-time recovery. Console says so on the database's **Point in time** page. ## Restore to a point in time in Console [#restore-to-a-point-in-time-in-console] To restore a database, you need the Admin role, or the Developer role with access to the project. See [Workspace roles and project access](https://www.prisma.io/docs/console/workspace-access). 1. Open the database in the [Prisma Console](https://console.prisma.io/?utm_source=docs\&utm_medium=content\&utm_content=postgres) and select **Point in time** in the sidebar. 2. Under **Choose Point in Time**, choose the date and time to restore to. The description under the label shows the oldest and newest times you can choose. 3. Optional: choose a different time zone in the list next to the date. Times are shown in your local time zone by default. The time zone changes only how the times are shown. 4. Under **Choose Database Name**, enter a name for the new database. 5. Click **Restore to new database**. Console opens the new database's **Dashboard**, which shows that the database is being restored. The new database is created in the same project, on the same branch, and in the same region as the original. It counts toward the database limit of your plan. ## While the restore runs [#while-the-restore-runs] A restore can take several hours for a large database. While it runs: - The new database's **Dashboard** shows the progress, and updates when the restore finishes. You can leave the page and come back later. - The sidebar shows only **Dashboard** and **Settings** for the new database. You cannot open Studio, Queries, or connection strings until the restore finishes. - On **Settings**, you cannot rename the database. For the first few minutes, you cannot delete it either. Console shows **This restore is still starting** until the delete is possible. When the restore finishes, Prisma sends an email to the Admins and Developers who can access the project. If the restore fails, the email says so and links to the **Point in time** page, where you can try again. A failed restore can leave the new database incomplete. Open it from the email to keep or delete it. A restore that has not finished after 24 hours is marked as failed. ## Use the restored data [#use-the-restored-data] The new database has its own connection strings. The connection strings of the original database do not reach it. 1. [Generate a connection string](https://www.prisma.io/docs/postgres/database/connecting-to-your-database#get-your-connection-strings) for the new database. 2. Copy the rows you need back into the original database, or point your app at the new database. [Recover deleted records from a hosted Postgres database](https://www.prisma.io/postgres/recover-deleted-records) walks through copying rows back. When you no longer need the new database, delete it from its **Settings** page. If the database is on a branch that [Delete Protection](https://www.prisma.io/docs/console/delete-protection) covers, turn off **Data** first. In a workspace created through the Vercel integration, the Console can't delete it: use the Prisma CLI or the REST API, as described in [Deleting a restored copy in a Vercel workspace](https://www.prisma.io/docs/postgres/database/backups#deleting-a-restored-copy-in-a-vercel-workspace). ## Restore with the REST API or MCP tools [#restore-with-the-rest-api-or-mcp-tools] The REST API and [MCP tools](https://www.prisma.io/docs/ai/mcp-tools) use the same restore window as Console. **REST API** 1. Call [`GET /v1/databases/{databaseId}/backups/pitr`](https://www.prisma.io/docs/rest-api/endpoints/database-backups/get-databases-by-database-id-backups-pitr) to read the oldest and newest times you can restore to. `window` is `null` when no time is available, and `meta.availableOnPlan` is `false` when your plan does not include point-in-time recovery. 2. Call [`POST /v1/projects/{projectId}/databases`](https://www.prisma.io/docs/rest-api/endpoints/databases/post-projects-by-project-id-databases) with a `source` of type `pitr`: ```json { "name": "orders-restored", "source": { "type": "pitr", "databaseId": "db_123", "targetTime": "2026-12-01T14:04:00Z" } } ``` `targetTime` is an ISO 8601 date and time inside the window. **MCP tools** - `get_prisma_postgres_pitr_window` returns the window of a database. - `create_prisma_postgres_recovery` with a `targetTime` restores the database to a new database. ## Next steps [#next-steps] - [Backups](https://www.prisma.io/docs/postgres/database/backups): restore a daily snapshot, or restore a database in place. - [Connecting to your database](https://www.prisma.io/docs/postgres/database/connecting-to-your-database): get connection strings for the restored database. - [Delete Protection](https://www.prisma.io/docs/console/delete-protection): stop the original database from being deleted by mistake. - [Postgres point-in-time recovery compared](https://www.prisma.io/postgres/point-in-time-recovery): plans, restore windows, prices and restore targets on Prisma Postgres and seven other Postgres hosts. ## Related pages - [Backups](https://www.prisma.io/docs/postgres/database/backups): Manage and restore database backups in Prisma Postgres - [Connect to Prisma Postgres without Accelerate](https://www.prisma.io/docs/postgres/database/switch-from-accelerate): Replace a hosted Prisma Postgres Accelerate connection without moving your database or data - [Connecting to your database](https://www.prisma.io/docs/postgres/database/connecting-to-your-database): Choose the right Prisma Postgres connection string for your runtime, tool, and workload. - [Connection pooling](https://www.prisma.io/docs/postgres/database/connection-pooling): Use Prisma Postgres connection pooling for concurrent application traffic. - [Extensions](https://www.prisma.io/docs/postgres/database/postgres-extensions): Enable and use standard PostgreSQL extensions with Prisma Postgres.