Data backup and recovery service for the CALYPR systems π
Tip
The recommended use of the backup-service is through deploying to a K8s cluster for automated daily backups.
β helm repo add ohsu https://ohsu-comp-bio.github.io/helm-charts
β helm upgrade --install backups ohsu/backupsTip
Manual backups (and restorations) can be done through the CLI
β git clone git@github.com:calypr/backup-service.git
Cloning into 'backup-service'...
β cd backup-service
β python3 -m venv venv && source venv/bin/activate
β pip install -r requirements.txt
β pip install -e .
β bak --help
Usage: bak [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
-v, --verbose, --debug Enable verbose (DEBUG) logging.
--help Show this message and exit.
Commands:
backup Postgres β S3
download S3 β local
dump Postgres β local
ls List databases
restore S3 β Postgres
upload local β S3β bak pg dump \
--host localhost \
--port 5432 \
--user postgres \
--password PASSWORD \
--dir DIRβ bak grip backupβ bak s3 upload \
--dir DIR \
--endpoint ENDPOINT \
--bucket BUCKET \
--key KEY \
--secret SECRETβ bak pg restore \
--host localhost \
--port 5432 \
--user postgres \
--password PASSWORD \
--dir DIRβ bak grip restoreβ bak s3 download \
--dir DIR \
--endpoint ENDPOINT \
--bucket BUCKET \
--key KEY \
--secret SECRETsequenceDiagram
participant Backup as Backup Service
participant Database
participant S3 as S3 Bucket
Title: Gen3 Backups
Backup-->>Database: Database Credentials
Note over Database: `pg_dump`
Database-->>Backup: Database Backup
Backup-->>S3: Database Backup
| Service | Postgres Database | Database Backup Name | Description |
|---|---|---|---|
| Arborist | arborist-EXAMPLE |
arborist-EXAMPLE-TIMESTAMP |
Gen3 policy engine |
| Fence | fence-EXAMPLE |
fence-EXAMPLE-TIMESTAMP |
AuthN/AuthZ OIDC service |
| Gecko | gecko-EXAMPLE |
gecko-EXAMPLE-TIMESTAMP |
Frontend configurations for dynamic data loading |
| Indexd | indexd-EXAMPLE |
indexd-EXAMPLE-TIMESTAMP |
Data indexing and tracking service |
| Requestor | requestor-EXAMPLE |
requestor-EXAMPLE-TIMESTAMP |
Data access manager |
Tip
The alternative options below work on the K8s resources themseleves (e.g. PVC/PV) as opposed to database resources (e.g. Postgres tables, ElasticSearch indices)