Solved

Rsync Configuration

Posted on 2006-06-18
14
2,134 Views
Last Modified: 2008-02-01
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
0
Comment
Question by:qvfps
  • 5
  • 4
  • 4
  • +1
14 Comments
 
LVL 6

Expert Comment

by:dotENG
ID: 16932270
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
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 16934445
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
0
 

Author Comment

by:qvfps
ID: 16939353
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


0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 6

Expert Comment

by:dotENG
ID: 16940120
Try this line instead,

sys:rsync/rsync -rzav 30.30.32.40::vol1 --volume=vol1: /rsynctest
0
 
LVL 6

Expert Comment

by:dotENG
ID: 16940123
Sorry, this is what I ment.

sys:rsync/rsync -rzav 30.30.32.40::server1 --volume=vol1: /rsynctest
0
 

Author Comment

by:qvfps
ID: 16948438
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
0
 
LVL 6

Expert Comment

by:dotENG
ID: 16948849
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
0
 
LVL 6

Expert Comment

by:dotENG
ID: 16948943
Another issue, I think rsync is case sensitive, make sure which one you are using Server1 or server1.
0
 
LVL 35

Expert Comment

by:ShineOn
ID: 16971539
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.
0
 

Author Comment

by:qvfps
ID: 16998277
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.
0
 
LVL 35

Expert Comment

by:ShineOn
ID: 17001024
You have the command backwards.  You always have source first, target second.

It should be:
sys:rsync/rsync -arzv --volume=Eng: / NM1::NY1 --progress
0
 
LVL 35

Accepted Solution

by:
ShineOn earned 500 total points
ID: 17001458
And again, the --port=873 is redundant, because that's the default port.
0
 
LVL 35

Expert Comment

by:ShineOn
ID: 17006509
What was the "real" answer - that last comment couldn't have been it..
0
 

Author Comment

by:qvfps
ID: 17014547
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.  
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question