restoreDbClusterToPointInTime
Restores a DB cluster to an arbitrary point in time. Users can restore to any point in time before LatestRestorableTime
for up to BackupRetentionPeriod
days. The target DB cluster is created from the source DB cluster with the same configuration as the original DB cluster, except that the new DB cluster is created with the default DB security group.
For Aurora, this operation only restores the DB cluster, not the DB instances for that DB cluster. You must invoke the CreateDBInstance
operation to create DB instances for the restored DB cluster, specifying the identifier of the restored DB cluster in DBClusterIdentifier
. You can create DB instances only after the RestoreDBClusterToPointInTime
operation has completed and the DB cluster is available.
For more information on Amazon Aurora DB clusters, see What is Amazon Aurora? in the Amazon Aurora User Guide.
For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide.
Samples
fun main() {
//sampleStart
// The following example restores the DB cluster named database 4 to the latest possible time. Using
// copy on write as the restore type restores the new DB cluster as a clone of the source DB cluster.
val resp = rdsClient.restoreDbClusterToPointInTime {
dbClusterIdentifier = "sample-cluster-clone"
restoreType = "copy-on-write"
sourceDbClusterIdentifier = "database-4"
useLatestRestorableTime = true
}
//sampleEnd
}