Skip to main content
Mistakes happen: a bad schema change, deleted rows, or an Agent session that went sideways. Replit gives you a recovery path for each database.

Restore your development database

You can revert your app and development database to a previous state using the rollback feature. This restores your database to any checkpoint created by Agent.
Checkpoint rollback interface showing rollback
options
Make sure to select “Database” under “Additional rollback options” when restoring to the state of a checkpoint. This restores your database to the state it was at the time of the checkpoint.

Restore your production database

For production databases, you can restore to a specific moment using point-in-time restore.
Database rollbacks interface showing rollback
options
How far back you can restore depends on your plan and your retention setting. Core retains up to 7 days of history, while Pro and Enterprise retain up to 28 days. Every plan starts at 7 days, and you can change the window in your production database’s settings. Longer windows use more storage, so extending retention increases your usage costs. If you downgrade from Pro to Core, your retention window is reduced to 7 days.
Restoring your database doesn’t restore your app’s code, and rolling back your app doesn’t restore your database. To bring both back to the same moment: restore the database, then roll back to the matching checkpoint and publish your app again.

Schedule production database backups

Scheduled backups create one full restore point each day. Replit schedules the backup near midnight in your browser’s current time zone when you enable or update the schedule.
  1. Open the Database tool and select the production database.
  2. Open Settings, then expand Scheduled backups under Advanced.
  3. To enable scheduled backups, select a retention period under Keep backups for.
The available retention periods depend on your plan. Core supports up to 7 days. Pro and Enterprise support up to 28 days.

Storage costs

Replit meters each production database storage category separately:
Database storage costs are currently discounted by 100%.
The $0.35 logical storage charge applies whether you use PITR, scheduled backups, or both. Scheduled backup storage costs less per GiB than PITR storage. If daily restore points meet your needs, scheduled backups with a shorter PITR window can reduce recovery storage costs. Your total backup cost depends on the stored backup volume and retention period. PITR provides more restore points within its window. Scheduled backups provide one restore point per day, so select the recovery method that matches your needs.
The schedule uses your current UTC offset. A daylight-saving change can move the backup time by one hour until you update the schedule. Time zones with fractional offsets use the nearest hour.

Restore a scheduled backup

  1. Open Scheduled backups in the production database settings.
  2. Select View all backups.
  3. Select Restore for the restore point that you want.
  4. Enter restore, then select Continue.
The restore switches your database to the selected backup data. It does not delete the current data, but connected services can briefly reconnect.

Troubleshooting publishing failures

If publishing fails due to database issues:
  1. Check the publishing logs for specific error messages about database connectivity or schema conflicts
  2. Review recent schema changes for potential conflicts with existing application code
  3. Test your changes in a deployment preview before attempting to republish

Next steps