Menu
Amazon Relational Database Service
API Reference (API Version 2014-10-31)

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 more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

DBClusterIdentifier

The name of the new DB cluster to be created.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens

  • First character must be a letter

  • Cannot end with a hyphen or contain two consecutive hyphens

Type: String

Required: Yes

DBSubnetGroupName

The DB subnet group name to use for the new DB cluster.

Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.

Example: mySubnetgroup

Type: String

Required: No

EnableIAMDatabaseAuthentication

A Boolean value that is true to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts, and otherwise false.

Default: false

Type: Boolean

Required: No

KmsKeyId

The KMS key identifier to use when restoring an encrypted DB cluster from an encrypted DB cluster.

The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are restoring a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KMS encryption key.

You can restore to a new DB cluster and encrypt the new DB cluster with a KMS key that is different than the KMS key used to encrypt the source DB cluster. The new DB cluster will be encrypted with the KMS key identified by the KmsKeyId parameter.

If you do not specify a value for the KmsKeyId parameter, then the following will occur:

  • If the DB cluster is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the source DB cluster.

  • If the DB cluster is not encrypted, then the restored DB cluster is not encrypted.

If DBClusterIdentifier refers to a DB cluster that is note encrypted, then the restore request is rejected.

Type: String

Required: No

OptionGroupName

The name of the option group for the new DB cluster.

Type: String

Required: No

Port

The port number on which the new DB cluster accepts connections.

Constraints: Value must be 1150-65535

Default: The same port as the original DB cluster.

Type: Integer

Required: No

RestoreToTime

The date and time to restore the DB cluster to.

Valid Values: Value must be a time in Universal Coordinated Time (UTC) format

Constraints:

  • Must be before the latest restorable time for the DB instance

  • Cannot be specified if UseLatestRestorableTime parameter is true

Example: 2015-03-07T23:45:00Z

Type: Timestamp

Required: No

SourceDBClusterIdentifier

The identifier of the source DB cluster from which to restore.

Constraints:

  • Must be the identifier of an existing database instance

  • Must contain from 1 to 63 alphanumeric characters or hyphens

  • First character must be a letter

  • Cannot end with a hyphen or contain two consecutive hyphens

Type: String

Required: Yes

Tags.Tag.N

A list of tags.

Type: Array of Tag objects

Required: No

UseLatestRestorableTime

A value that is set to true to restore the DB cluster to the latest restorable backup time, and false otherwise.

Default: false

Constraints: Cannot be specified if RestoreToTime parameter is provided.

Type: Boolean

Required: No

VpcSecurityGroupIds.VpcSecurityGroupId.N

A lst of VPC security groups that the new DB cluster belongs to.

Type: Array of strings

Required: No

Response Elements

The following element is returned by the service.

DBCluster

Contains the result of a successful invocation of the following actions:

This data type is used as a response element in the DescribeDBClusters action.

Type: DBCluster object

Errors

For information about the errors that are common to all actions, see Common Errors.

DBClusterAlreadyExistsFault

User already has a DB cluster with the given identifier.

HTTP Status Code: 400

DBClusterNotFoundFault

DBClusterIdentifier does not refer to an existing DB cluster.

HTTP Status Code: 404

DBClusterQuotaExceededFault

User attempted to create a new DB cluster and the user has already reached the maximum allowed DB cluster quota.

HTTP Status Code: 403

DBClusterSnapshotNotFoundFault

DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot.

HTTP Status Code: 404

DBSubnetGroupNotFoundFault

DBSubnetGroupName does not refer to an existing DB subnet group.

HTTP Status Code: 404

InsufficientDBClusterCapacityFault

The DB cluster does not have enough capacity for the current operation.

HTTP Status Code: 403

InsufficientStorageClusterCapacity

There is insufficient storage available for the current action. You may be able to resolve this error by updating your subnet group to use different Availability Zones that have more storage available.

HTTP Status Code: 400

InvalidDBClusterSnapshotStateFault

The supplied value is not a valid DB cluster snapshot state.

HTTP Status Code: 400

InvalidDBClusterStateFault

The DB cluster is not in a valid state.

HTTP Status Code: 400

InvalidDBSnapshotState

The state of the DB snapshot does not allow deletion.

HTTP Status Code: 400

InvalidRestoreFault

Cannot restore from vpc backup to non-vpc DB instance.

HTTP Status Code: 400

InvalidSubnet

The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC.

HTTP Status Code: 400

InvalidVPCNetworkStateFault

DB subnet group does not cover all Availability Zones after it is created because users' change.

HTTP Status Code: 400

KMSKeyNotAccessibleFault

Error accessing KMS key.

HTTP Status Code: 400

OptionGroupNotFoundFault

The specified option group could not be found.

HTTP Status Code: 404

StorageQuotaExceeded

Request would result in user exceeding the allowed amount of storage available across all DB instances.

HTTP Status Code: 400

Example

Sample Request

Copy
https://rds.us-west-2.amazonaws.com/ ?Action=RestoreDBClusterToPointInTime &DBClusterIdentifier=sample-restored-1 &RestoreToTime=2016-09-13T18%3A45%3A00Z &SignatureMethod=HmacSHA256 &SignatureVersion=4 &SourceDBClusterIdentifier=sample-cluster &Version=2014-10-31 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20160913/us-west-2/rds/aws4_request &X-Amz-Date=20160913T224930Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=e3b88945052247e82eaeaca6e269e7f6e18a36147b45c3b077bc600472e70de6

Sample Response

Copy
<RestoreDBClusterToPointInTimeResponse xmlns="http://rds.amazonaws.com/doc/2014-10-31/"> <RestoreDBClusterToPointInTimeResult> <DBCluster> <AllocatedStorage>1</AllocatedStorage> <DatabaseName>sample</DatabaseName> <AvailabilityZones> <AvailabilityZone>us-west-2a</AvailabilityZone> <AvailabilityZone>us-west-2b</AvailabilityZone> <AvailabilityZone>us-west-2c</AvailabilityZone> </AvailabilityZones> <PreferredBackupWindow>10:37-11:07</PreferredBackupWindow> <Endpoint>sample-restored-1.cluster-cnubrrfwfkg6.us-west-2.rds.amazonaws.com</Endpoint> <Engine>aurora</Engine> <ReaderEndpoint>sample-restored-1.cluster-ro-cnubrrfwfkg6.us-west-2.rds.amazonaws.com</ReaderEndpoint> <ReadReplicaIdentifiers/> <EngineVersion>5.6.10a</EngineVersion> <MasterUsername>mymasteruser</MasterUsername> <DBClusterMembers/> <StorageEncrypted>false</StorageEncrypted> <DBSubnetGroup>default</DBSubnetGroup> <HostedZoneId>Z1PVIF0B622C1W</HostedZoneId> <VpcSecurityGroups> <VpcSecurityGroupMembership> <VpcSecurityGroupId>sg-187c1671</VpcSecurityGroupId> <Status>active</Status> </VpcSecurityGroupMembership> </VpcSecurityGroups> <Port>3306</Port> <PreferredMaintenanceWindow>tue:11:51-tue:12:21</PreferredMaintenanceWindow> <DBClusterParameterGroup>default.aurora5.6</DBClusterParameterGroup> <BackupRetentionPeriod>1</BackupRetentionPeriod> <DBClusterIdentifier>sample-restored-1</DBClusterIdentifier> <DbClusterResourceId>cluster-U5ZXU3237H7YVCVKISDIXSQKUQ</DbClusterResourceId> <DBClusterArn>arn:aws:rds:us-west-2:123456789012:cluster:sample-restored-1</DBClusterArn> <Status>creating</Status> </DBCluster> </RestoreDBClusterToPointInTimeResult> <ResponseMetadata> <RequestId>54b75eef-7a04-15b6-aaa0-75ef834084a0</RequestId> </ResponseMetadata> </RestoreDBClusterToPointInTimeResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: