I have two parallel setups: one for the user (several months old), one for the whole system (new). A backup script runs via cron and works well for both with a nearly identical script.
(un)mounting the user one has no problems. The second one reliably works (no errors in /var/log/syslog), but the mount point turns from a directory to a garbage ‘file’. Access is thereby impossible.
I guess there is some config or permission problem to explain the difference. I spent a lot of time making sure setups are identical, but just don’t see it. Some details below
Any pointers would be most welcome, thanks! Martin
before mount:
ls -al /media/restic/
drwxrwxrwx 2 restic restic 4096 Aug 5 11:21 browse-restic
drwxrwxrwx 3 restic restic 3 Aug 4 12:58 fullback
then run
$ restic -r /media/restic/fullback/smallbox -p /home/restic/bin/pw.txt mount /media/restic/browse-restic
repository xxxx opened successfully, password is correct
Now serving the repository at /media/restic/browse-restic
When finished, quit with Ctrl-c or umount the mountpoint.
ls -al /media/restic/
d????????? ? ? ? ? ? browse-restic
drwxrwxrwx 3 restic restic 3 Aug 4 12:58 fullback
after ctrl-c I am back to what I had before. That happens permanently.
The essentially identical command for the user works fine:
restic -r /media/martin/linback -p /home/martin/bin/pw.txt mount /media/martin/browse-restic
/etc/fstab is identical for both. The setup and permissions on the server side are identical (freeNAS)
# for user backup
x.x.x.10:/mnt/nasvol/linux-back /media/martin/linback nfs4 rw,noauto,x-systemd.automount,user,_netdev 0 0
# for system backup
x.x.x.10:/mnt/nasvol/sysback /media/restic/fullback nfs4 rw,noauto,x-systemd.automount,user,_netdev 0 0