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

Configuring Automatic Backups

Set up backups every

To configure automatic backups using AWS Data Lifecycle Manager,

  1. In the EC2 menu, under "Elastic Block Store", select "Lifecycle Manager"

  2. Select "Create Lifecycle Policy"

  3. In the main (i.e first) section,

    1. Under "Policy type", leave the default: EBS snapshot policy

    2. Under "Select resource type", select "Instance"

    3. Description (Example): Backup PostgreSQL server

    4. Under "Target with these tags", select the tag you created during your Launch Template Setup. EX. PostgreSQL (Key), Database (Value

  4. In "IAM Role" section,

    1. Leave as defaults

  5. In "Policy Schedule 1" section,

    1. Schedule name (Example): Server Daily Backup

    2. Frequency (Example): Daily

    3. Every (Example): 24 hours

    4. Starting at (Example): 9:00 UTC (4 AM EST)

    5. Retention type (Example): Count

    6. Interval (Example): 5

  6. Leave the other sections as their defaults

  7. Select "Create Policy"

Now every resource that has our PostgreSQL tag, including our instance, will be backed up daily at 4AM EST, and we will only keep five of our backups at a time.

PreviousOverviewNextNext Steps

Last updated 4 years ago

Was this helpful?