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 trying to use RSYNC to restore a backup. I am trying to restore all files by running the same command that the script runs to backup but with the destination and target switched around.

rsync -rltpqz --delete /users/home/username/

However I get this error...

/users/home/username/: is a directory
share|improve this question
Have you tried using the full directory path on the remote host? – kaptk2 Nov 17 '11 at 15:15
Use -v (--verbose) instead of -q (--quiet) to see what it say. – quanta Nov 17 '11 at 15:20
sent 6699 bytes received 7261735 bytes 73791.21 bytes/sec total size is 2544027491 speedup is 350.01 ./ line 24: /users/home/username/: is a directory – firefusion Nov 17 '11 at 15:40
Take out the --delete, you don't want to clobber any files not in the backup. – Andrew Nov 17 '11 at 23:34

You have to remain cognizant of the directory structures that you're working with. Rsync is not terribly consistent in how this is handled. Been bit a few times by this myself.

If you were backing up the directory named "username" to remotehost's /dir/ directory, you're going to want that directory with the slash from remotehost to go to /users/home on the local server.

rsync -avP /users/home/

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.