Where Does BackRest Store Config and Data?
BackRest keeps config in ~/.config/backrest/config.json and runtime data in ~/.local/share/backrest.
Last updated
BackRest splits config from state. The JSON config defaults to ~/.config/backrest/config.json. The data directory with the database and managed restic binary defaults to ~/.local/share/backrest. The restic cache follows XDG_CACHE_HOME.
Three env vars override everything. BACKREST_CONFIG moves the config file. BACKREST_DATA moves the data dir. XDG_CACHE_HOME moves the cache. Docker setups map all three to volumes so recreating the container loses nothing.
Where BackRest stores this, by platform
~/.config/backrest/config.json and ~/.local/share/backrest
Config JSON plus data dir with database and restic binary. Override with BACKREST_CONFIG and BACKREST_DATA. Cache follows XDG_CACHE_HOME. Map all three as volumes in Docker.
~/.config/backrest/config.json and ~/.local/share/backrest
Same XDG layout under the home folder. Use Go to Folder for .config and .local. Env vars override the same way as Linux.
%LOCALAPPDATA%\Programs\Backrest (config via BACKREST_CONFIG)
Installer places the app under Programs with a tray helper. Config and data follow the same BACKREST_CONFIG and BACKREST_DATA vars. Set them before first launch when customizing.
Frequently asked questions
How do I move BackRest to a new machine?
Copy the config file plus the data directory to the same paths on the new host. Repos themselves stay where they are. Point BackRest at the same repo URLs after moving.
How do I persist BackRest in Docker?
Set BACKREST_CONFIG, BACKREST_DATA and XDG_CACHE_HOME in the compose file to mounted volumes. The container then writes config, database and restic cache outside throwaway layers. Keep all three mounts together.
Notice an outdated path? Let us know.