- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Syncing the Folders Between the servers
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2006 01:04 AM
12-13-2006 01:04 AM
Hi Team..
My Objective of this thread is I want to sync up the Folder "ABC" in server1 with the Folder "XYZ" on the Server2.
Current Scenario:
I created a user with auto key authentication hence he can access the server2 without password from server1 and vice versa.
There is a Cronjob scheduled on the server2 which will run once in 5 minutes and copy the folder ABC from server1 to server2 using SCP.
Now the issue is:
I don't want to copy the files from server1 to server2 when they are being created.
I mean in realtime if the file is being created on server1 the SCP operation should not copy the file to the server2.
--------------------------
And we are having a felt that the user with key authentication is somewhat unsafe on a production env..
I want to know we are on the right direction or ant other way to achieve the Objective
Regards
Suseendran .A
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2006 01:18 AM
12-13-2006 01:18 AM
Re: Syncing the Folders Between the servers
One approach is to see if your file is in-use. If so, skip your copy. I've used this approach:
...
PIDS=`fuser ${FILE} 2> /dev/null` #...look for any process using file...
if [ ! -z "${PIDS}" ]; then
print -u2 "Error: '${FILE}' is inuse by process(es): ${PIDS}"
...
Regards!
...JRF....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2006 01:18 AM
12-13-2006 01:18 AM
SolutionAn alternative to copying everything every time is to use rsync.
http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/rsync-2.6.8/
rsync is designed to keep things in sync between servers. Once you have sync'ed them the first time, rsync can then look at the files and directories and copy only the things that have changed to keep server2 in sync with server1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2006 01:53 AM
12-13-2006 01:53 AM
Re: Syncing the Folders Between the servers
With rdist, you need to setup some files and cron:
# Copy myadm across to the DR site.
05 01 * * * /app/admin/drp/update-binaries.sh
# cat /app/admin/drp/update-binaries.sh
#! /bin/sh
# Keep the DRP copy of the oracle up-to-date.
# Currently the files are in:
#
# /oracle
#
# See the rdist(1M) distfile for a list of exclusions.
DRPDIR=/app/admin/drp
DRPHOST=svr0031
HOST=`/usr/bin/uname -n`
( su - oracle -c "rdist -f $DRPDIR/distfile oracle"; ) 2>&1 |\
tee $DRPDIR/drp.log 2>&1 |\
mailx -s "oracle rdist output" sysadm
# cat distfile
ORACLEDR = ( svr0031 )
#
# File systems to be copied over to the DR host.
# Don't use -R in install - so as not to remove files on destination host
ORACLE = /oracle
oracle: ( ${ORACLE} ) -> ( ${ORACLEDR} )
install -w ;
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2006 10:52 PM
12-14-2006 10:52 PM
Re: Syncing the Folders Between the servers
I set up the rsync command to do this operation ., Since I found that the SCP is copying the realtime files.
Regards
Suseendran ,A