Need to sync two remote file systems from a unix box.

I have two snap servers, each has about 6 gb of data in a directory that I would like to replicate to the other.  The two snaps and the unix (sco) are on the same wan.  No problem to connect, all three see each other.  I need to use the unix box because I want the replication to take place each night and it is the only operating system that stays running through the night.

Rsync won't work because it requires a client and server. I only have one OS to make all the descisions and move the new/changed files.

Any idea what I can use? I have scoured the net for days and cannot find something so simple....

I'm giving max points because I need a valid working answer, not just a direction to looking.

Thanks.

jasgotAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yuzhCommented:
If you only want to mirror a data dir, rsync should be able to do the job. and
you don't need to have a client and server setup.

For security reason, you should use ssh + rsync to do the job.

Have a look at the following page, it is talking about Solaris, but you can implement it
in SCO:

http://oldlook.experts-exchange.com/Operating_Systems/Solaris/Q_20349722.html

also:
http://www.mids.org/pay/mn/801/rsync.html
http://www.tek-tips.com/gpviewthread.cfm/qid/693807/pid/54/lev2/3/lev3/20
http://www.aplawrence.com/Bofcusm/2154.html

You can also find a lot of example about how to use "rsync + ssh" at EE.

Just read through the docs, if you want more help, post a comment.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gheistCommented:
Do not fear if rsync takes long for first time - if 90% of your data stays over the day, rsync will not transfer that.
You can start rsync server from command line or via sudo without background daemon running.
ssh and rsync are to be found at caldera.com/skunkware
yuzhCommented:
For the first time, it is better to use ssh + tar to do the job, and  then start from the 2nd use
ssh + rsync it will run a lot faster !
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

jasgotAuthor Commented:
The data has already been manually replicated, so there should be very few files to handle.

So you are telling me I can run

rsync //snap1/dirx //snap2/dirx
rsync //snap2/diry //snap1/diry

without the rsyncd running anywhere and the source AND destination do not have to be a xNIX box?  This goes against everything I have read for weeks......
gheistCommented:
rsync --rsh="/usr/bin/ssh -l luser /usr/bin/sudo /usr/local/bin/rsync --daemon --server ." -vz root@remotehost::module_from_remote_config/relative_path /somewhere/here
yuzhCommented:
"The data has already been manually replicated, so there should be very few files to handle."

That's a good news! rsync will take a very short time to mirror the two dirs.
I use rsync to mirror more than 120 GB date every night, and I 'm happy with
the result.

If you two boxes are in the same network to can use NFS mount to mount the
remote box to the one which the backup script will be run and make sure it has
root write permission to the remote filesystem , and than use, the
follow systax (use the real path to rsync instead of /usr/local/bin)

 /usr/local/bin/rsync --delete -az ${DIRECTORY} ${BACKDIR}

If you can not use NFS mount, you need to use ssh + rsync:

/usr/local/bin/rsync -e ssh --delete -az root@remote:/home/yuzh/test1 /home/yuzh/test1
http://oldlook.experts-exchange.com/Operating_Systems/Solaris/Q_20505177.html

man rsync

to learn more
jasgotAuthor Commented:
The two drives that are not running an OS are on different subnets of our network, all within a VPN.

I can get to any device on the other network by IP, I have not tried to do it by \\UNC.  I think I can NFS mount to \\IPADDRESS\share.

Next,

I am in a secure VPN, can I skip the ssh?  I am not even sure if the snap drive allows ssh.



yuzhCommented:
IF you can use NFS mount, then you don't need to use ssh, the syntax would looks like: (eg, mirror /export/data):

cd /export
/usr/local/bin/rsync --delete -az data /IP/share

In case you need to use ssh, you need to install ssh in both boxes. please read throught the example we have posted.



jasgotAuthor Commented:
SSH is not an option on a SNAP server. www.snapappliance.com So I hope I can NFS through the gateway on our WAN VPN.

Your example above makes me think you beleive the export data is on the same box as the rsync utility.  Please be mindful of my first post indicating that the syncronization has to be managed from the ONLY xNIX box and the two file systems that need to be replicated are snap servers without any type of OS that I can manage.
jasgotAuthor Commented:
OK. I'm going to test the rsync right now. I'll be right back.
yuzhCommented:
"Your example above makes me think you beleive the export data is on the same box as the rsync utility.  Please be mindful of my first post indicating that the syncronization has to be managed from the ONLY xNIX box and the two file systems that need to be replicated are snap servers without any type of OS that I can manage. "

When you setup NFS mount to mount the remote on the machine you run rsync (if you want to write to
the mount filesystem, the NFS file system has to be exported with READ and write permission)

rsync treat the two dirs as local dir.
very easy!
jasgotAuthor Commented:
As it turns out, RSYNC is not installed on this SCO box, and to get it installed, would require installing many service level patches and the GCC.  Since this box is supported by another party, I have to see if they will make sure it is at current service levels and if I can install the GCC.

Unless I can find a compiled version of RSYNC for SCO OS 5.0.5.

yuzhCommented:
jasgotAuthor Commented:
Although I am unable to get rsync installed.  This would have indeed work well for me.
gheistCommented:
gnu packages need recent libm.so, ie libm, libc and kernel, they may break a lot of apps (but never NFS mounts)
if you have two nfs mounts syncing by any means will transfer all data to both nfs servers, you need rsync right where your data lies, rsync computes checksums of data blocks and transfers them over wires where rsync protocol lies (ssh, rsh etc). so it comes out that you need rsync daemon available where your "master" data lies, if this is not an option, you transfer all.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.