Skip to content
/ pgbackup Public

Backup a postgresql db locally or to an AWS S3 bucket. Based on The Linux Academy python3 class.

Notifications You must be signed in to change notification settings

ahsec/pgbackup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgbackup

CLI for backing up remote PostgreSQL databases locally or to AWS S3

Preparing for development

  1. Ensure pip and pipenv are installed
  2. Clone repository: git clone [email protected]/ahsec/pgbackup
  3. cd into repository
  4. Fetch development dependencies make install
  5. Activate virtualenv: pipenv shell

Usage

Pass in a full database URL, the storage driver, and destination.

S3 Example with bucket name:

$ pgbackup postgres://[email protected]/5432/db_one --driver s3 backups

Local example with local path

$ pgbackup postgres://[email protected]/5432/db_one --driver local /var/local/db_one/backups

Running tests

Run tests locally using make if virtualenv is active:

$make

If virtualenv isn't active then use:

$pipenv run make

About

Backup a postgresql db locally or to an AWS S3 bucket. Based on The Linux Academy python3 class.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published