Link to home
Start Free TrialLog in
Avatar of qvfps
qvfps

asked on

Rsync Configuration

I am running a Netware 6.5 SP 5 network.  I would like to use RSYNC to to keep folders synchronized over a WAN.   I have RSYNC running and copying the files from one server to another.  However I have something wrong in my configuration.  I would like to synchronize
\\server1\Vol1\rsyncttest(Source) with \\server2\vol1\rsynctest (Destination)

the destination server has the following rsync.conf file in sys\etc

uid = nobody
gid = nobody
max connections = 0
syslog facility = local5
pid file = SYS:/rsync/rsyncd.pid
log file = SYS:/rsync/rsyncd.log
motd file = SYS:/rsync/rsyncd.motd
[server2]
   path=vol1:/rsynctest
   comment=No comment
   read only=no
   use chroot=no
   strict modes = no
   transfer logging=yes
   timeout=3600
   use lfs=yes
   hosts allow=31.10.21.24
   hosts deny=*

and I am running the following command on the source server.

sys:rsync/rsync -arz -v /rsynctest server2::server1/vol1 --volume=vol1: --port=873 --progress

This configuration works but it copies the files from the source server to \\Server2\vol1\rsynctest\server1\vol1\rsynctest


Can anyone tell me how to sync vol1\rsynctest -> vol1\rsynctest?

How about vol1\rsynctest -> eng\rsynctest ?

Thanks for any suggestions
Avatar of dotENG
dotENG

This is my working configuration, you are using push setup (source initiated), I'm using pull (destination initiated).

** Destination server DOrsync.ncf **
sys:rsync/rsync -rzav ip_address_of_source::resource_to_copy --volume=destination_vol_name: /backup_directory/backup_subdir

** Source Server etc/rsync.conf **
uid = nobody
gid = nobody
max connections = 0
syslog facility = local5
pid file = SYS:/rsync/rsyncd.pid
log file = SYS:/rsync/rsyncd.log
motd file = SYS:/rsync/rsyncd.motd

[resource_to_copy]
        path = source_volume_name:/source_dir
        comment = backup desc
        read only = no
      use chroot = no
      timeout = 3600
      transfer logging = yes


This one copies the data from
ip_address_of_source\source_volume_name:/source_dir
TO
dest_server\destination_vol_name:/backup_directory/backup_subdir
Avatar of PsiCop
Novell Cool Solutions has a number of RSync-related articles. A fellow by the name of Gary Childers (who is not me) wrote many of them - see --> http://www.novell.com/coolsolutions/author/1223.html
Avatar of qvfps

ASKER

Thanks for the sample configuration but I am still missing something.   I used the following rsync.conf file


***Source Server***
uid = nobody
gid = nobody
max connections = 0
syslog facility = local5
pid file = SYS:/rsync/rsyncd.pid
log file = SYS:/rsync/rsyncd.log
motd file = SYS:/rsync/rsyncd.motd
[Server1]
   path=vol1:/rsynctest
   comment=No comment
   read only=no
   use chroot=no
   strict modes = no
   transfer logging=yes
   timeout=3600
   use lfs=yes

I used the following command on the destination server.  Server2

*** Destination Server ***
sys:rsync/rsync -rzav 30.30.32.40::vol1/rsynctest --volume=vol1: /rsynctest

When I check the logger screen on the destination server i see the following error message

@ERROR: Unknown module '/vol1/rsynctest', please check your configuration
(1) read_timeout: Error peer socket closed fd=108
rsync error: in socket IO (code 10) at io.c(356)  

It does not matter if I use /vol1/rsynctest , vol1/rsynctest, /rsynctest or rsynctest. I get the same error message with the '/vol1/rsynctest' substituted with whatever I used.  

Greg


Try this line instead,

sys:rsync/rsync -rzav 30.30.32.40::vol1 --volume=vol1: /rsynctest
Sorry, this is what I ment.

sys:rsync/rsync -rzav 30.30.32.40::server1 --volume=vol1: /rsynctest
Avatar of qvfps

ASKER

I deleted \\Server2\vol1\rsynctest\server1 since I only want to sync \\server2\vol1\rsynctest and \\server1\vol1\rsynctest. I then used the command below to start rsync.

sys:/rsync/rsync -rzav 30.30.32.40::Server1 --volume=vol1: /rsynctest

When I look in the logger screen I see the following error message

receiving file list ... link_stat "server1" <in server1> failed: No such file or directory
Did you ran:

rsync -v --progress --port=873 --daemon

On the other server?

I have two NCF files

** rsyncstr.ncf**
rsync -v --progress --port=873 --daemon

** rsyncstp.ncf **
rsycdn Rsync ip_address:873
Another issue, I think rsync is case sensitive, make sure which one you are using Server1 or server1.
The way rsync works, when going between a remote server to an rsync server, which is what this is, is the double-colon notation is part of either a source-path or a destination-path, as defined in the rsync server's conf file.  You say you want to sync from server1 to server2, running the rsync command on server2, and the rsync server is server1, if I understand correctly.  

If you're saying "rsync -arz -v /rsynctest server2::server1/vol1 --volume=vol1: ..." what you're saying is copy from local folder /rsynctest to  host name server2, path "server1/vol1" where the path "server1/vol1" would be what's defined as [server1/vol1] in the rsync.conf file.  The NetWare-specific option "--volume=vol1:" also seems to be out of place.

What you want to do is run the following on server2 (assuming that server2 will resolve "server1" to the server's address):

rsync -arzv --volume=vol1: rsynctest/ server1::server2 --progress

with server1's rsync.conf having this:

...
[server2]
path=vol1:/rsynctest
...

Note: I added the "v" to the rest of the options 'cause they're all options, no need to separate the "verbose" from the rest.  I used the --volume argument to indicate the source volume on the remote server (server2) and the source path (separated from the source volume with a space) with a trailing / indicating "copy the contents of this directory."  With rsync, if you don't have a trailing slash, it will copy the directory name to the target, too.  Also, indicating port 873 is redundant as it's the default port - you only have to specify it if you change it from default.

So, why it was creating the full remote server's path on server1 was because 1) you didn't use a trailing slash after the source path and 2) you added /vol1 to the target "server::rpath" parameter, which resulted in adding vol1 to the path already defined in the rsync.conf entry.
Avatar of qvfps

ASKER

Thanks for the help so far.  I used the configuration above and correctly synchronized RsyncTest.  

However I am still missing something.  When I try and use it on the production servers with the below configuration nothing is copied.

I have two servers NY1 and NM1.  I want to synchronize from \\NY1\eng to \\NM1\vol1\eng.  

On NM1  I have the following rsyncd.conf
uid = nobody
gid = nobody
max connections = 0
syslog facility = local5
pid file = sys:/rsync/rsync.pid
log file = sys:/rsync/rsync.log
motd file = sys:/rsync/rsyncd.motd
[NY1]
   path=vol1:/Eng
   comment=No comment
   read only=no
   use chroot=no
   strict modes=no
   transfer logging=yes
   timeout=3600
   use lfs=yes

I start rsync on the NM1 server with sys:rsync/rsyncstr

on the NY1 server i run
sys:rsync/rsync -arz -v NM1::NY1 --volume=Eng:  --port=873 --progress

when I enter this command I can see it counting files then scrolling through them on the console screen on NY1.  On NM1 when I look at the rsync screen i see

(1) rsyncd version 2.6.0 starting, listening on 30.30.32.30:873
(2) wrote 1904895 bytes    read 63 bytes    total size 22476572791

In the log file on NM1 I see the following
 2006/06/27 21:13:21 [1] rsyncd version 2.6.0 starting, listening on 30.30.32.30: 873
 2006/06/27 21:13:21 [2] rsync on NY1 from NY1 (31.30.31.34)
 2006/06/27 21:13:21 [2] wrote 1904895 bytes    read 63 bytes    total size 22476572791

However when I look at the folders noting has been copied over.
You have the command backwards.  You always have source first, target second.

It should be:
sys:rsync/rsync -arzv --volume=Eng: / NM1::NY1 --progress
ASKER CERTIFIED SOLUTION
Avatar of ShineOn
ShineOn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What was the "real" answer - that last comment couldn't have been it..
Avatar of qvfps

ASKER

Thanks for you patience on this.  

The answers were your post on 6/23 which got me pointed in the right direction and the first one from 6/28 which pointed out that I had mixed up the source and destination servers.