Minimalist periodic maintenance script for PostgreSQL.
This repository has been archived on 2025-01-15. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2024-04-04 14:07:18 +02:00
pg_maintenance.py First commit 2024-04-04 14:07:18 +02:00
README.md First commit 2024-04-04 14:07:18 +02:00

pg maintenance

Minimalist periodic maintenance script for PostgreSQL.

Disclaimer and licensing

This software has been created for personal purposes and may therefore not suit your needs. However, you may use it under the terms of the MIT License.

Requirements

  • Python 3
  • psql / pg_dump
  • rsync

Actions

This runs VACUUM and ANALYZE on a specified database. If at least one recipient is specified, it also builds a reports and email it to said recipients.

To know more about routine vacuuming, please read PostgreSQL's documentation.

Basic usage

pg_maintenance.py --help
pg_maintenance.py "db_name" --destination "user@remote:/your/backup/path" --email-recipient "admin@exemple.org"