Thanks guys. The first part works now. Here is the final plist, for future reference:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd
">
<plist version="1.0">
<dict>
<key>Label</key>
<string>USB Backup School</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/rsync</string>
<string>-av</string>
<string>/Users/alan/Documents/school/</string>
<string>/Volumes/ALAN8G/backUp/school/</string>
<string>--log-file=/Users/alan/Documents/backUpLogs/schoolBackUp.log</string>
</array>
<key>StartInterval</key>
<integer>600</integer>
</dict>
</plist>
Now on to my second problem, doing the same thing when the source path has a space in one of the directory names. Unfortunately, renaming the directory is right out because it's in Application Support. Here is what I have so far
Trying to run the command:
/usr/bin/rsync -a /Users/alan/Library/Application\ Support/Firefox/Profiles/9va0cbyb.default/ /Volumes/ALAN8G/backUp/9va0cbyb.default/ --log-file=/Users/alan/Documents/backUpLogs/firefoxBackUp.log
That works just fine in a terminal, so I'm having another formatting issue in my plist. Here's what I have for that:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd
">
<plist version="1.0">
<dict>
<key>Label</key>
<string>USB Backup Firefox</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/rsync</string>
<string>-av</string>
<string>'/Users/alan/Library/Application Support/Firefox/Profiles/9va0cbyb.default/'</string>
<string>/Volumes/ALAN8G/backUp/9va0cbyb.default/</string>
<string>--log-file=/Users/alan/Documents/backUpLogs/firefoxBackUp.log</string>
</array>
<key>StartInterval</key>
<integer>600</integer>
</dict>
</plist>
Which gives me these console messages:
12/15/09 2:20:52 PM USB Backup Firefox[666] building file list ... rsync: link_stat "/'/Users/alan/Library/Application Support/Firefox/Profiles/9va0cbyb.default/'" failed: No such file or directory (2)
12/15/09 2:20:52 PM USB Backup Firefox[666] done
12/15/09 2:20:52 PM USB Backup Firefox[666] sent 29 bytes received 20 bytes 98.00 bytes/sec
12/15/09 2:20:52 PM USB Backup Firefox[666] total size is 0 speedup is 0.00
12/15/09 2:20:52 PM USB Backup Firefox[666] rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-37.3/rsync/main.c(992) [sender=2.6.9]
12/15/09 2:20:52 PM com.apple.launchd.peruser.501[83] (USB Backup Firefox[666]) Exited with exit code: 23
I'm reasonably certain the problem is on this line
<string>'/Users/alan/Library/Application Support/Firefox/Profiles/9va0cbyb.default/'</string>
I've tried using single quotes and escaping the space with a backslash. Neither worked and both gave similar console messages, ie "no such file or directory". So what's the problem?
Again, thanks for the help.