I have a windows batch file that runs rsync to backup some directories from my machine to a remote server. I have a slight problem, though, in that two of the rsync commands are only bringing the last directory. For example, if I have the following commands in my batch file:
CODE:
-
rsync -alogvqrtz --delete -e "ssh -p ####" "/cygdrive/c/Users/username/AppData/Local/Microsoft/Outlook" username@somehost.com:/home/username/backup/
-
-
rsync -alogvqrtz --delete -e "ssh -p ####" "/cygdrive/c/Users/username/AppData/Roaming/.purple" username@somehost.com:/home/username/backup/
I want to create the directory path that is being backed up, but this command is not doing it. Is there another switch I need to include or am I doing something a bit wrong?








{ 7 } Comments
Try dropping the 'q' parameter and you might notice an error. Also I'd suggest using a key for authentication rather than embedding a password in the command. And maybe adding a '-v' to the ssh command to make sure it is working.
The good news is he syntax looks right and a quick try with OS X to FreeBSD resulted in the command working.
Paul: The command works swimmingly, and the ssh connection works as expected. My host runs SSH/SFTP on a non-standard port. That said, I also have the keys on the destination machine.
Something I did right, but slightly different from some other documentation I saw online. (There's a huge write-up of this coming.)
I will try dropping the -q parameter and see what happens. Time for bed for now.
quick thought, what about permissions on the remote machine? make sure you can create a destination directory.
I have a suggestion: Stop using Windows.
Have you figured this out yet?
George: Windows has nothing to do with it. Apple nerd!
Paul: The -q option seems to work, but it just created the root directory I am backing up. It's not that bad, but just thinking of this as kind of a disaster recovery scenario. At the end of the day, if it backs up my Outlook PST, that works for me.
The suggestion for dropping -q (--quiet) was that it might be suppressing an error that would help you track down the problem.
You know if you don't want to switch to OS X you can always switch to linux. Of course then you might have to stop your metrosexual tendencies in order to better fit in wit that crowd.
Post a Comment