-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Better Postgres Backup Strategy #473
Comments
Note: in a pinch, adding DBSnapshotIdentifier to the pgDB Properties in serverless.yml will work. This is a manual way to restore a downed database.
|
After we have an effective backup strategy, we can finally replace some of our configs where "Update Requires Replacement." Namely, DBInstanceIdentifier. We could implement human-readable names instead of the auto-generated names that AWS gives them. It would be really helpful when doing admin work/cleanup in the AWS GUI. |
Continued from #429
The Plan:
Creating and testing the manual backup and restore scripts will be the biggest task. But I think it's better than the alternatives I've found:
Alternative 1)
Instead of a manual backup/restore, we could restore with a Snapshot Backup. This can be done by adding the DBSnapshotIdentifier Property to our CloudFormation template in serverless.yml. I don't like this idea for a couple reasons. That Property would have to remain in our serverless.yml forever, lest we want to replace(delete) our database again. Keeping that Property there could lead to some unwanted side effects. We would be prohibited from changing some Properties in our serverless.yml script (particularly the master password). Also, we might be forced to keep that snapshot forever, potentially crippling our CloudFormation Stack if it were ever to be accidentally deleted (https://serverfault.com/questions/762932/what-happens-when-we-remove-the-snapshotidentifier-from-our-cloudformation-confi).
Alternative 2)
AWS has a function called RestoreDBInstanceFromDBSnapshot. However, we then would not be able to perform updates on that DB Instance within our current serverless.yml setup.
Feel free to comment with thoughts and ideas.
Documentation about RDS CloudFormation Properties can be found here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html
The text was updated successfully, but these errors were encountered: