Documentation

Your source. Your configuration.

Configure database access, included directories, local retention and the encryption key.

All guides
A technical field guide with an amber bookmark and file tiles

Ask AI about CalmBackup

See what it does, who it’s for, and whether it fits your needs.

Opens with product context and a link to this page.

View or copy the prompt

Configuration reference

Most users won't need to edit the config file directly — calmbackup init handles it. But if you need fine-grained control:

Config file location

Searched in order:

  1. --config <path> flag (explicit)
  2. /etc/calmbackup/calmbackup.yaml (system-wide)
  3. ~/.config/calmbackup/calmbackup.yaml (user-level)
  4. ./calmbackup.yaml (current directory)

Full config example

api_key: "ak_live_..."
encryption_key: "64-char-hex-key"

database:
  driver: mysql         # mysql | pgsql | sqlite
  host: "127.0.0.1"
  port: 3306
  database: "myapp"
  username: "root"
  password: "secret"
  # path: "/path/to.db" # sqlite only

directories:            # optional
  - /var/www/app/uploads

local_path: "/var/backups/calmbackup"
local_retention_days: 7

Configuration fields

FieldRequiredDescription
api_keyYesYour API key from the dashboard.
encryption_keyYesGenerated locally by calmbackup init. Never sent to our servers.
database.driverYesmysql, pgsql, or sqlite
directoriesNoAdditional directories to include in every backup.
local_retention_daysNoDays to keep local backups. Default: 7.

Keep API access and encryption separate

The API key authenticates the source. The encryption key opens the archive. Do not use one in place of the other, commit either to source control, or paste them into support messages.

Changing encryption keys

A new key protects subsequent backups only. Old archives still require their original key. Keep the matching key for every retained backup period.

Understand local retention

local_retention_days controls the local cache. It does not define cloud retention. The CLI uses cloud-confirmed filenames when deciding which older local backups are eligible for pruning.

Understand the encryption format →