Amazon Relational Database Service
Command Line Interface Reference (API Version 2013-09-09)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

rds-copy-db-snapshot

Description

Creates a copy of all data and configuration associated with the specified DB snapshot. You can copy an automated DB snapshot to create a manual DB snapshot in the same region, the manual snapshot will be retained after the automated snapshot is deleted. You can also copy either a manual or automated snapshot in one region to create a manual snapshot in another region.

Copying a DB snapshot out of the source region incurs Amazon RDS data transfer charges. For more information about RDS data transfer pricing, go to Amazon Relational Database Service Pricing.

Note

You cannot copy a DB snapshot to or from the AWS GovCloud (US) Region. You also cannot copy a DB snapshot across regions if it was created from a DB instance that is using Oracle TDE.

Syntax

rds-copy-db-snapshot SourceDBSnapshotIdentifier

-t (--target-db-snapshot-identifier) value

[General Options]

Options

NameDescriptionRequired

SourceDBSnapshotIdentifier

Source DB snapshot identifier. This is the unique name that identifies an existing DB snapshot to copy.

This parameter can also be set using --source-db-snapshot-identifier value

Type: String

Default: None

Constraints:

  • Must specify a valid DB snapshot in the active state.

  • If the source snapshot is in the same region as the copy command, must specify a valid DB snapshot identifier.

    Example: --source-db-instance-identifier mydbsnapshot

  • If the source snapshot is in a different region, must specify a valid DB snapshot ARN. For more information, go to Copying a DB Snapshot.

    Example: --source-db-instance-identifier arn:aws:rds:us-east-1:123456789012:snapshot:mysql-instance1-snapshot-20130805

Yes

-t value

--target-db-snapshot-identifier value

The identifier for the target DB snapshot.

Type: String

Default: None

Constraints: Cannot be null, empty, or blank. Cannot be a word reserved by the database engine. Must contain 1 to 255 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens.

Example: -t my-copied-snapshot-id

Yes

Output

The command returns the following information:

Note

Output values list the possible values returned by CLI commands. Not all values are returned for every call to a command. If a value is null or empty, it will not be included in the command output. For example, CLI commands to create or restore a DB instance will not return the Endpoint Address value because that value is null until the DB instance has finished being created or restored.

  • DBSnapshotId—Name of the DB snapshot

  • Snapshot Created—The time (in 24 hour UTC) when the DB snapshot was taken

  • DBInstanceId—User-supplied database identifier; this is the unique key that identifies a DB instance

  • Instance Created—The date and time when the DB instance was created

  • Engine—The name and version of the database engine used

  • Storage—The size of the DB snapshot's allocated storage (GB)

  • Status—Status of the DB snapshot. Valid values: creating | available | deleting

  • Master Username—The login name of the database's master user.

  • AZ—The original Availability Zone of the database from which the DB snapshot was taken. This column appears only in the --show-long view

  • Port—The original port of the database from which the DB snapshot was taken. This column appears only with the --show-long-view command option

  • Version—The database engine's version number.

  • License—TBD

  • Type—TBD

  • VpcId—TBD

Examples

Copy a Database Snapshot

This example copies an automated DB snapshot to create a manual DB snapshot in the same region.

PROMPT> rds-copy-db-snapshot -s rds:mydb-2012-01-15-00-01 -t snapshotdec01
                    

Copy a DB Snapshot Across Regions

This example copies a manual DB snapshot in the us-east-1 region to create a manual DB snapshot in the us-west-2 region.

PROMPT> rds-copy-db-snapshot --source-db-snapshot-identifier arn:aws:rds:us-east-1:123456789012:snapshot:mysql-instance1-snapshot-20130805 --region us-west-2 --target-db-snapshot-identifier mysql-instance1-snapshot-20130805-copy