Improve the readme
This commit is contained in:
parent
f056eebbd4
commit
e23e66b650
1 changed files with 10 additions and 2 deletions
12
README.md
12
README.md
|
@ -18,8 +18,10 @@ However, you may use it under the terms of the [MIT License][mit_license].
|
||||||
|
|
||||||
## Actions
|
## Actions
|
||||||
|
|
||||||
This runs [VACUUM][doc_vacuum] and [ANALYZE][doc_analyze] on a specified database.
|
This script:
|
||||||
If at least one recipient is specified, it also builds a reports and email it to said recipients.
|
- runs [VACUUM][doc_vacuum] and [ANALYZE][doc_analyze] on a specified database;
|
||||||
|
- creates compressed backup file and sends it to the destination (requires a destination);
|
||||||
|
- builds a reports and email it to recipients (requires at least one recipient).
|
||||||
|
|
||||||
To know more about routine vacuuming, please read [PostgreSQL's documentation][doc_why_vacuum].
|
To know more about routine vacuuming, please read [PostgreSQL's documentation][doc_why_vacuum].
|
||||||
|
|
||||||
|
@ -31,6 +33,12 @@ pg_maintenance.py --help
|
||||||
pg_maintenance.py "db_name" --destination "user@remote:/your/backup/path" --email-recipient "admin@exemple.org"
|
pg_maintenance.py "db_name" --destination "user@remote:/your/backup/path" --email-recipient "admin@exemple.org"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Restore a backup:
|
||||||
|
|
||||||
|
```
|
||||||
|
zstdcat "2024-04-04_db_name.sql.zst" | psql --set ON_ERROR_STOP=on
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
[mit_license]: https://opensource.org/license/mit
|
[mit_license]: https://opensource.org/license/mit
|
||||||
[doc_why_vacuum]: https://www.postgresql.org/docs/current/routine-vacuuming.html
|
[doc_why_vacuum]: https://www.postgresql.org/docs/current/routine-vacuuming.html
|
||||||
|
|
Loading…
Reference in a new issue