Giter Club home page Giter Club logo

postgres-s3-backup's Introduction

postgres-s3-backup is a Postgres backup helper that:

  • Takes the dump of the Postgres database
  • Uploads it to AWS' object storage service S3
  • Reports to WebGazer Pulse (optional)

Usage

Environment variables

Variable Required Default value Description
AWS_ACCESS_KEY_ID Access key id for the AWS account
AWS_REGION Region for the AWS bucket
AWS_S3_ENDPOINT AWS S3 endpoint with bucket and path (e.g. "my-bucket/postgres-backup")
AWS_SECRET_ACCESS_KEY Secret access key for the AWS account
POSTGRES_DB Postgres server database
POSTGRES_HOST postgres Postgres server host
POSTGRES_PASSWORD Postgres server password
POSTGRES_PORT 5432 Postgres server port
POSTGRES_USER postgres Postgres server user
POSTGRES_VERSION 15 Postgres server version (12, 13, 14 or 15)
WEBGAZER_PULSE_URL WebGazer Pulse URL

Running

$ docker run th0th/postgres-s3-backup \
    -e POSTGRES_HOST=<postgres_hostname[postgres]> \
    -e POSTGRES_PORT=<postgres_port[5432]> \
    -e POSTGRES_USER=<postgres_user[postgres]> \
    -e POSTGRES_PASSWORD=<postgres_password> \
    -e POSTGRES_DB=<database> \
    -e POSTGRES_VERSION=<postgres_version[15]> \
    -e AWS_ACCESS_KEY_ID=<aws_access_key_id> \
    -e AWS_SECRET_ACCESS_KEY=<aws_secret_access_key> \
    -e AWS_S3_ENDPOINT=<aws_s3_endpoint> \
    -e WEBGAZER_PULSE_URL=<webgazer_pulse_url>

Example

$ docker run th0th/postgres-s3-backup \
    -e POSTGRES_HOST=postgres \
    -e POSTGRES_PORT=5432 \
    -e POSTGRES_USER=postgres_user \
    -e POSTGRES_PASSWORD=postgres_password \
    -e POSTGRES_DB=database \
    -e POSTGRES_VERSION=15 \
    -e AWS_ACCESS_KEY_ID=g9XqNnqKmUk6xqwkStkN \
    -e AWS_SECRET_ACCESS_KEY=GLBZ8mQf27UL57YHbkLhXWtfJWVwtUBbQup6mFzw \
    -e AWS_S3_ENDPOINT=my-bucket/postgres-backup \
    -e WEBGAZER_PULSE_URL=https://pulse.webgazer.io/1-8f713c75d659

Shameless plug

I am an indie hacker, and I am running two services that might be useful for your business. Check them out :)

WebGazer

WebGazer

WebGazer is a monitoring service that checks your website, cron jobs, or scheduled tasks on a regular basis. It notifies you with instant alerts in case of a problem. That way, you have peace of mind about the status of your service without manually checking it.

PoeticMetric

PoeticMetric

PoeticMetric is a privacy-first, regulation-compliant, blazingly fast analytics tool.

No cookies or personal data collection. So you don't have to worry about cookie banners or GDPR, CCPA, and PECR compliance.

License

Copyright © 2022, Gokhan Sari. Released under the MIT License.

postgres-s3-backup's People

Contributors

th0th avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.