mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 14:30:28 -05:00
Serve RestoreDBInstanceToPointInTime and RestoreDBClusterToPointInTime, and report the restorable window: LatestRestorableTime on DescribeDBInstances, EarliestRestorableTime and LatestRestorableTime on DescribeDBClusters. Requests are checked as the API reference describes: exactly one of RestoreTime (RestoreToTime) and UseLatestRestorableTime, a time inside the window or InvalidRestoreFault, PointInTimeRestoreNotEnabled for an instance with backups off, and exactly one source. An instance source is named by identifier or DbiResourceId, a cluster source by identifier, ARN or DbClusterResourceId; automated backups ARNs answer DBInstanceAutomatedBackupNotFound since no automated backups are kept. Floci keeps no transaction log, so the target is seeded from a pg_dumpall of the source taken when the request arrives, as read replicas are. The restored data is the source's latest state for any time in the window, and LatestRestorableTime is the current time. Only PostgreSQL sources are accepted, as for CreateDBSnapshot. Closes #4952