Create a PostgreSQL Server Using AWS EC2
  • Introduction
  • AWS EC2: Launching Instance
    • Overview
    • Create Security Group
    • Create Launch Template
    • Option 1: Create Auto Scaling Group
    • Option 2: Create a Single Instance
    • Attach Elastic IP Address
  • Ubuntu 20.04: Configuring PostgreSQL
    • Overview
    • Install PostgreSQL
    • Add Role to PostgreSQL Server
    • Allow Remote Connection
  • Remote Server: Accessing Server on Local Computer
    • Overview
    • Connect with pgAdmin4
    • Connect with Python API
  • AWS EC2: Backup Server
    • Overview
    • Configuring Automatic Backups
  • Next Steps
Powered by GitBook
On this page

Was this helpful?

  1. AWS EC2: Backup Server

Overview

Backup the server to ensure your server and data will not be lost in the event of an instance failure

PreviousConnect with Python APINextConfiguring Automatic Backups

Last updated 4 years ago

Was this helpful?

Now that your server is configured and running, we now want our server to be backed up on a regular basis to ensure your server and data will not be lost in the event of an instance failure. We can use AWS Data Lifecycle Manager to regularly back up our master EC2 instance and all of the resources with our PostgreSQL/Database tag.

During backups with this method, the instance will be stopped for a couple of seconds during your designated backup period (). Recall that when we set up our auto scale group we suspended the "ReplaceUnhealthy" process, so our master instance will not be terminated by this backup. Also, we attached an elastic IP address to our instance, so our public IP address will not change every time we do a backup.

References

(1) Better Programming (Medium), How to Provision a Cheap PostgreSQL Database in AWS EC2,

(2) Better Programming (Medium), Create Easy Disk Snapshots with AWS Data Lifecycle Manager,

1
https://medium.com/better-programming/how-to-provision-a-cheap-postgresql-database-in-aws-ec2-9984ff3ddaeamedium.com
Create Easy Disk Snapshots With AWS Data Lifecycle ManagerMedium
Logo