CondDBAdmin user manual
I'm preparing a small project (currently only in ~marcocle/cmtuser/CondDBAdmin) meant to provide all the tools needed for the administration of the LHCb conditions database.
Here I want to describe what the project can do.
Introduction
To start using the project, one has to go to the directory ~marcocle/cmtuser/CondDBAdmin/Main/cmt and configure the basic environment for SLC3 applications.
cd ~marcocle/cmtuser/CondDBAdmin/Main/cmt
setenv CMTPROJECTPATH $LHCBPROJECTPATH
unsetenv CMTPATH
Commands/Actions/Activities
- Initialize the GRID proxy certificate (for LFCReplicaService usage)
-
cmt run grid-proxy-init
- Start the CondDBBrowser
-
cmt CondDBBrowser
- Create a local copy of current SQLite databases
-
cmt SQLiteLocalCopy
- Run DetDescChecks LoadDDDB on the local copy
-
cmt CheckDDDB
- Use coral_replica_manager (for LFCReplicaService)
-
cmt run coral_replica_manager
- Compute the differences between two databases
-
cmt run diff_db.py <orig> <orig tag> <new> <new tag> <diff>
- orig
- connection string for the original database
- orig tag
- tag used in the original database
- new
- connection string for the database containing the data to extract
- new tag
- tag used in the new database
- diff
- connection string for the database to be created to store the changes
- Insert the content of a database (head) into another one
-
cmt run merge_db.py <diff> <dest>
- diff
- the database containing the data to be inserted into the other database (typically the result of a "diff"), the head version is used
- dest
- the database where to store the data (e.g. the master database)
- Insert new files into the database
-
cmt run python '$CONDDBUIROOT'/python/copy_files_to_db.py -s <source dir> -c <dest db>
- source dir
- the directory containing the new files
- dest db
- the database where to store the data (e.g. the master database)
- Dump a snapshot of the database to files
-
cmt run python '$CONDDBUIROOT'/python/dump_db_to_files.py -c <db> [-d <dest dir>]
- db
- the database containing the data to exported
- dest dir
- the base directory where to create the files
Operative instructions
Essentially a list of things I do to include changes into the official database.
The idea is to formalize the procedure so that I can then translate it into a user-friendly script.
Requirements on the user provided data
To be efficient in the insertion of the data into the conditions database, I need that the users use some care in preparing the data to be inserted.
- The changes have to be prepared against a well defined tag.
While we use SQLite the tag can be also "HEAD as of SQLDDDB vXrY".
- Detailed information about the changes should be included.
- The partial DB or the files should contain only the modified files (not strictly requested if they can be identified easily).
- Special care has to be used with removed files and files whose name contain a '@':
- removed files must appear in the list of modified files as empty files
- if the filename contains '@' they are stored in the DB as "dictionaries"; the part of the name after '@' is the name of the dictionary, while the first part is a "key" to the file data and the list of keys for a given dictionary cannot be modified.
- The used should have tested the changes with LoadDDDB.
If a special version of the software is needed, it has to be made clear.
Operations
--
MarcoClemencic - 07 Apr 2008