CLI for backing up remote PostgreSQL databases either locally or to S3 compatible storage.
- Ensure
pip
andpipenv
are installed. - Clone the repository:
git clone [email protected]: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://[email protected]:5432/test_db --driver s3 backups
Local Example with local path:
$ pgb postgres://[email protected]: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