0

I run a rsync task every midnight using the following command:

rsync -ahzP --stats --update --delete-before --delete-excluded --exclude "*.log" --exclude temp /mnt/raid/ /mnt/backups > /root/ext_backup.log 2>&1

/mnt/backups is a NFS mount.

The backup process runs smoothly for about half an hour, then I get the following error:

rsync: [receiver] write failed on "/my/file": Input/output error (5)
rsync: [receiver] chown "/my/file" failed: Permission denied (13)
rsync error: error in file IO (code 11) at receiver.c(378) [receiver=3.2.3]

rsync: [sender] write error: Broken pipe (32)

What could be the problem?

alex3025
  • 27
  • 2
  • 9
  • 1
    the output is self explanatory on what's wrong. further info will require more details on the file – Alex Jan 24 '22 at 19:16
  • @Alex what further info do you need? – alex3025 Jan 24 '22 at 19:25
  • According to the error message, `rsync` doesn't have permission to change the owner (`chown`) of the file. This is probably due to how the NFS mount permissions are set up and/or what user `rsync` is running as. – Gordon Davisson Jan 24 '22 at 20:35
  • @GordonDavisson rsync is running as root, and I allowed "Everyone" to r/w to the directory (NFS share from Windows Server 2022). – alex3025 Jan 24 '22 at 22:11
  • @alex3025 you need `no_root_squash` to keep root mapping on the server. Otherwise root will be mapped to nobody and chown will fail. – kofemann Jan 25 '22 at 08:57
  • @kofemann so I need to allow `no_root_squash` on my NFS server or client? – alex3025 Jan 25 '22 at 13:43
  • This is en export option in the server – kofemann Jan 25 '22 at 14:11
  • @kofemann I can't find where enable that option in Windows Server. – alex3025 Jan 25 '22 at 14:33
  • No idea how it done under windows. May be this links will help https://techcommunity.microsoft.com/t5/storage-at-microsoft/nfs-identity-mapping-in-windows-server-2012/ba-p/424602 – kofemann Jan 25 '22 at 16:42

1 Answers1

1

To fix this problem it was necessary to check the "Allow root access" checkbox.

enter image description here

alex3025
  • 27
  • 2
  • 9