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 back up users Chrome Sessions with Rsync with the following command:

rsync -e "ssh -i new.key" -r --verbose -tz --stats --progress --delete \
'/cygdrive/c/Users/jay/AppData/Local/Google/Chrome/User Data/Default/Current Session' \
user@host:"/chrome sessions/"

Except this doesn't work exactly, as I get a file called chrome in a sessions directory that is already present on the server.

Why is this?

share|improve this question
up vote 2 down vote accepted

You need to escape the space in "chrome sessions":

rsync -e "ssh -i new.key" -r --verbose -tz --stats --progress --delete '/cygdrive/c/Users/jay/AppData/Local/Google/Chrome/User Data/Default/Current Session' user@host:"/chrome\ sessions/"

The double quotes are parsed and stripped by the local shell, keeping the two words together as a single argument to rsync. Rsync connects to the remote host and spawns a new shell. That shell sees two arguments: "chrome" and "sessions". If you have a quoted string with an embedded escape, the escape survives the trip to your remote host and tells the shell to ignore the space.

share|improve this answer

try it like this:

rsync -r --verbose -tz --stats --progress --delete '/cygdrive/c/Users/jay/AppData/Local/Google/Chrome/User Data/Default/Current Session' -e "ssh -i new.key" user@host:"/chrome sessions/"

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.