Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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).

share|improve this answer
    
The partition is ext3; but i need to keep the owner/group that's why i use the 'numeric-ids' option –  Disco Dec 17 '10 at 15:52
    
Is your NAS running Linux or some other Unix flavour? –  wazoox Dec 17 '10 at 20:10
    
Linux of course ... –  Disco Jan 3 '11 at 15:23

I've been having the same problem for a long time with no solution in sight. The issue seems to be that NFS won't let you change a file's UID/GID to ones that don't exist on the server:

# for a local file, it works fine:
rena@akira:~ $ sudo chown -v 999:999 testfile 
changed ownership of `testfile' to 999:999

# but if the file is on an NFS share, it fails:
rena@akira:/mnt/yuki $ sudo chown -v 999:999 testfile
chown: changing ownership of `testfile': Invalid argument
failed to change ownership of `testfile' to 999:999

It seems this is a bit of a design flaw in NFS; you can't use it to back up files owned by someone who doesn't exist on the server. But maybe there's a way to disable this check?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.