AJ222
AJ222

Reputation: 1134

Aurora- clone production db as a qa db daily

We have an aurora database(aws) that we use for production. We would like to have a clone database that will be updated on a daily basis and will be used for qa(one way sync from the production to qa db). What is the best way to do it? Thanks

Upvotes: 1

Views: 1478

Answers (2)

Sherms
Sherms

Reputation: 1646

There's an open source Python Library that can do this for you, or you could take a look at that approach and do the same:

https://github.com/blacklocus/aurora-echo

Upvotes: 1

Eckd
Eckd

Reputation: 358

You can launch following script daily:

  1. Convert production automatic snapshot to manual: aws rds copy-db-cluster-snapshot

  2. Now you can share your manual snapshot with test account: aws rds modify-db-snapshot-attributes --attribute-name restore --values-to-add dev-account-id

  3. Restore your snapshot to cluster with aws rds restore-db-cluster-from-snapshot
  4. Add instance
  5. Rename db cluster to (it is about 10 seconds)
  6. Rename db cluster to (it is about 10 seconds)
  7. If new cluster works, you can delete cluster with instances.

Upvotes: 0

Related Questions