Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
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  
Old October 27th, 2003, 12:22 PM
Jester Jester is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: England
Posts: 271 Jester User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
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/

Reply With Quote
  #2  
Old October 27th, 2003, 11:27 PM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to postalcow
RE: Rsync through ssh

What happens this way?

rsync -azv -e ssh

Just a thought...

Reply With Quote
  #3  
Old October 28th, 2003, 09:11 AM
Jester Jester is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: England
Posts: 271 Jester User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
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 )

Reply With Quote
  #4  
Old March 8th, 2004, 01:34 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
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.

Reply With Quote
  #5  
Old April 14th, 2004, 01:50 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
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

Reply With Quote
  #6  
Old May 20th, 2004, 01:42 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
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.

Reply With Quote
  #7  
Old August 3rd, 2005, 04:19 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
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.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > Rsync through ssh


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway