... | @@ -8,6 +8,7 @@ This page will tell you the short and to the point stuff you need to know about |
... | @@ -8,6 +8,7 @@ This page will tell you the short and to the point stuff you need to know about |
|
- [4. Backup restore](#4-backup-restore)
|
|
- [4. Backup restore](#4-backup-restore)
|
|
- [4.1. Daily backup](#41-daily-backup)
|
|
- [4.1. Daily backup](#41-daily-backup)
|
|
- [4.2. Restore](#42-restore)
|
|
- [4.2. Restore](#42-restore)
|
|
|
|
- [5. Test locally using official (productional) backup](#5-test-locally-using-official-productional-backup)
|
|
|
|
|
|
|
|
|
|
# 1. Install
|
|
# 1. Install
|
... | @@ -41,6 +42,7 @@ Tab | Field | Value |
... | @@ -41,6 +42,7 @@ Tab | Field | Value |
|
--- | ----- | -----
|
|
--- | ----- | -----
|
|
Main | Host | `localhost`
|
|
Main | Host | `localhost`
|
|
Main | Database | name of database e.g. `wyatt`
|
|
Main | Database | name of database e.g. `wyatt`
|
|
|
|
Main | Show all databases | enabled
|
|
Main | Port | port of database e.g. `5432` or `25432`
|
|
Main | Port | port of database e.g. `5432` or `25432`
|
|
Main | Username | main user of this database e.g. `wyatt`
|
|
Main | Username | main user of this database e.g. `wyatt`
|
|
Main | Password | password of main user
|
|
Main | Password | password of main user
|
... | @@ -193,3 +195,13 @@ docker exec -t wyatt_${TARGET_ENV}_db pg_restore --verbose --create -Fc -U wyatt |
... | @@ -193,3 +195,13 @@ docker exec -t wyatt_${TARGET_ENV}_db pg_restore --verbose --create -Fc -U wyatt |
|
```
|
|
```
|
|
|
|
|
|
Afterwards you can safely start the application again. All should work now on the target environment but with a restored DB from that environment and that date.
|
|
Afterwards you can safely start the application again. All should work now on the target environment but with a restored DB from that environment and that date.
|
|
|
|
|
|
|
|
# 5. Test locally using official (productional) backup
|
|
|
|
|
|
|
|
These steps assume you have a path setup to the [standaard gears scripts](https://gitlab.xlrit.com/xlrit/gears/scripts/-/tree/main). Many scripts require parameters. Just run the script without any parameters to find out which you need to set.
|
|
|
|
|
|
|
|
1. Turn off any app already using the local DB.
|
|
|
|
2. Have a local Postgres DB running on port `5432` (see [Install](#1-install)). <br>_**Tip if you do not yet have a clean DB**: create a new temporary DB, set this as default, remove and recreate the databased called `postgres` and make that default again._
|
|
|
|
3. If not already done run `db-set-pass` for the local DB (this prevents you from entering it for every action the next command will perform)
|
|
|
|
4. Run: `db-restore-localhost` to restore the official backup to your localhost DB. It will download the file if needed.
|
|
|
|
5. Run your app with these profiles in your `.settings.json` file: `"gears.run.profiles": "local,postgres,liquibase",` |
|
|
|
\ No newline at end of file |