Skip to content

Commit

Permalink
restore without db-migrator, so cockroachdb backup can be restored
Browse files Browse the repository at this point in the history
  • Loading branch information
JorritSalverda committed Sep 27, 2021
1 parent 3a75418 commit 1fe5d25
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions content/getting-started/disaster-recovery/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ helm repo update
helm diff upgrade estafette-ci estafette/estafette-ci -n estafette-ci --values local-values.yaml --set api.secret.secretDecryptionKey=<base64 encoded secret decryption key>
# apply changes
helm upgrade --install estafette-ci estafette/estafette-ci -n estafette-ci --create-namespace --values local-values.yaml --timeout 600s --set api.secret.secretDecryptionKey=<base64 encoded secret decryption key>
helm upgrade --install estafette-ci estafette/estafette-ci -n estafette-ci --create-namespace --values local-values.yaml --timeout 600s --set api.secret.secretDecryptionKey=<base64 encoded secret decryption key> --set db-migrator.enable=false
```

Any of the secret values you might use can be passed with the `--set` argument. Make sure you've stored these commands somewhere secure, like in a password manager, so you don't have to figure out all of the secrets when trying to restore functionality.

Note: the `db-migrator` component needs to be disabled if the database needs to be restored from a backup, otherwise it already creates database tables which makes it impossible for a backup to be restored.

## CockroachDB restore backup

If you've following the instructions in the [Production / high availability]({{< relref "../production-high-availability" >}}) section you've already set up a daily backup for Estafette's Cockroachdb database.
Expand Down Expand Up @@ -62,4 +64,6 @@ Once you're done best to disable the _db-client_ again by updating the values to
```yaml
db-client:
enabled: false
```
```
and making sure to either pass `--set db-migrator.enable=true` to `helm upgrade` or skip overriding this value completely. This will let the `db-migrator` perform any schema changes that still need to happen, although with a daily backup the schema should be up to date.

0 comments on commit 1fe5d25

Please sign in to comment.