In day to day life of a unix administrator , most important question which arises, is related to data synchronization. No doubt , there are a large number of data synchronization tools available on Unix operating system ranging from less flexibale tool of automatic FTP to more flexibale tools like rsync.
Here i am describing step by step guide to configure rsync to replicate data filesystems from one AIX box to another, but offcourse you can use same steps to configure rsync on other flavours of unix
Created and mount similar filesystems on both Application servers , let say AS1 and AS2
In my case, these filesystems are already in place as a part of installation/configuration of application.
2 Select a user for replication, which should exits on both servers and have read/write access on filesystem structure. Let’s assume for this document as user “replicauser”. You may have different user in actual scenerio
Install following software from Linux tool box on both AS servers
popt-1.7-1.aix.4.3.ppc.rpm
rsync-2.6.2-1.aix.5.1.ppc.rpm
Install openssh-3.8.1.0. and openssl-0.9.6.7 on both servers
Setup openssh so that replicauser from AS2 server can ssh to AS1 server ( without any password prompt).For step by step configuration of SSH , see my post on SSH configuration in five minutes.
Add /usr/local/bin in replicauser’s path environment variable ( preferably in his .profile) on both servers
Now you have to create a shell script on AS2 server
#Script name : rsyncapp.sh
#! /bin/skh
rsync –avz –rsh=ssh --delete AS1: /appl/icons
exit 0
I will recommend you to start with some test folders and when satisfied with rsync functionalities , then go for all actual folders and filesystems.
Now put rysncapp.sh into replicauser crontab so that it will be executed every morning ..Let’s say
Please note that “—delete” parameter is very much important as when administrator delete something from AS1’s folders, rsync will also delete corresponding files from AS2 server’s filesystems as well, as it performs synchronization process.
This is blog for IT Infrastructure consultants , who want to use latest technologies for building high profile solutions with reliability and high performance.
Subscribe to:
Post Comments (Atom)
How to Enable Graphical Mode on Red Hat 7 he recommended way to enable graphical mode on RHEL V7 is to install first following packages # ...
-
Putting the physical control panel in manual operating mode There are many instances , where you want to use ASMI interface to login to Hype...
-
While Lpars and Wpars are both virtualization features of IBM Power systems , there are inherently differences which do reside between Lpars...
-
Have u met any auditor who ask you about security of your backups? For most of system and database administrators it is an annoying question...
No comments:
Post a Comment