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:
--config <path>flag (explicit)/etc/calmbackup/calmbackup.yaml(system-wide)~/.config/calmbackup/calmbackup.yaml(user-level)./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: 7Configuration fields
| Field | Required | Description |
|---|---|---|
api_key | Yes | Your API key from the dashboard. |
encryption_key | Yes | Generated locally by calmbackup init. Never sent to our servers. |
database.driver | Yes | mysql, pgsql, or sqlite |
directories | No | Additional directories to include in every backup. |
local_retention_days | No | Days 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 →