From 37c089bb96b6fbf09989ee29ab478e60e7018ec6 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 5 Apr 2021 11:13:45 +0300 Subject: [PATCH] Minor docs improvements --- docs/configuring-playbook-postgres-backup.md | 24 ++++++++++++++------ docs/maintenance-postgres.md | 4 +++- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/docs/configuring-playbook-postgres-backup.md b/docs/configuring-playbook-postgres-backup.md index 7be0064f..2b58b1aa 100644 --- a/docs/configuring-playbook-postgres-backup.md +++ b/docs/configuring-playbook-postgres-backup.md @@ -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 -``` \ No newline at end of file +``` diff --git a/docs/maintenance-postgres.md b/docs/maintenance-postgres.md index d43a5dc7..9b748d28 100644 --- a/docs/maintenance-postgres.md +++ b/docs/maintenance-postgres.md @@ -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 \