I’m new to restic and wanted to test out restore before going all-in. I’m having trouble restoring to TrueNAS Scale via NFS.
I can backup to and restore from the NAS without issue. But when I try to restore TO the NAS, whether from a VM or from the NAS itself, I get the following error for every single file and directory:
ignoring error for /repo/path/file.txt: xattr.LRemove /target/path/file.txt system.nfs4_acl: invalid argument
The only reference to this error I found was an issue on ZFS github from years ago. I don’t understand it.
TrueNAS is running on a dedicated box with an NFSv3/NFSv4 share with UNIX permissions and all users are mapped to 1000:1000 (my user on all machines). As the only user, I haven’t had the need to implement ACL.
The restore is not interrupted, restic ends with:
Summary: Restored X / N files/dirs (7.421 KiB / 7.421 KiB) in 0:00
Fatal: There were N errors
The weird thing is: the files are restored. I can see them, I inspected them, they look OK. Permissions make sense. But when I see Fatal in reference to my backups, I’m not one to ignore it and don’t want to succumb to alarm fatigue. Any help or direction would be appreciated. Thank you.
I appreciate the link, but that didn’t do it either. I changed permissions to a SMB/NFSv4 (going so far as to create a new dataset in TrueNAS as well). I set ACL mode to passthrough and it still didn’t work. I disabled mapall users and groups as well since in the ACL the owner & group was the same as my user. No dice.
It’s just so odd because I can backup to the shares without issue. It’s not like there some read/write issue. I can chmod without issues as well.
I think I was able to solve this one. I don’t understand yet why it’s happening though.
Files in the share have the extended attribute of system.nfs4_acl. This includes other files shared on the NAS added through other means (i.e. not restic restore).
According to the docs, restic normally keeps extended attributes when restoring. restic restore has the flag --exclude-xattr. So I included --exclude-xattr system.nfs4_acl and it restored without error. After restoring, I checked xattr on the files, and they had the system.nfs4_acl applied to them.
I wonder if that xattr gets applied when files are added to the share, but restic was trying to remove them since they wouldn’t have had them when backed up.