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
end

Core options

§ One row per option: default, env var, what it does.

optionenvnotes
prefixBB_PREFIXkey prefix in the store, default "database"
min_sizeBB_MIN_SIZEa dump smaller than this fails the run — the truncation guard
ignore_tablesBB_IGNORE_TABLESskip row data (audit trails, job history); restore recreates them empty
sentinel_keyBB_SENTINEL_KEYthe monitor's ping key; unset means no reporting
dump_commandfull 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