RayDB LogoRayDB

Point-in-time recovery

Point-in-Time Recovery (PITR) allows you to restore your RayDB PostgreSQL cluster to a specific timestamp within the backup retention window. This is useful for recovering from accidental data loss, corruption, or unwanted modifications.

When to Use PITR

  • Accidental Data Deletion: Recover lost records by restoring to a point before deletion.
  • Data Corruption: Roll back to a consistent state before corruption occurred.
  • Application Errors: Undo unintended schema or data changes.

How PITR Works

PITR utilizes continuous write-ahead logs (WAL) stored alongside automatic backups, allowing restoration to any point within the backup retention period.

Performing a PITR Restore

  1. Log in to the RayDB Dashboard.
  2. Navigate to the Clusters section and select the target cluster.
  3. Open the Backups tab.
  4. Click Point-in-Time Restore.
  5. Enter the exact timestamp (UTC) to which you want to restore.
  6. Confirm and start the restore process.
  7. The restoration will begin, and you’ll be notified when the cluster is ready.

Considerations

  • Retention Window: PITR is only available for the duration of stored backups (e.g., last 7 or 30 days).
  • Temporary Downtime: The cluster will be briefly unavailable during the restore process.
  • Data Consistency: Ensure that all dependent services account for data changes after a restore.

Best Practices

  • Regularly Monitor WAL Storage: Ensure WAL logs are retained properly.
  • Test PITR in a Staging Environment: Validate the recovery process periodically.
  • Use PITR for Production Safety: If running mission-critical workloads, enable PITR as a safeguard.

For more details on backup strategies, visit Automatic and Manual Backups.

On this page