SharpChiCity / pg-dump-s3

A simple script that dump a postgresql database and upload to a bucket in AWS S3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run with Python3

Create a secrets.py file with the credentials and config values.

DATABASE_NAME = '<date-base-name>'

DATABASE_DUMP_NAME = '<data-base-dump-file.sql>'

BUCKET_NAME = '<s3-bucket-destination>'

ACCESS_KEY = '<aws-access-key>'

SECRET_KEY = '<aws-secret-key>'

EMAIL_ORIGIN = '<aws-ses-confirmed-email>'

EMAIL_DESTINATION = ['<list-of-destination-emails>']

Install boto3: pip install boto3

And run with command: python3 pg_backup.py

About

A simple script that dump a postgresql database and upload to a bucket in AWS S3

License:MIT License


Languages

Language:Python 100.0%