CLI for backing up remote PostgreSQL Databases and store the backup file either locally or to AWS S3 service.
- Ensure
python3.6
,pip3.6
andpipenv
are installed. - Clone repository:
git clone git@github.com:raminderis/pgbackup
cd
into the repository- Fetch development dependencies
make isntall
- Activate virtualenv:
pipenv shell
Pass in a full database URL, the storage driver, and the destination.
S3 Example w/ bucket name:
This is a preformatted text block. $ pgbackup postgres://bob@example.com:5432/db_one --driver s3 backups-bucket
Local Example w/ local path:
$ pgbackup postgres://bob@example.com:5432/db_one --driver local /var/local/db_one/backups/dump.sql
Run tests locally using make
if virtualenv is active:
$ make
If virtualenv isn't active then use:
$ pipenv run make