Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm doing a backup from a ubuntu server to a windows machine running cygwin. I'm using the following command:

rsync -avx --timeout=30 --delete-excluded --exclude '.git' /cygdrive/c/temp/sitebackuprsync/

Is there a way (ie a command parameter) to avoid getting the 'Invalid argument 22' errors?


edit This is an example of one of the errors

rsync: chown "/cygdrive/c/temp/sitebackuprsync/tmp/cache/meta/f4/.3b896ab05c69a5c1da040df249f764a2fad29a.RHbrGk" failed: Invalid argument (22)
share|improve this question
From where you are executing this command. I mean from UBUNTU_server or from WINDOWS machine?. – Suku Apr 2 '11 at 2:25
I'm doing a pull, running this command on the windows machine to pull from the remote ubuntu machine. – Hawkeye Apr 2 '11 at 7:43
Can you show us the exact error message that you are seeing as well as sample filenames (if applicable). – Iain Apr 2 '11 at 12:48
up vote 1 down vote accepted

The -a flag to rsync includes a number of options that don't make sense on Windows; the error you're seeing indicates that rsync is trying and failing to preserve file ownership. Try using -rtvx instead of -avx.

share|improve this answer

Your Answer


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.