SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Comp. Search
Who's who?
Meetings
FAQ Homepage
Archive
Environment
Administration
New User Info.
Web Info/Tools
Monitoring
Training
Tools & Utils
Programming
C++ Standard
SRT, AFS, CVS
QA and QC
Remedy
Histogramming
Operations
PromptReco
Simulation Production
Online SW
Dataflow
Detector Control
Evt Processing
Run Control
Calibration
Databases
Offline
Workbook
Coding Standards
Simulation
Reconstruction
Prompt Reco.
BaBar Grid
Data Distribution
Beta & BetaTools
Kanga & Root
Analysis Tools
RooFit Toolkit
Data Management
Data Quality
Event display
Event Browser
Code releases
Databases
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

Data Exportation Technicalities

Dominique Boutigny August 27, 1999
This web page gives a few technical hints on database exportation and importation. For more details, one should refer to the detailed documentation on Data Distribution Tools.

Anonymous FTP server :

Some subsets of data are available via anonymous ftp on ftp-babar.slac.stanford.edu. They are located in the directory: /babar/databases/export.

Conditions and configuration databases :

Snapshots of the conditions and configuration databases are done on a regular basis. They all go in the following subdirectory trees:
  • /babar/databases/export/snapshots/online/date/backup_type
  • /babar/databases/export/snapshots/online/date/backup_type
where "date" is the date of the full DB backup.
and "backup_type" is either "full" for full backup or "incdate" for incremental backups with respect to the corresponding "full" backup. It can also be "gz" for compressed versions.

How to install the conditions and configuration databases in a remote site :

If you start from scratch :

  • Install a fresh fedration  from a release directory :
      gmake database.import BYPASS_CONDITIONS_LOAD=yes BYPASS_CONFIG_LOAD=yes
  • Copy all the conditions and configuration export files in a scratch directory starting from a full backup
  • Load the files in your database
    • BdbDmnImport -workdir the_scratch_dir export_file_name.export or .tdf

If you want to update an exiting database :

  • Set correctly your OO_FD_BOOT variable to point to the federation bootfile
  • Copy all the conditions and configuration export files in a scratch directory starting from a full backup
  • Load the files in the federation
      BdbDmnImport -replace -workdir the_scratch_dir export_file_name.tdf
  • The -replace option will "force" the loading of the database files even if a database with the same name already exists in the federation.

Important :

If there is one full backup and some incrementals, you should load the full backup first and the incrementals in the chronological order.
 

Importing Collections :

The available collections are in the directory : "Collections/version_number" . One should make sure to have an up to date database schema before trying to load a collection.
The current version of the schema is stored in  : $BFROOT/Bdb/Reference/current/ and it can be loaded in the database with the following command : (See : HN posting from Dave Quarrie )
    gmake database.schemaload SCHEMA_DIR=$BFROOT/Bdb/Reference/current
  • Copy the collections export files in a scratch directory
  • Load the files in the federation
    • BdbCollImport -force -workdir the_scratch_directory export_file_name.export or .tdf
  • The -force option is mandatory as a given exported database file may have been already loaded in the database.

Exporting collections :

After setting the correct OO_FD_BOOT, the command to export a collection from a database is the following
BdbCollExport -wait -workdir some_scratch_space -exclude raw:rec collection_list
For a long list of collections, it is possible to write their names in a files and to do :
    BdbCollExport -wait -workdir some_scratch_space -exclude raw:rec `cat file_name`
  • If there is a read lock on the database, the -wait option will force the system to wait until the lock is removed
  • One can use the -lftp option if  the scratch space resides on a file system which is not seen by the PUD daemon.
  • The -item options allows to export only certain types of data (-item aod:tag will only export aod and tag).

Massive exportation :

Massive exportation is working in the same way as collection based exportation, but it provides the possibility to export all the data since a given date (option -since). The exporting command is BdbDistCenter and is working in the same way as BdbCollExport.