|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Rsync through ssh
I have set up my rsyncd.conf file, and when I
su - sync then type: /usr/local/bin/rsync -azv /srv/www/* sync::wwwbackup everything works fine (files transfered to path set in .conf file and the rsync log displays each transfer) but when I use (still under the bash for the user=sync) /usr/local/bin/rsync -azv --rsh="ssh" /srv/www/* [servername]:wwwbackup the files transfer to a newly created folder /home/sync/wwwbackup ! There is also no entries in the rsync log. Does anyone know why I cannot seem to use rsync through ssh correctly? Could it be because sshd is rooting the sync user to /home/sync/ and if so what can I do? Any help would really be appreciated as I've been tearing my hair out :laugh: My rsyncd.conf looks like this: log file = /var/log/rsyncd.log transfer logging = true read only = false max connections = 5 ignore nonreadable = true pid file = /var/run/rsyncd.pid lock file = /var/run/rsync.lock hosts allow = [servername] hosts deny = 0.0.0.0/0 uid = sync gid = users [wwwbackup] path = /srv/www/ |
|
#2
|
|||
|
|||
|
RE: Rsync through ssh
What happens this way?
rsync -azv -e ssh Just a thought... |
|
#3
|
|||
|
|||
|
RE: Rsync through ssh
Thanks postalcow,
If I use rsync -azv -e ssh /srv/www/* [servername]:wwwbackup it does exactly the same thing as before - i.e. creates a wwwbackup folder indide the users /home/ directory. I allowed root through ssh, and ditto - rsynced to /root/wwwbackup! I cannot work out if it's not picking up the module in the rsyncd.conf, or my sshd.conf is limiting the users to thier $HOME directory (although if I just ssh to the IP then I can navigate outside $HOME) Help! (Oh - and there is still nothing in the log from the -e ssh attempts |
|
#4
|
|||
|
|||
|
RE: Rsync through ssh
I know this post is old, but....
why don't you just add the whole backup path to your command. rsync -azv -e ssh /srv/www/* [servername]:/home/USER/wwwbackup That should do it for ya. |
|
#5
|
|||
|
|||
|
RE: Rsync through ssh
did you ever get resolution to this .. Im wonder also why tehre is no log generated on the server side when i use -e ssh on the client.
All help would be appreciated, -D |
|
#6
|
|||
|
|||
|
RE: Rsync through ssh
Not that I'm much of an expert, but those to rsync commands are completely different. In the second one when you use ssh you specify the destination using only one colon, which will not use the rsync server, but instead transfer things directly. I'm not sure of the correct way to hit an rsync server over ssh, but the way you are doing it does not use the server.
|
|
#7
|
|||
|
|||
|
RE: Rsync through ssh
I have no idea why this is considered "resolved".
If you do: rsync -azv -e ssh /srv/www/ [servername/IP]:/srv/www/ It should be good to go. When using ssh, it ignores the rsyncd.conf and everything else that deals with it since it's going over a different protocol. When you added [servername]:wwwbackup it was going straight to the users home. If you did [servername]: it would go straight to /home/rsync. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > Rsync through ssh |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|