"Stale file handle" backing NFS mount

Using ubuntu xenial and trying to backup files from a legacy server, mounted using NFS.

Duplicati fails with error:

w32error-unix.c: unknown error (116) “Stale file handle”

I think it may be related to NFS mount, any idea of why it happens (and how to solve it)?

thanks

“A filehandle becomes stale whenever the file or directory referenced by the handle is removed by another host, while your client still holds an active reference to the object. A typical example occurs when the current directory of a process, running on your client, is removed on the server (either by a process running on the server or on another client).”

umount and remount the nfs directory on duplicati system or mount with “noac” option.

From man nfs:
"To improve performance, NFS clients cache file attributes. Every few seconds, an NFS client checks the server’s version of each file’s attributes for updates. Changes that occur on the server in those small intervals remain undetected until the client checks the server again. The noac option prevents clients from caching file attributes so that applications can more quickly detect file changes on the server.

In addition to preventing the client from caching file attributes, the noac option forces application writes to become synchronous so that local changes to a file become visible on the server immediately. That way, other clients can quickly detect recent writes when they check the file’s attributes.

Using the noac option provides greater cache coherence among NFS clients accessing the same files, but it extracts a significant performance penalty. As such, judicious use of file locking is encouraged instead. The DATA AND METADATA COHERENCE section contains a detailed discussion of these trade-offs."

I know this is an old topic but I wasn’t sure if I should start a new one or add to this one.

I don’t understand this stale file handle problem and I’m looking for some direction.

I have an Unraid server that presents a Backups folder via NFS.

I have a small form factor PC running Ubuntu 22.04 LTS (server install). I’m running Docker here and have both Plex and Duplicati containers running.

The fstab on the Ubuntu server includes this line:

# <file system> <mount point> <type> <options> <dump> <pass>
nnn.nnn.n.nn:/mnt/user/Backups /mnt/Backups nfs nfsvers=3,noac 0 0

I have a simple Duplicati backup scheduled daily at 1pm. If I reboot the Unraid server during what I’d assume would be a safe time (not around 1pm), Duplicati starts reporting a stale file handle problem.

When I access the Duplicati web page, if I “edit” the test backup job, when I get to the step where I’m selecting the NFS-mounted destination, there’s nothing to select.

When I Putty into the Ubuntu server, I can successfully ls the NFS Backups mount point.

When I restart the Duplicati container things start working again.

This seems crazy to me. The Ubuntu PC seems to handle the NFS-mounted Backups folder going away during a Unraid reboot. Can see the mount point and files when the Unraid server comes back. But the Duplicati Docker container seems to lose its connection and doesn’t recover. (The Plex container appears to do the same thing so I’m wondering if this is some sort of Docker thing?)