An open-source CLI tool for backing up PostgreSQL database Locally or to Amazon S3 bucket
You will pass in the following on the command line:
- The CLI command
backup
- The
database URL
you need to connect to - The
storage driver (S3 or Local)
- The
destination (S3 bucket or local path)
$ pip install backupdb
$ backupdb postgres://[USERNAME]:[PASSWORD]@[SERVER_IP:80/<db_name> --driver <driver_type> <destination>
$ backupdb postgres://[USERNAME]:[PASSWORD]@[SERVER_IP:80/<db_name> --driver s3 mybucket01
$ backupdb postgres://[USERNAME]:[PASSWORD]@[SERVER_IP:80/<db_name> --driver local /var/local/mybackup.sql
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 git@github.com:sharhan-alhassan/backupdb
cd
into the repository- Activate virtualenv
source /venv/bin/activate
- Install dependencies:
pip install -e .
orpip install -r requirements