/plushcap/analysis/neon/neon-nightly-backups-for-multiple-neon-projects

How to Set Up Nightly Backups to AWS S3 for Multiple Neon Projects

What's this blog post about?

This post explains how to set up nightly backups for multiple Neon Postgres databases using GitHub Actions and pg_dump/restore. The process involves three main components: AWS, Postgres Database, and GitHub Action. The author demonstrates the setup with a single S3 bucket holding multiple folders, each containing backup files created by a GitHub Action. The code discussed in this post covers a single Action, but the same method can be applied to multiple Actions. The GitHub repository secrets are used for secure access and interaction with AWS services. The steps involved include installing PostgreSQL, configuring AWS credentials, setting file, folder, and path variables, creating folders if they don't exist, running pg_dump, emptying the bucket of old files (optional), and uploading to the bucket.

Company
Neon

Date published
Oct. 29, 2024

Author(s)
Paul Scanlon

Word count
1035

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.