CLI for backing up remote PostgreSQL databases either locally or to S3 compatible storage.
- Ensure
pip
andpipenv
are installed. - Clone the repository:
git clone git@github.com:akkowicz/pgb
cd
into the repository.- Fetch development dependencies
make install
- Activate virtualenv:
pipenv shell
Pass in a full DB URL, the storage driver, and the destination.
S3 Example with bucket name:
$ pgb postgres://adam@example.com:5432/test_db --driver s3 backups
Local Example with local path:
$ pgb postgres://adam@example.com:5432/test_db --driver local /var/local/test_db/backups/dump.sql
Run tests locally using make
if virtualenv is active.
$ make
If virtualenv isn't active then use:
$ pipenv run make