RestoreDBClusterToPointInTime - Amazon Neptune

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.

Note

This action only restores the DB cluster, not the DB instances for that DB cluster. You must invoke the CreateDBInstance action 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 action has completed and the DB cluster is available.

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 letters, numbers, or hyphens

  • First character must be a letter

  • Cannot end with a hyphen or contain two consecutive hyphens

Type: String

Required: Yes

DBClusterParameterGroupName

The name of the DB cluster parameter group to associate with the new DB cluster.

Constraints:

  • If supplied, must match the name of an existing DBClusterParameterGroup.

Type: String

Required: No

DBSubnetGroupName

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

Constraints: If supplied, must match the name of an existing DBSubnetGroup.

Example: mySubnetgroup

Type: String

Required: No

DeletionProtection

A value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection is disabled.

Type: Boolean

Required: No

EnableCloudwatchLogsExports.member.N

The list of logs that the restored DB cluster is to export to CloudWatch Logs.

Type: Array of strings

Required: No

EnableIAMDatabaseAuthentication

True to enable mapping of Amazon Identity and Access Management (IAM) accounts to database accounts, and otherwise false.

Default: false

Type: Boolean

Required: No

KmsKeyId

The Amazon 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 Amazon 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 is 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 not encrypted, then the restore request is rejected.

Type: String

Required: No

OptionGroupName

(Not supported by Neptune)

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

  • Must be specified if UseLatestRestorableTime parameter is not provided

  • Cannot be specified if UseLatestRestorableTime parameter is true

  • Cannot be specified if RestoreType parameter is copy-on-write

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

Type: Timestamp

Required: No

RestoreType

The type of restore to be performed. You can specify one of the following values:

  • full-copy - The new DB cluster is restored as a full copy of the source DB cluster.

  • copy-on-write - The new DB cluster is restored as a clone of the source DB cluster.

If you don't specify a RestoreType value, then the new DB cluster is restored as a full copy of the source DB cluster.

Type: String

Required: No

ServerlessV2ScalingConfiguration

Contains the scaling configuration of a Neptune Serverless DB cluster.

For more information, see Using Amazon Neptune Serverless in the Amazon Neptune User Guide.

Type: ServerlessV2ScalingConfiguration object

Required: No

SourceDBClusterIdentifier

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

Constraints:

  • Must match the identifier of an existing DBCluster.

Type: String

Required: Yes

StorageType

Specifies the storage type to be associated with the DB cluster.

Valid values: standard, iopt1

Default: standard

Type: String

Required: No

Tags.Tag.N

The tags to be applied to the restored DB cluster.

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 list 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 details of an Amazon Neptune DB cluster.

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

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

DBClusterParameterGroupNotFound

DBClusterParameterGroupName does not refer to an existing DB Cluster parameter group.

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 designated 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

See Also

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