We compiled tips and tricks for writing great code with LLMs. Make the most of tools like Cursor, Claude, Devin
Docs/Features/Backup & restore

Backup & restore

early access

Restore your branch from a point in time or snapshot

Early Access

This feature is available for members of our Early Access Program. Read more about joining up here.

Use the Backup & Restore page in the Neon Console to restore a branch to a previous state or create snapshots of your data. This feature combines instant point-in-time restore and snapshots to help you recover from accidental changes, data loss, or schema issues.

Backup and restore UI


What you can do

  • ✅ Instantly restore a branch
  • ✅ Preview data before restoring
  • ✅ Create snapshots
  • ✅ Restore from a snapshot

Instantly restore a branch

Restore your branch to a specific time in its history. You can choose any timestamp within your restore window and preview data before restoring.

  • Available from: Last 24 hours (Free Tier) or up to 7–30 days, depending on your Neon plan
  • How it works: Select a time, preview the data, then restore
  1. Select a time

    Click the date & time selector, choose a restore time, and click Restore.

    Backup and restore select a restore time

    You'll see a confirmation modal that outlines what will happen:

    • Your branch will be restored to its state at the selected date & time
    • Your current branch will be saved as a backup, in case you want to revert

    Backup and restore preview data

    At this point, you can either proceed or select Preview data to inspect the data first.

  2. Preview the data

    Previewing lets you verify that you've selected the correct restore point. You can:

    • Browse data in a Tables view
    • Query data directly from the restore page
    • Compare schemas using Neon’s schema diff tool

    Backup and restore preview data options

    Browse data lets you explore a read-only table view of your data at the selected restore point.

    Backup and restore browse data

  3. Restore

    Click Restore to complete the restore operation, or Cancel to back out. You can also restore directly from any of the Preview data pages.

    Restore the data

    When you restore, a backup branch is automatically created (named <branch_name>_old_<timestamp>) in case you need to revert back. You can find this branch on the Branches page.

    Backup branch on the Branches page

    For information about removing backup branches, see Deleting backup branches.

Create snapshots

Snapshots are manual, point-in-time copies of your branch.

To create a snapshot, click Create snapshot. This captures the current state of your data and saves it as a Manual snapshot. It's a good idea to create a snapshot before making significant schema or data changes.

A future release will include a snapshot scheduler that lets you schedule daily, weekly, or monthly snapshots.

Backup branch on the Branches page

Restore from a snapshot

Restoring from a snapshot is a little different from the instant branch restore operation described above. When restoring from a snapshot, the snapshot is restored to a new branch, and you need to add a compute to the new branch to access it. Additionally, to start using the new branch with your application, you'll need to swap out your current connection string for the connection string of the new branch. Follow the steps below.

  1. Select a snapshot

    Find the snapshot you want to restore and click the Restore button.

    A confirmation modal explains the operation:

    • The restore happens instantly
    • Your current branch is unchanged
    • A new branch with the restored data is created

    Restore from snapshot confirmation modal

  2. Restore the snapshot

    Click Restore to continue. You'll be redirected to the new branch created from the snapshot.

    • This is a new branch with the restored data
    • It doesn't have a compute yet — you’ll need to add one to access the data

    Restore branch page

  3. Add a compute to the restore branch

    Click Add compute to add a compute to the new branch.

    Restore branch add compute

    Select your desired compute settings and click Add. Compute settings include compute size, autoscaling, and scale-to-zero. If you plan to switch over to this branch, you would typically use the same settings as the branch you will be replacing.

    Restore branch compute settings

    With a compute added, you can now access to your restore branch and connect to its databases.

    Restore branch new compute

  4. Connect to the restore branch

    With a compute added, you can:

    • Access the branch from the Neon SQL Editor
    • Browse tables on the branch from the Tables page
    • Connect from your app or Postgres client using the restore branch connection string

    Click the Connect button to get the connection string.

    Restore branch connect modal

    The restore branch connection string differs from the snapshot's source branch. It has a different hostname because each Neon branch is a separate Postgres instance.

  5. Switch your app to the restore branch

    If you want to use the restore branch with your application, update your app to use the restore branch connection string. Before switching, pause write operations on the branch you are replacing, then resume them after switching to avoid data inconsistencies. Since Neon doesn't support read-only mode at the branch or database level, you'll need disable writes in your application.

    The restore branch name includes a timestamp and may be long. You can rename it. See Rename a branch for instructions.

Need help?

Join our Discord Server to ask questions or see what others are doing with Neon. Users on paid plans can open a support ticket from the console. For more details, see Getting Support.

Last updated on

Was this page helpful?