PR using MySQL


[ BaBar-Conditions  |   ]

  1. IR2 to PC to ER

Introduction

For run7 the BaBar conditions technology was switched from Objectivity to MySQL/Root. The production databases (IR2,PCn,MASTER) were all converted to MySQL. Because of this switch some changes were needed for sweeping conditions between the different production federations.


IR2 to PC to ER

IR2 Snapshot

Every hour a snapshot is taken from IR2 (15 min past the hour). The tables belonging to the IR2 origin are extracted using the MySQL dump method. The script KanCondTakeIR2ToPC1 is run in the trscrontab.

Loading IR2 to PC1

PR is loading the IR2 snapshot to PC1 automatically if a new snapshot is needed. A action has been added to OprCmd.pl that would allow a shifter to load a snapshot by hand:
OprCmd.pl -iCdb ...... loadIR2ToPC1

Take PC1 to ER Snapshot

Two snapshots are taken from PC:
  1. Root snapshot to be used for ER processing
  2. MySQL dump of the PC1,IR2 origins for loading to the MASTER
Here we will describe the the root snapshot to be used by ER.
  1. An incremental snapshot is taken and the PC1-root snapshot is updated.
  2. The PC1-root snapshot is copied to another location becoming the ER-snapshot The date the PC1 snapshot was taken is used as directory name.
  3. The following modifications are one to the ER-snapshot:
    1. The root files are renamed using the snapshot date, e.g.:
      cdb_o256_c9_i0.root becomes CDB-20071210T140439-cdb_o256_c9_i0.root
    2. The boot file is updated using standard Babar LFN: /store/cdb/...
  4. The latest configuration (CfgDB) root file is copied into the ER-snapshot directory
  5. The root snapshot is copied to bbr-xfer03:
    /ddist/snapshots/pr/PC1/<snapshotDate>
    where <snapshotDate> is the date the snapshot has been taken. (e.g.: 20071210T140439)
  6. The latest snapshot is linked to current:
           ls -l /ddist/snapshots/pr/PC1/current/
           lrwxrwxrwx   1 bbdatsrv br            15 Dec 11 12:34 /ddist/snapshots/pr/PC1/current/ -> 20071210T140439/
         

Downloading an ER snapshot

  1. No semaphore files are needed. Because uniqe directory names are used and files are not overwritten (as for objy snapshots).
  2. For right now the whole snapshot has to be copied and installed locally.
  3. The link /ddist/snapshots/pr/PC1/current/ should be used to find which directory to copy, e.g.:
            & cd /ddist/snapshots/pr/PC1/current/
            & dir_to_transfer=$(pwd)
           
  4. Use the directory in the previous step to downlaod all the files.
  5. The current must not be used to transfer the files of a snapshot as it might change.


Last modified: Wed Dec 12 07:37:31 PST 2007