CopyClusterSnapshot
Copies the specified automated cluster snapshot to a new manual cluster snapshot. The source must be an automated snapshot and it must be in the available state.
When you delete a cluster, Amazon Redshift deletes any automated snapshots of the cluster. Also, when the retention period of the snapshot expires, Amazon Redshift automatically deletes it. If you want to keep an automated snapshot for a longer period, you can make a manual copy of the snapshot. Manual snapshots are retained until you delete them.
For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- SourceSnapshotIdentifier
-
The identifier for the source snapshot.
Constraints:
-
Must be the identifier for a valid automated snapshot whose state is
available.
Type: String
Required: Yes
-
- TargetSnapshotIdentifier
-
The identifier given to the new manual snapshot.
Constraints:
-
Cannot be null, empty, or blank.
-
Must contain from 1 to 255 alphanumeric characters or hyphens.
-
First character must be a letter.
-
Cannot end with a hyphen or contain two consecutive hyphens.
-
Must be unique for the AWS account that is making the request.
Type: String
Required: Yes
-
- SourceSnapshotClusterIdentifier
-
The identifier of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
Constraints:
-
Must be the identifier for a valid cluster.
Type: String
Required: No
-
Response Elements
The following element is returned by the service.
- Snapshot
-
Describes a snapshot.
Type: Snapshot object
Errors
For information about the errors that are common to all actions, see Common Errors.
- ClusterSnapshotAlreadyExists
-
The value specified as a snapshot identifier is already used by an existing snapshot.
HTTP Status Code: 400
- ClusterSnapshotNotFound
-
The snapshot identifier does not refer to an existing cluster snapshot.
HTTP Status Code: 404
- ClusterSnapshotQuotaExceeded
-
The request would result in the user exceeding the allowed number of cluster snapshots.
HTTP Status Code: 400
- InvalidClusterSnapshotState
-
The specified cluster snapshot is not in the
availablestate, or other accounts are authorized to access the snapshot.HTTP Status Code: 400
Example
Sample Request
Copyhttps://redshift.us-east-1.amazonaws.com/ ?Action=CopyClusterSnapshot &SourceSnapshotIdentifier=cm:examplecluster-2013-01-22-19-27-58 &TargetSnapshotIdentifier=my-snapshot-456 &Version=2012-12-01 &x-amz-algorithm=AWS4-HMAC-SHA256 &x-amz-credential=AKIAIOSFODNN7EXAMPLE/20130123/us-east-1/redshift/aws4_request &x-amz-date=20130123T014618Z &x-amz-signedheaders=content-type;host;x-amz-date
Sample Response
Copy<CopyClusterSnapshotResponse xmlns="http://redshift.amazonaws.com/doc/2012-12-01/"> <CopyClusterSnapshotResult> <Snapshot> <Port>5439</Port> <SnapshotIdentifier>my-snapshot-456</SnapshotIdentifier> <Status>available</Status> <SnapshotType>manual</SnapshotType> <ClusterVersion>1.0</ClusterVersion> <SnapshotCreateTime>2013-01-22T19:27:58.931Z</SnapshotCreateTime> <NumberOfNodes>2</NumberOfNodes> <DBName>dev</DBName> <ClusterCreateTime>2013-01-22T19:23:59.368Z</ClusterCreateTime> <AvailabilityZone>us-east-1c</AvailabilityZone> <NodeType>ds1.xlarge</NodeType> <ClusterIdentifier>examplecluster</ClusterIdentifier> <MasterUsername>adminuser</MasterUsername> </Snapshot> </CopyClusterSnapshotResult> <ResponseMetadata> <RequestId>aebb56f5-64fe-11e2-88c5-53eb05787dfb</RequestId> </ResponseMetadata> </CopyClusterSnapshotResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:



