Distribute Service Packs and Corporate Documents using RSYNC
Novell Cool Solutions: Trench
By Gary Childers
Digg This -
Posted: 9 Dec 2004
I have found another use for RSYNC outside of Nterprise Branch Office. I need to push out updates from the central site to all my remote sites. RSYNC can do the job.
I have two reasons for using this solution:
A) I can use this to push out NetWare service pack files to each remote server, in preparation for installing them, and
B) I can use this to push out standard corporate documents to each server, so that every user has the updated version.
I am using the term "push" rather loosely, since RSYNC is actually performing a "pull" -- the remote servers pull the updated data from the central office server.
I am using a NetWare 6.5 server at the central office with the RSYNC (2.6.0) component installed. My remote office servers have rsync v.2.6.2, downloaded from the Novell developer site. The central office server runs the RSYNC daemon, listening for rsync requests on default TCP port 873.
I already have remote office servers synching data to the central office. Thus I needed only to add the appropriate modules in the configuration file (rsyncd.conf) to specify the updates I wish to distribute.
I can run NetWare Remote Manager (serverIP:8009) | Manage Applications | Rsync Configuration to configure the RSYNC (central office) server.
For the UPDATES distribution, I created a "Branch Office" definition, named it UPDATES, selected the SYS: volume, and the path SYS:\UPDATES, and input the IP address of the remote office server under "Branch Office IP Address" (or asterisk "*" to allow multiple hosts).
This is identical to creating a branch office definition for synchronizing data from a remote site to the central RSYNC server.
You may find it easier to manually edit the SYS:\ETC\rsyncd.conf file, after you have added one location, so you can copy and paste additional locations (modules). The UPDATES module looks like this:
[UPDATES] path=SYS:/UPDATES comment=Area for distributing Server Patches read only=yes use chroot=no strict modes = no transfer logging=no timeout=3600 use lfs=yes hosts allow=* hosts deny=*
This references the SYS:\UPDATES directory on the central office (RSYNC) server. It will allow all hosts to connect, since I am distributing patches to multiple servers.
Then the remote server will execute this UPDATES.NCF file:rsync -rav RSYNC1::UPDATES --volume=SYS: UPDATES --delete
The -rav means -r for recursive, -a for archive, -v for verbose. The source string is RSYNC1::UPDATES" (the server name can be resolved via the HOSTS file, and the UPDATES corresponds to the section specified in the rsyncd.conf file on the RSYNC server). The destination volume is specified with "--volume=SYS:" and the destination path as "/UPDATES". The double-colon "::" specifies that rsync communication will occur via TCP, default port 873. The -- delete switch will delete files on the target that have been deleted on the source (use carefully).
Similarly, I use the same procedure to distribute standard corporate documents to the remote servers. For that, the module in rsyncd.conf will look like:
[CORPDOCS] path=DATA:/RSYNC/CORPDOCS comment=Area for distributing Corporate Docs read only=yes use chroot=no strict modes = no transfer logging=no timeout=3600 use lfs=yes hosts allow=* hosts deny=*
Then the remote server will execute this CORPDOCS.NCF file:rsync -rav RSYNC1::CORPDOCS --volume=DATA: /CORPDOCS --delete
Thus the end users map a drive to DATA:/CORPDOCS folder on their respective servers, and have all the standardized documents.
As usual, RSYNC only copies what has changed, so subsequent updates can be very efficient. On the LAN, RSYNC will copy 500MB of data in about 5 minutes. After that, it will only need to perform updates, adds and deletes, so it becomes very efficient. A WAN connection, such as a T1, is considerably slower. If there are firewalls in between, port 873 will have to be opened for the link.
[UPDATES] path=SYS:/UPDATES comment=Area for distributing Server Patches read only=yes use chroot=no strict modes = no transfer logging=no timeout=3600 use lfs=yes hosts allow=* hosts deny=* [CORPDOCS] path=DATA:/RSYNC/CORPDOCS comment=Area for distributing Corporate Docs read only=yes use chroot=no strict modes = no transfer logging=no timeout=3600 use lfs=yes hosts allow=* hosts deny=*
If you have any questions you may contact Gary at email@example.com
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com