Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sOid

macrumors member
Original poster
Aug 8, 2009
52
0
Hello all!

I've got a bit of a problem here. I'm making an rsync script for my offsite storage hdd (encrypted with TrueCrypt).

So far, it works like a charm. But when I try to back up a folder with a whitespace in it's name, for example "Application Support" it's starting to freak out.

This is my rsync command:
Code:
rsync -a --progress --modify-window=1 ~/Library/Application\ Support/Little\ Snitch/ /Volumes/BACKUP/Library/Application\ Support/Little\ Snitch

And I'm getting this error:
Code:
mkdir: /Volumes/BACKUP/Library/Application Support: No such file or directory

Anyone knows why this doesn't work?

The TrueCrypt volume is formatted as FAT32, but I don't think that would cause problems...
 
I'd use quotes instead to make sure it interprets the spaces correctly.

Code:
rsync -a --progress --modify-window=1 "~/Library/Application Support/Little Snitch/" "/Volumes/BACKUP/Library/Application Support/Little Snitch"
You mention this is a part of a script, it's possible the script is doing something funny.
 
I'd use quotes instead to make sure it interprets the spaces correctly.

Code:
rsync -a --progress --modify-window=1 "~/Library/Application Support/Little Snitch/" "/Volumes/BACKUP/Library/Application Support/Little Snitch"
You mention this is a part of a script, it's possible the script is doing something funny.

Thanks for your response!
However, that isn't the solution.

I figured out that the mkdir command (which rsync uses to create the folders) can only create one new folder by default. With the -p option set in the mkdir command, it can create several new folders.

However, I don't know how to implement this in the rsync command...
 
I figured out that the mkdir command (which rsync uses to create the folders) can only create one new folder by default. With the -p option set in the mkdir command, it can create several new folders

Where did you get this information from? I've never had issues with rsync creating folders. I generally have it creating hundreds at a time.
 
Where did you get this information from? I've never had issues with rsync creating folders. I generally have it creating hundreds at a time.

Someone told me on another forum. He seems to be right so far...

Any chance you've got the solution? :)
 
Someone told me on another forum. He seems to be right so far...

Any chance you've got the solution? :)

My rsync works great. Anyways, white space is not your problem, it could be an issue with the file system format of the drive being copied to and that you have a directory with all caps.

From other forum:
I reformatted, using FAT as I wanted to be able to use the HD also from Windows, and tried rsync once more. Looking at the errors I realized that all of them were about files with an only-uppercase directory in their path. Finally I found that all directories with only upper-case names would be created as lower-case directories. But later, when rsync tried to recursively copy the files and directories in the original directory, it would in vain look for the upper-case directory to put them in and complain with an error message...
 
My rsync works great. Anyways, white space is not your problem, it could be an issue with the file system format of the drive being copied to and that you have a directory with all caps.

From other forum:

Hmm yes, that might be it. However, it's still weird that rsync works great with a command like this.

Code:
rsync -a --progress --modify-window=1 ~/Library/Calendars/ /Volumes/BACKUP/Library/Calendars

The only difference between this one and the previous one, is that this one has a 'smaller' structure and no folders with spaces in the name...

I'm using ChronoSync now, but I would still like to use rsync.

By the way, gonna try it with the destination set to an HFS+ formatted TrueCrypt volume. Back in a sec! ;)

edit: nope, backing up to the HFS+ volume returns exactly the same error :(
 
Hmm, that is odd that the error persists. I use CCC for most of my regular backups and it's built off rsync and I have it backing up entire HD without an issue. There's likely some small thing interfering, but I'm sure what else to have you check. The only thing on your command that I haven't used is that "modify-window" piece, but from its description I don't see a reason for it to cause problems. The arguments I use are "-avz --progress." Well, and -e for remote backups of my web server.

Good luck, and if you find the problem be sure to post back.
 
Hmm, that is odd that the error persists. I use CCC for most of my regular backups and it's built off rsync and I have it backing up entire HD without an issue. There's likely some small thing interfering, but I'm sure what else to have you check. The only thing on your command that I haven't used is that "modify-window" piece, but from its description I don't see a reason for it to cause problems. The arguments I use are "-avz --progress." Well, and -e for remote backups of my web server.

Good luck, and if you find the problem be sure to post back.
Thanks man, much appreciated.

Don't really know what's the problem, but ChronoSync seems to do the job just fine. It's just that I don't really like having yet another piece of software running on the background...

Also, I have to make two different 'scripts' in ChronoSync to do what I want. But that's only a small inconvenience.

If I'll find the problem, I will certainly post it over here!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.