Restic always reports all directories "changed"


restic: 0.14.0 compiled with go1.19 on linux/amd64

data source:
//storage/data on /mnt/storage type cifs (rw,relatime,vers=3.1.1,cache=strict,username=XXXX,domain=XX,uid=0,noforceuid,gid=0,noforcegid,addr=,file_mode=0755,dir_mode=0755,soft,nounix,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,_netdev,x-systemd.automount)

restic […] -r sftp::dados -s sftp backup --ignore-inode --ignore-ctime --one-file-system /mnt/storage/

Sync always returns:
Dirs: 0 new, 7001806 changed, 0 unmodified
processed 14082443 files, 2.441 TiB in 23:22:30

Its’s has taken approximately 24 hours.
All directories are updated.
When directories are stored locally, this change does not take place.
Does anyone know how to get around this?

Probably the device identifier changed.

Or how it gets handled.

I didn’t understand.
You can explain better?

Restic stores some metadata, among this metadata, there is the device identifier, or something that can be used as that.

As far as I understand this information is required to restore hardlinks.

I am aware that there is an open issue that describes problems like yours when using filesystem snapshots as an extra layer to backup from.

As for these the IDs are constantly changing.

As you are obviously backing up from a temporary mount, I assume that your problems are related to that identifier.

CIFS could also have other metadata, which makes restic always assume that the folder has changed. I never used it in practice, just read about it as an alternative to SMB.

Thanks for your explanation.
I will check if it is possible to change the mount protocol to NFS.

I suggest going through File change detection in the documentation:

Specifically --ignore-inode is likely to bypass this issue.

I used this parameter, but it didn’t change the checking of directories.
The documentation says: “Change detection is only performed for regular files (not special files, symlinks or directories) …”