CLI for backing up remote PostgreSQL databases locally or to AWS S3.
Pass in a full database URL, the storage driver, and destination. Adding a Gitignore File Before we commit anything, we're going to pull in a default Python .gitignore file from Github so that we don't track files in our repository that we don't need: Our Initial Commit Now that we've created our setup.py, README.md, and .gitignore files, we're in a good position to stage our changes and make our first commit: S3 Example w/ bucket name:
$ pgbackup postgres://[email protected]:5432/db_one --driver s3 backups
Local Example w/ local path:
$ pgbackup postgres://[email protected]:5432/db_one --driver local /
var/local/db_one/backups
To install the package after you've cloned the repository, you'll want to run the following command from within the project directory:
$ pip install --user -e .
Follow these steps to start developing with this project:
- Ensure
pip
andpipenv
are installed - Clone repository:
git clone [email protected]:example/pgbackup
cd
into the repository- Activate virtualenv:
pipenv shell
- Install dependencies:
pipenv install