CLI for backing up remote PostgreSQL databases locally or to AWS S3
- Ensure
pipandpipenvare installed - Clone repository:
git clone git@github.com/ahsec/pgbackup cdinto repository- Fetch development dependencies
make install - Activate virtualenv:
pipenv shell
Pass in a full database URL, the storage driver, and destination.
S3 Example with bucket name:
$ pgbackup postgres://bob@example.com/5432/db_one --driver s3 backups
Local example with local path
$ pgbackup postgres://bob@example.com/5432/db_one --driver local /var/local/db_one/backups
Run tests locally using make if virtualenv is active:
$make
If virtualenv isn't active then use:
$pipenv run make