Skeddly Blog

Skeddly news and announcements...

Copying RDS Snapshots Between Regions

In our previous posts, I showed you how to copy your DB and Aurora snapshots to ensure they are preserved beyond the lifetime of your RDS instance. However, those copies were simply second copies in the same region as the original

In this post, I’ll show you how to copy your RDS snapshots to a second region for extra protection. Please note that I will restrict this post to unencrypted snapshots. Copying encrypted snapshots is more involved, so I’ll show that in a separate post.

AWS Management Console

To copy RDS snapshots to a secondary region 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 want to select a new region.
  • Specify your new snapshot name in the “New DB Snapshot Identifier” field. This identifier must not already be used by a snapshot in the target region. It can be the same ID as the original snapshot, since we are copying it to another region.
  • Check the “Copy Tags” checkbox if you want the tags on the source snapshot to be copied to the new snapshot.
  • Under “Encryption”, leave “Disable Encryption” selected.
  • Click the “Copy Snapshot” button.

Step 4: Wait for the snapshot to complete.

Once the copy is initiated, you should be returned to the RDS snapshots page. Since we are copying the snapshot to a different region, we won’t see the new snapshot in our snapshot list. Instead, select the target region from the menu in the top-right corner of the AWS Management Console. A new snapshot list should appear with your new snapshot.

AWS CLI and SDKs

When copying RDS snapshots using the AWS Management Console, the workflow looks like a “push”. We’re selecting the snapshot in the source region and “pushing” it to the new region.

However, when working with the AWS CLI and SDKs, RDS snapshots are instead “pulled” from the source region to the target region. The copy command is initiated against the target region, specifying the full path to the source snapshot.

To copy an RDS DB snapshot, you use the following command:

aws rds copy-db-snapshot \
    --region <target region> \
    --source-db-snapshot-identifier <source snapshot arn> \
    --target-db-snapshot-identifier target-snapshot-id

Two very important things to notice in the above command:

  • We’ve specified the --region argument to specify the target region into which the snapshot will be copied, and
  • The source snapshot identifier is specified as the full ARN of the snapshot, like arn:aws:rds:us-east-1:123456789012:snapshot:source-snapshot-id

The above command works for RDS snapshots using the following engines:

  • MySQL
  • PostgreSQL
  • MariaDB
  • Oracle
  • Microsoft SQL Server

If the snapshot that you want to copy is an Aurora cluster snapshot, then you would use the copy-db-cluster-snapshot command instead of copy-db-snapshot. Otherwise, the arguments are the same.

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.

<