Linux

Where Is the Borgmatic Config File?

Borgmatic main config path and drop-in folders on Linux, plus how to generate and override them per user.

Last updated

Borgmatic reads a single YAML file that describes sources, repositories, and retention. System wide backups use /etc/borgmatic/config.yaml. That file is created with borgmatic config generate and edited by hand. Spaces matter here, tabs break the parse.

User backups live in a parallel path. The per user file is ~/.config/borgmatic/config.yaml with drop-ins in ~/.config/borgmatic.d. Pass --config when the file sits elsewhere. Cron jobs as root read the /etc path, while systemd user timers read the home directory one.

Where Borgmatic stores this, by platform

Linux
/etc/borgmatic/config.yaml

Generated by borgmatic config generate. Drop-in snippets in /etc/borgmatic.d get merged automatically. Root cron and system timers use this path.

Linux
~/.config/borgmatic/config.yaml

Same schema as the system file. Create it with --destination to avoid touching /etc. Respects XDG config home when that variable is set.

Frequently asked questions

how do i use Borgmatic without root

Run borgmatic config generate --destination ~/.config/borgmatic/config.yaml and pass --config when running. System cron jobs keep using /etc/borgmatic/config.yaml, so per user files suit desktop backups better.

can i split Borgmatic config across several files

Yes. Drop extra YAML files into /etc/borgmatic.d for system jobs or ~/.config/borgmatic.d for user jobs. Borgmatic merges them with the main file, which keeps each backup set in its own file.

Notice an outdated path? Let us know.