Where Does autorestic Store Its Config?
autorestic reads .autorestic.yml from the current folder, home, or XDG config. Docker images mount it at /etc/autorestic instead.
Last updated
autorestic searches three spots in order: .autorestic.yml in the current directory, ~/.autorestic.yml in home, and ~/.config/autorestic/.autorestic.yml under XDG. The -c flag overrides all of them. A sibling .autorestic.env file next to the config holds secrets, with environment variables winning over both.
The config defines locations (what to back up) and backends (where snapshots go) plus forget policies. Backend keys get written back into the file on first use, which surprises people who version it publicly. Keep a copy of the keys somewhere safe: encrypted snapshots without keys are just noise, and nobody can recover them for you.
Where autorestic stores this, by platform
~/.autorestic.yml
Locations, backends, and forget policies in YAML. Searched in cwd, home, then XDG config. The .autorestic.env sibling holds secrets; shell env vars override both. Linux and macOS share this layout.
~/.autorestic.yml
Same search order on macOS. Docker images instead expect the file at /etc/autorestic/config.yml with locations under /var/lib/autorestic. Mount all three paths when containerizing.
Frequently asked questions
how do i migrate autorestic to a new machine
Copy .autorestic.yml to the new host and guard the backend keys inside it (or the .autorestic.env beside it). Without those keys the snapshots exist but nothing can read them. Test with autorestic check before the first real backup.
does autorestic work on windows
Linux and macOS only. There is no Windows build, so Windows users back up through WSL or pick resticprofile. The config format is identical on both supported platforms.
Notice an outdated path? Let us know.