Creating a Postgres disaster recovery automation plan
![](https://www.socallinuxexpo.org/sites/default/files/styles/square_thumbnail/public/speakers/nina_0.png?itok=FJGhC0EN)
By utilizing scripting languages such as Ruby, and tooling provided by Postgres, it is possible to create a customized, automated disaster recovery process for a Postgres database server that will create proper notifications upon success and helpful error handling tailored to the needs of the environment it is designed to recover. By taking the time to understand more about the workings of Postgres and automate the restoration process, disaster recovery becomes smoother and easier to manage in event of failure.
Through steps such as spinning up a preconfigured server in an environment such as AWS EC2, fetching WAL files and restoring them accordingly, and finally reporting back results and analytics about the recovered server, disaster recovery under pressure becomes a lot more feasible. Being able to confidently recover and provide a report on restored data about an important database server allows for less stress and more attention to other important areas of focus that may be under fire.