gem
Configuration
The initializer is the whole surface; every option has an env-var twin.
The initializer
# config/initializers/boring_backup.rb
BoringBackup.configure do |config|
config.sentinel_key = ENV["BB_SENTINEL_KEY"]
config.prefix = "database"
config.min_size = 2048
config.ignore_tables = %w[versions logs]
config.register(:s3) do |store|
store.bucket = "acme-backups"
store.region = "eu-central-1"
end
endCore options
§ One row per option: default, env var, what it does.
| option | env | notes |
|---|---|---|
| prefix | BB_PREFIX | key prefix in the store, default "database" |
| min_size | BB_MIN_SIZE | a dump smaller than this fails the run — the truncation guard |
| ignore_tables | BB_IGNORE_TABLES | skip row data (audit trails, job history); restore recreates them empty |
| sentinel_key | BB_SENTINEL_KEY | the monitor's ping key; unset means no reporting |
| dump_command | — | full pg_dump override for the exotic cases |
Database connection
§ Resolution order: explicit config.pg_* → ActiveRecord's
connection config (Rails apps need nothing) → standard PG* environment variables.
Sentinel reporting
§ Setting sentinel_key is the whole integration — after every run
the gem POSTs the report to the ping URL (3 attempts, backoff, warns-never-raises: a dead
sentinel can't fail a backup). sentinel_host for self-hosted or staging.
Notifiers
§ Stdout is on by default; Slack posts the run result to a channel — distinct from sentinel's alerting: the gem tells you what happened, sentinel tells you when nothing did.
config.notifier(:slack) do |slack|
slack.webhook_url = "https://hooks.slack.com/services/…"
end