Minor docs improvements

This commit is contained in:
Slavi Pantaleev 2021-04-05 11:13:45 +03:00
parent 0a107dc0ce
commit 37c089bb96
2 changed files with 20 additions and 8 deletions

View file

@ -4,14 +4,24 @@ The playbook can install and configure [docker-postgres-backup-local](https://gi
## Adjusting the playbook configuration
Minimal working configuration (`inventory/host_vars/matrix.DOMAIN/vars.yml`) to enable Postgres backup:
```yaml
matrix_postgres_backup_enabled: true
```
Refer to the table below for additional configuration variables and their default values.
| Name | Default value | Description |
| :-------------------------------- | :--------------------------- | :--------------------------------------------------------------- |
|matrix_postgres_backup_enabled|false|Set to true to use [docker-postgres-backup-local](https://github.com/prodrigestivill/docker-postgres-backup-local) to create automatic database backups|
|matrix_postgres_backup_schedule| '@daily' |Cron-schedule specifying the interval between postgres backups.|
|matrix_postgres_backup_keep_days|"7"|Number of daily backups to keep|
|matrix_postgres_backup_keep_weeks|"4"|Number of weekly backups to keep|
|matrix_postgres_backup_keep_months|"12"|Number of monthly backups to keep|
|matrix_postgres_backup_path | "{{ matrix_base_data_path }}/postgres-backup" | Storagepath for the database backups|
|`matrix_postgres_backup_enabled`|`false`|Set to true to use [docker-postgres-backup-local](https://github.com/prodrigestivill/docker-postgres-backup-local) to create automatic database backups|
|`matrix_postgres_backup_schedule`| `'@daily'` |Cron-schedule specifying the interval between postgres backups.|
|`matrix_postgres_backup_keep_days`|`"7"`|Number of daily backups to keep|
|`matrix_postgres_backup_keep_weeks`|`"4"`|Number of weekly backups to keep|
|`matrix_postgres_backup_keep_months`|`"12"`|Number of monthly backups to keep|
|`matrix_postgres_backup_path` | `"{{ matrix_base_data_path }}/postgres-backup"` | Storagepath for the database backups|
## Installing
@ -19,4 +29,4 @@ After configuring the playbook, run the [installation](installing.md) command ag
```
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
```
```

View file

@ -49,7 +49,9 @@ ansible-playbook -i inventory/hosts setup.yml --tags=run-postgres-vacuum,start
## Backing up PostgreSQL
To make a back up of the current PostgreSQL database, make sure it's running and then execute a command like this on the server:
To automatically make Postgres database backups on a fixed schedule, see [Setting up postgres backup](configuring-playbook-postgres-backup.md).
To make a one off back up of the current PostgreSQL database, make sure it's running and then execute a command like this on the server:
```bash
/usr/bin/docker exec \