Rsync fails to backup some files, giving error 22

backuprsync

I'm trying to backup my whole server using a simple rsync on a NFS mounted volume on '/nas'

Here's my rsync command

rsync -sav -S --stats -H --numeric-ids --delete -D 
--exclude-from="/usr/local/bin/rsync_nas1_exclude" / /nas1/

Getting the following error :

rsync: chown "/nas1/home/8003/.local/share/icons/application-x-wine-extension-its.png" 
failed: Invalid argument (22)

or

rsync: chown "/nas1/home/8003/.local/share/applications/wine/Programs/FxPro - Trader"     failed: Invalid argument (22)

Any idea why ? I use the '-s' param to protect file names

Best Answer

The error is on chown. My guess : your target NFS mount is a FAT32 or NTFS volume that doesn't support chown. You have two options : format it with a Linux filesystem like ext3, or drop rights and owners entirely ( --no-owner --no-group rsync options).

Related Topic