Skeddly Blog

Skeddly news and announcements...

Copying RDS Aurora Snapshots

RDS cluster snapshots are snapshots created from Amazon RDS Aurora clusters. RDS snapshots created from MySQL, PostgreSQL, MariaDB, Oracle, and Microsoft SQL Server instances are different. Those are considered “DB snapshots” and are handled differently.

Aurora cluster snapshots are created from an Aurora cluster. All Aurora instances share the same underlying cluster data. So when you create a snapshot for Aurora, you are creating it from the cluster, not the instances.

The Aurora cluster snapshots can be copied for longer data retention beyond the standard RDS cluster snapshot lifetime, which maxes-out at 35 days. Also, the automated RDS snapshots are deleted when the RDS cluster is deleted. So if you need to preserve your data after the cluster is deleted, then you’ll need to make a copy of it yourself.

In this example, we’ll copy our RDS Aurora snapshot within the same region.

AWS Management Console

To copy RDS Aurora snapshots using the AWS Management Console, follow these steps.

Step 1: Find the snapshot that you want to copy, and select it by clicking the checkbox next to it’s name. You can select a “manual” snapshot, or one of the “automatic” snapshots that are prefixed by “rds:”.

Step 2: From the “Snapshot Actions” menu, select “Copy Snapshot”.

Step 3: On the page that appears:

  • Select the target region. In this case, we’re selecting the same region as the source snapshot.
  • Specify your new snapshot name in the “New Cluster Snapshot Identifier” field. This identifier must not already be used by a snapshot in the same region.
  • Check the “Copy Tags” checkbox if you want the tags on the source snapshot to be copied to the new snapshot.
  • Under “Encryption”, if your snapshot is encrypted, you can use the same KMS key, or choose another one. If your snapshot is not encrypted, you can choose to encrypt the copy by selecting a KMS key.
  • Click the “Copy Snapshot” button.

Step 4: Wait for the snapshot to complete.

Once the copy is initiated, you should return to the RDS snapshots page. Your new snapshot should appear in the list with a status of “creating”. The snapshot’s status will become “available” once the copy process is complete.

AWS CLI and SDKs

If you want to copy your RDS cluster snapshot using the AWS CLI, it can be done using the following command:

aws rds copy-db-cluster-snapshot \
    --source-db-cluster-snapshot-identifier my-source-snapshot \
    --target-db-cluster-snapshot-identifier target-snapshot

Note the command is copy-db-cluster-snapshot compared to copy-db-snapshot when copying a DB snapshot (MySQL, Microsoft SQL Server, etc). Cluster snapshots are listed and manipulated using “cluster” versions of the DB snapshot commands.

Operation DB Snapshots Cluster Snapshots
List Snapshots describe-db-snapshots describe-db-cluster-snapshots
Copy Snapshot copy-db-snapshot copy-db-cluster-snapshot
Delete Snapshot delete-db-snapshot delete-db-cluster-snapshot

Carrying on, if you want to change the encryption key used for the snapshot copy, then you can add the --kms-key-id argument.

aws rds copy-db-cluster-snapshot \
    --source-db-cluster-snapshot-identifier my-source-snapshot \
    --target-db-cluster-snapshot-identifier target-snapshot \
    --kms-key-id <kms key>

The KMS key used in this command can be either:

  • The KMS key ID (00000000-0000-0000-0000-000000000000),
  • The KMS key ARN (arn:aws:arn:us-east-1:123456789012:key/...), or
  • A KMS key alias (alias/my-alias)

Once you want to start copying your Aurora cluster snapshot into other AWS regions and/or AWS accounts, the commands get more complicated.

More on this later…

About Skeddly

Start automating your RDS backups today by signing up for our 30 day free trial or sign-in to your Skeddly account to get started.

<