When attempting to set up a periodic backup I ran into a weird issue of not being able to use an absolute path – either via --files-from or directly specifying it when passing it on to the restic command.
Example: restic backup --compression max --verbose /home/sevos/x/y leads to this:
Fatal: unable to save snapshot: NodeFromFileInfo: Listxattr: xattr.list /home: permission denied
Current setup:
Using ENV variables: RESTIC_REPOSITORY and RESTIC_PASSWORD
Using the latest beta binary: restic 0.13.1-dev (compiled manually) compiled with go1.18 on freebsd/amd64
User, no root
As a workaround, I can go to the subdirectory and include/pass the main folder.
Example:
cd /home/sevos/x
restic backup --compression max y
That will work just fine. However, not perfect if I want to do multiple --files-from paths.
Is there any way to fix this nicely or is it particularly restic related issue?
Thanks! I’m on the road, that’s why I haven’t looked into it more. I’m very curious what the cause is though. Can you just for isolation purposes verify that you can successfully back up an absolute path that starts at the root of the disk and that does not contain any symlinks?
Also, can you show the output of mount as well as ls -la /usr/home?
I looked into this and I saw 2 workarounds there - one which I already mentioned before and the other which I just tried now by modifying the code in archiver.go.
After dropping the if statement and building restic again, the issue went gone. I was able to backup using an absolute path!
Hopefully this could be changed in the future release of restic? It seems to be a trivial fix but maybe I’m overlooking something here and it could affect the rest badly somehow?