Linux – Backup to NFS with different user IDs

backuplinuxnfsrsync

I'm running Xubuntu and trying to back up my filesystem to an NFS share using rsync using the command:

rsync -vSHPhhaX --numeric-ids --delete --exclude-from=/home/rena/.scripts/exclude-list / /home/rena/video/.backup/>/home/rena/video/.backup.log

(/home/rena/video is the NFS share. The underlying filesystem is ext3.) This invocation doesn't work, because the server has different user IDs and group IDs than the local system, and NFS won't let me change a file's UID/GID to one that doesn't exist on the server.

Not finding any way to disable or bypass that restriction, I tried using the --fake-super option instead, to store the attributes another way. That didn't work either, and I'm not sure why – just lots of these messages instead:

rsync: delete of stat xattr failed for "/home/rena/video/.backup/bin/bzless": Operation not supported (95)
rsync: failed to write xattr user.rsync.%stat for "/home/rena/video/.backup/bin/fusermount": Operation not supported (95)

Does NFS4 not support the extended attributes? It seems like the only way to back up to an NFS share is if the user and group IDs are the same on both machines?

Best Answer

Because of this little hiccup, which seems unavoidable, you might want to consider alternative options... Such as, since you are using rsync, attempt using it as a server for the receiving end. That was it's intended use, after all. For any help, you can look at this site http://a1979shakedown.wordpress.com/2009/01/19/set-up-an-rsync-server-in-ubuntu-for-file-syncing-between-machines/ ; Or as another option, you can try sshfs instead of nfs for the across-network transfer. Just a couple of options.