Handling scaling events with pg_dump/pg_restore in Aurora?

483 views Asked by At

We use pg_dump and pg_restore to make backups of a database and mirror it to our staging and testing environments and this has worked well with RDS in AWS, but we have started working with Aurora and this process often fails with large databases because the scaling events close the connection and cause other problems.

Is there a recommended/better way to handle this in Aurora?

1

There are 1 answers

1
Milan Matějka On

(Supposing your both environment are Aurora)

Rather than implementing own back up mechanism, I would consider a slightly different approach. There is already AWS implementation of snapshot or back up [1] out of the box for Aurora. For example, you can take a snapshot of the cluster, share / copy the snapshot to your staging environment, do the restore.

[1] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/BackupRestoreAurora.html