刘凡 9ff4d1d109 add S3,archive,truncate | 2 年之前 | |
---|---|---|
.. | ||
README.md | 2 年之前 | |
backup_pg_to_s3.py | 2 年之前 |
Script that backs up PostgreSQL Database and uploads it to an Amazon S3 Bucket
from backup_pg_to_s3 import PGBackupDB
pg_backup = PGBackupDB('my-s3-bucket', './db_file_backup.gz', 'username', 'password', 'example_db')
pg_backup.create_db_backup()
pg_backup.push_backup_to_s3()
pg_backup.delete_db_backup()