Overview

Here we do not schronize the databases as is typically inferred from the word synchronization, instead we simply transfer the tuples from SLAC to NUST. This is done to simplify the process of keep both the databases in sync. We could have taken a dump of the database at SLAC and imported in into the database at NUST, yet we did not do so since the schemas of the databases are different.

Synchronization Process

A cronjob at SLAC executes a script at SLAC and generates a perl configuration file. This script is available at:

pinger 35 00 * * * /afs/slac/package/pinger/pinger-archive/bin/generate-pinger-db-conf.pl --list
   2> /afs/slac/package/pinger/pinger-archive/bin/pinger-db-conf.log

The configuration file is available online and is locally stored at:

 /afs/slac/g/www/www-iepm/pinger/archive/database.cf

This configuration file is downloaded at NUST and used to update the database at NUST.

The synchronization script db-sync.pl is executed as a cron job:

 /home/pinger/bin/db-sync.pl

A copy of the code is available at:

 /afs/slac/package/pinger/pinger-archive/src/db-sync.pl
  • No labels