Restore your data to previous state
Neon retains a history of changes for all branches, enabling point-in-time restore. This feature allows you to restore data to any point within the retention period. You can use the point-in-time restore feature as a database backup strategy, to view the past state of your database, or to recover lost data.
You can configure the History retention setting in the Neon Console, under Settings > Storage. For further instructions, see Configure history retention.
Increasing the history retention period affects all branches in your Neon project and increases project storage. You can scale History retention down to zero if reducing storage cost is more important than the ability to restore your data to a past state.
History is retained in the form of Write-Ahead-Log (WAL) records. As WAL records age out of the retention period, they are evicted from storage and no longer count toward project storage.
A point-in-time restore operation is performed by creating a branch using the Time or LSN option. Your History retention period dictates how far back you can restore your data. To learn how to perform a point-in-time restore operation, refer to Branching — Point-in-time restore.