General information
Structure
There will be at least two classes of databases; one for direct and fast access to the EPICs information throughout the experiment (being developed by Brandon) and the second to hold calibration constants to be used by the analyzer (being developed by Rob). The description and rough specifications for the databases are
here.
Backup
WARNING! The information below is outdated and may be inaccurate. The hostname, username, and password have change and this is not reflected below.
The database backuped up by user nerses using crontab job run every night from ifarml2. The scipt launched by cron is /work/halla/e02013/disk1/GEn/db/dump_e02013.sh. Back-ups are collected in the same directory (/work/halla/e02013/disk1/GEn/db).
Backed up databases include:
- e02013
- GEn database, accessed by user gen and gen_admin
- tikiwiki
- database used by GEn wiki
- tikicustomdata
- database also used by GEn wiki, but contains non-standard tables (like list of epics variables)
/work/halla/e02013/disk1/GEn/db/dump_e02013.sh
#!/bin/bash
# Author nerses@jlab.org
# do backups in this directory
cd /work/halla/e02013/disk1/GEn/db
function db_dump(){
# Usage:
# db_dump <user> <password> <database>
OUTPUT=${3}_`date +%Y%m%d`.sql
/apps/bin/mysqldump -h yerphi -u $1 --password=$2 $3 > $OUTPUT
bzip2 -q $OUTPUT
}
db_dump gen '' e02013
db_dump tikiuser '********' tikiwiki
db_dump tikiuser '********' tikicustomdata
Accessing DB
There are 2 mysql user accounts for accessing e02013 database:
- gen_admin (not sure this exists anymore)
- used to fill the database with data (password protected)
- e02013
- used for read only access of data could be accessed using the following command
mysql -h jmysql -u e02013 -p
with password: IXt4ldk.