Create and restore application backups
Amazon Aurora is a fully managed database which offers automatic periodical backups and point-in-time recovery. The easiest way to backup and restore your LAMP Production Ready database is by using the Amazon RDS console. Follow the instructions below:
Although Amazon Aurora offers automatic periodical backups, it is possible to create manually a backup of both your database and application files by creating snapshots. Follow the steps below:
Create an Amazon Aurora database snapshot
By default, Amazon RDS snapshots are done periodically depending on the Amazon RDS (Aurora) configuration parameters defined when deploying the CloudFormation template. You can access the database snapshots from the Amazon RDS console.
To force a database snapshot before deleting your solution, follow these steps:
- Browse to the Amazon RDS console
- Choose the primary instance (with role “Writer”) for the Aurora database cluster.
Select the “Actions -> Take snapshot” menu item.
In the “Take DB Snapshot” dialog, enter a name for the snapshot in the “Snapshot Name” field and click the “Take Snapshot” button.
A snapshot of the database will now be created and saved.
TIP: If you want to delete your LAMP Production-Ready deployment, it is highly recommended to perform a set of pre / post-deletion operations to avoid data loss. Follow these instructions to learn how to keep your data safe before and after deleting your deployment.
Set backup preferences
Navigate to the CloudFormation console and select the Aurora stack associated to your LAMP Production-Ready:
Select the “Resources” tab and click on the AuroraDBPrimaryInstance “Physical ID” link:
In the Amazon RDS dashboard, select the “Automated backups” section from the left side menu:
The resulting screen shows the list of “Active backups”. You can set your backup preferences by clicking the settings icon:
To restore your database in time it is necessary to create a new database instance taking your current database instance as a source. Follow the steps below to begin the process:
In the Amazon RDS dashboard, select the “Automated backups” section from the left side menu, select the backup you want to restore, and click “Actions -> Restore to point in time”:
In the resulting screen, select the time you want to restore from and specify the configuration for your new instance. Once you have set all values, click “Restore to point in time”. This starts the restoring process.
The new instance will be created, you can access it from the “Databases” dashboard: