backrest icon indicating copy to clipboard operation
backrest copied to clipboard

error finding or installing restic

Open saltarob opened this issue 4 months ago • 3 comments

I installed Restic with Homebrew and then I installed Backrest with Homebrew and when I start the Backrest service I get following error:

2025-08-21T01:53:35.629+0300 [34mINFO[0m restic binary /Users/video/.local/share/backrest/restic failed version validation: check if restic binary exists: stat /Users/video/.local/share/backrest/restic: no such file or directory

Why is trying to find the restic binary in .local/share/backrest/restic and not in the default location where Homebrew installs it: /opt/homebrew/bin/restic

How can I fix it?

Thank you.

saltarob avatar Aug 20 '25 23:08 saltarob

The error you see indicates that backrest didn't find the homebrew install of restic.

The install.sh script sets the PATH variable for the launchd item to https://github.com/garethgeorge/backrest/blob/main/install.sh#L98 , restic must be discoverable in one of those locations.

garethgeorge avatar Aug 21 '25 06:08 garethgeorge

Thank you very much for your answer. The given path /usr/local/bin only applies to Intel-based Macs, which are no longer produced. On Apple silicon, Homebrew installs binaries in /opt/homebrew/bin.

Apple silicon:

 % brew --prefix  
/opt/homebrew

Intel-based Mac:

% brew --prefix  
/usr/local

Could this be updated accordingly? Thank you.

saltarob avatar Aug 21 '25 10:08 saltarob

Even after symlinking the binary into /usr/local/bin and reinstalling backrest, it still doesn’t work.

% which -a restic
/opt/homebrew/bin/restic
/usr/local/bin/restic

This is the LaunchAgent that brew services loads:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>homebrew.mxcl.backrest</string>
	<key>LimitLoadToSessionType</key>
	<array>
		<string>Aqua</string>
		<string>Background</string>
		<string>LoginWindow</string>
		<string>StandardIO</string>
		<string>System</string>
	</array>
	<key>ProgramArguments</key>
	<array>
		<string>/opt/homebrew/opt/backrest/bin/backrest</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>StandardErrorPath</key>
	<string>/opt/homebrew/var/log/backrest.log</string>
	<key>StandardOutPath</key>
	<string>/opt/homebrew/var/log/backrest.log</string>
</dict>
</plist>

It doesn’t set any PATH?

saltarob avatar Aug 21 '25 11:08 saltarob