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.
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:
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.
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:
--region
argument to specify the target region into which the snapshot will be copied, andarn:aws:rds:us-east-1:123456789012:snapshot:source-snapshot-id
The above command works for RDS snapshots using the following engines:
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.
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.