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
/home/user/.ssh/config - To setup ssh specific stuff so it would just "work" with all the localhost commands
/home/user/.ssh/id_rsa - That's the key referenced in ssh_config
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
rsync: change_dir#4 "/mnt/da0p1/user_bkp_folder/rsync" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(880) [Receiver=3.0.7]
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(605) [sender=3.0.9]
BUT, if I do a "mkdir /mnt/da0p1/user_bkp_folder/rsync" and therefore the folder exists it works just fine.
Quote:
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
sending incremental file list
cd+++++++++ test/
<f+++++++++ test/pw
26 100% 0.00kB/s 0:00:00 (xfer#1, to-check=0/2)
Number of files: 2
Number of files transferred: 1
Total file size: 26 bytes
Total transferred file size: 26 bytes
Literal data: 26 bytes
Matched data: 0 bytes
File list size: 36
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 123
Total bytes received: 35
sent 123 bytes received 35 bytes 316.00 bytes/sec
total size is 26 speedup is 0.16
|
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.