I want to create a copy of my production aurora mysql database on a weekly basis. The copies will be used for development.
I like the clone feature of Aurora MySQL but unfortunately, the instructions to create these clones from AWS CLI are not clear.
Following the docs, I am able to create another Aurora cluster, but it doesn't create the DBs. It just creates an empty cluster. I am not able to figure out the commands to create a new Db inside this cluster from a snapshot of the Db in the source cluster as the restore-db-instance-from-db-snapshot is not supported for Aurora MySQL.
Please let me know the commands to clone the Aurora Cluster along with the DBs inside it.
According to the AWS documentation, this is a two phase process.
When you create a new cluster with:
aws rds restore-db-cluster-to-point-in-time \ 
  --source-db-cluster-identifier arn:aws:rds:eu-central-1:AAAAAAAAAAA:cluster:BBBBBBBBBB-cluster \ 
  --db-cluster-identifier YYYYYYYYYY-cluster \ 
  --restore-type copy-on-write \ 
  --use-latest-restorable-time
When this completes, data store has been created and is ready to be used but there are no aurora instances running.
The second step would be to create one (or more) instances:
aws rds create-db-instance \
  --db-cluster-identifier YYYYYYYYYY-cluster \ 
  --db-instance-class <value> \
  --engine <value>
  (other optional values)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With