Introduction
Backups are a subject I return to semi-frequently with a passion to never be in an “oh shit” scenario. Last time I built my backup system, bacula with a postgresql DB backend, I determined that I would move to a common database backup script for all of my databases. Holland fit this bill perfectly with support for postgres, sqlite and mysql. This allows one command to backup all of my databases on all of my servers and subsequently creates a much simpler bacula configuration (the database job is defined the same as the catalog job).
The Solution
The problem I had when configuring holland to backup postgresql is that there was no example configuration file. It wasn’t hard to craft a working default postgres configuration and the following is what I came up with (/etc/holland/backupsets/default.conf:
[holland:backup] plugin = pgdump backups-to-keep = 1 auto-purge-failures = yes purge-policy = after-backup estimated-size-factor = 1.0 [pgdump] role = postgres [pgauth] username = postgres
Conclusion
Setting up holland to backup databases is incredibly easy and flexible. By having a common backup solution for all databases other configurations become easier and processes can be streamlined.