rsync:// behavior is weird
Ubuntu 12.04 LTS
Trying to script out rsync over ssh and I have EVERYTHING working however I get weird behavior with the rsync:// command. What I tweaked: Code:
/etc/ssh/ssh_config - To allow forwarding and id_rsa so I use ssh keys If I do this and the folder "rsync" doesn't exist it errors out but WHY it even uses the folder I have no clue! That's what I really want to know is WHY is it trying to append an "rsync" on the end of the path? Code:
rsync -PavzrH -e "ssh host1.somehost.com" --delete --force --stats --itemize-changes --log-file=/var/log/rsync_bkp.log /var/ftp/test rsync://someuser@localhost:localhost:/mnt/da0p1/user_bkp_folder Error: Code:
sending incremental file list BUT, if I do a "mkdir /mnt/da0p1/user_bkp_folder/rsync" and therefore the folder exists it works just fine. Quote:
So the folders and files make it to the remote server via ssh passwordless authentication with ssh keys but that darn "rsync" appending is irritating. I can live with it BUT I'd rather get this right :-) Any help in understanding what's going on would be appreciated. |
Quote:
rsync -PavzrHe ssh --delete --force --stats --itemize-changes --log-file=/var/log/rsync_bkp.log /var/ftp/test/ user1@host1.somehost.com:/destination/directory The /destination/directory must exist. |
would be nice to explain this rsync:// part, that is not really compatible with -e "ssh <host>". If you want to use ssh you do not need rsync://.
|
config
So my config in ~/.ssh/config is:
Host host1.somehost.com HostName host1.somehost.com Port 10003 User someuser IdentityFile ~/.ssh/id_rsa LocalForward 11000 127.0.0.1:873 AddressFamily inet BatchMode yes ForwardAgent yes ClearAllForwardings yes I can only somewhat remember a little bit why I'm doing the LocalForward but won't waste time explaining - in short it was probably because I was trying to tunnel over it. Your solution works perfectly! I don't believe I need that LocalForward since I'm not using "localhost" anymore but rather the fqdn of the host I want to rsync to. For one reason or another I couldn't see the forest through the trees because I kept focusing on connecting to the daemon (-e switch) and using the rsync://. Thanks to all for the proper syntax and explanation! It's solved and working as I have expected it to. |
if it is solved please mark the thread solved. also if you want to say thanks just press yes.
|
All times are GMT -5. The time now is 05:03 PM. |