0

We are currently migrating our servers over to a new platform and I need to keep 2 directories over 15Gb each in sync while testing/migrating services over to our new platform.

I have thought of using rsync to keep them uptodate however this would take a long time and only be uptodate at the time of running and I need this to be in realtime or as close to as possible!

If anyone could help would be greatly appreciated!!

Notes: Our current system is running ubuntu and our new one is running centos 5.5

1
  • What is the rate of change?
    – sciurus
    Apr 30, 2011 at 2:07

3 Answers 3

1

You could do this with a cronjob that ran rsync -av --delete /directory testing:/directory at a certain interval, say every hour. However, this would needlessly run sometime when there were no changes, and it if there were a lot of changes immediately after a run i tcould be nearly an hour until they were synced. A better solution might be to use lsyncd.

Lsyncd watches a local directory trees event monitor interface (inotify). It aggregates and combines events for a few seconds and then spawns one (or more) process(es) to synchronize the changes. By default this is rsync. Lsyncd is thus a light-weight live mirror solution that is comparatively easy to install not requiring new filesystems or blockdevices and does not hamper local filesystem performance.

1
  • lsyncd and rsync has worked amazingly well, thank you! May 3, 2011 at 9:23
0

You can mount the productive stuff to your testing system, so you'll always have the current status. But keep in mind everything you change in your testing environment will affect the productive system too!

-1

It depends on the type of systems you are using.

If you are running linux a simple Rsync can keep the production and testing in sync. There are also Rsync utilities for Windows as well but I dont know who good they are.

Do you need replication both ways or just one way?

3
  • He still said he's using ubuntu and centos. He also mentioned that rsync is no option..
    – binfalse
    Apr 29, 2011 at 20:10
  • @binfalse. Thanks. Rsync could be an option but I don't believe that it's the right one. Replication would be oneway. Production to testing. But must delete anything on testing that isn't in production. Apr 29, 2011 at 21:10
  • "--delete This tells rsync to delete extraneous files from the receiving side (ones that aren't on the sending side), but only for the directories that are being synchronized." If too much data changes per hour for rsync to keep up with, it's still not workable, and your remaining options would all be to mount both testing and production from common NFS or similar storage. Apr 29, 2011 at 21:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .