Skip to content

Commit

Permalink
Add documentation for dbbackup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoaugustine committed Jul 10, 2024
1 parent a9bdd78 commit e22797d
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions doc/dbbackup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# TL;DR

This script facilitates the management of database backup and restore within the Gen3 environment. It can establish policies, service accounts, roles, and S3 buckets. Depending on the command provided, it can initiate a database dump, perform a restore, migrate databases to a new RDS instance on Aurora, or clone databases to an RDS Aurora instance.

## Usage

```sh
gen3 dbbackup [dump|restore|va-dump|create-sa|migrate-to-aurora|copy-to-aurora]
```

### Commands

#### dump

Initiates a database dump and pushes it to an S3 bucket, creating the essential AWS resources if they are absent. The dump operation is intended to be executed from the namespace/commons that requires the backup.

```sh
gen3 dbbackup dump
```

#### restore

Initiates a database restore from an S3 bucket, creating the essential AWS resources if they are absent. The restore operation is meant to be executed in the target namespace where the backup needs to be restored.

```sh
gen3 dbbackup restore
```

#### create-sa

Creates the necessary service account and roles for DB copy.

```sh
gen3 dbbackup create-sa
```

#### migrate-to-aurora

Triggers a service account creation and a job to migrate a Gen3 commons to an AWS RDS Aurora instance.

```sh
gen3 dbbackup migrate-to-aurora
```

#### copy-to-aurora

Triggers a service account creation and a job to copy the databases Indexd, Sheepdog & Metadata to new databases within an RDS Aurora cluster.

```sh
gen3 dbbackup copy-to-aurora
```

0 comments on commit e22797d

Please sign in to comment.