A simple CLI utility for backing up PostgreSQL databases.
Project description
backupdb
An open-source CLI tool for backing up PostgreSQL database Locally or to Amazon S3 bucket
Usage
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)
Installation
$ pip install backupdb
Syntax
$ backupdb postgres://[USERNAME]:[PASSWORD]@[SERVER_IP:80/<db_name> --driver <driver_type> <destination>
Example usage for S3 backup
$ backupdb postgres://[USERNAME]:[PASSWORD]@[SERVER_IP:80/<db_name> --driver s3 mybucket01
Example usage for Local backup
$ backupdb postgres://[USERNAME]:[PASSWORD]@[SERVER_IP:80/<db_name> --driver local /var/local/mybackup.sql
Installation From Source
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 .
Preparing for Development
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
backupdb-0.0.5.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file backupdb-0.0.5.tar.gz
.
File metadata
- Download URL: backupdb-0.0.5.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68f9b30755ae0be8d2cc9c5b1a9f2ea4cfe08e9d5f64f3b4cde23e8837b36304 |
|
MD5 | 6e1842f1b817558c14e1a9dc537f7154 |
|
BLAKE2b-256 | 46ad9e26e2bb8526bd1a78c27a1132e2db5d2dc1ce59923628f4617eeac5a7de |
File details
Details for the file backupdb-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: backupdb-0.0.5-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5f5e6ed8b3793aa7280e5e59d390a94f8137cc69e62483c3d4ad594ac6b502e |
|
MD5 | 2e42bdf37315c02da418951128c4808b |
|
BLAKE2b-256 | cc88b0a31624a95f68256b6b681cef8dae06160f67dac56a9682c933228551da |