Database Maintenance

Various services which are responsible for the correct functionality of the database.

Tracker Virtual machines

All services are installed into 2 virtual machines.

Production: tracker-machine-a

Development (backup): tracker-machine-b

DB Loader

Database Loader purpose to insert data into Database.

DB Loader installation

* Install DB Loader:

 sudo rpm -i cmsdbldr-0.1.0-1.noarch.rpm 

* Add detector and database where you would like to upload or retrieve data:

e.g. for Tracker and CMSR database we execute: sudo /opt/cmsdbldr/bin/tool.sh -a trker cmsr

* Fill properties file which will be created after you execute command above:

sudo vim /opt/cmsdbldr/properties/trker_cmsr.properties 

* Configuration example:

url=CMSR_LB
username=<Username>
password=<Password>
root-part-id=1000
condition-core-schema=CMS_TRK_CORE_COND
construct-core-schema=CMS_TRK_CORE_CONSTRUCT
managemnt-core-schema=CMS_TRK_CORE_MANAGEMNT
iov-core-schema=CMS_TRK_CORE_IOV_MGMNT
attribute-core-schema=CMS_TRK_CORE_ATTRIBUTE
view-ext-schema=CMS_TRK_TRKER_VIEW
construct-ext-schema=CMS_TRK_TRKER_CONSTRUCT
condition-ext-schema=CMS_TRK_TRKER_COND
log-level=INFO
api-port=8882
* After that execute this command again:
sudo /opt/cmsdbldr/bin/tool.sh -a trker cmsr  

DB Loader maintenance

IMPORTANT: Every configuration to each database creates separate services and will be called like a configuration file when you registered it.

 e.g. if we added configuration in previous steps: "sudo /opt/cmsdbldr/bin/tool.sh -a trker cmsr" our service will be called: cmsdbldr_trker_cmsr.service

* Check service status:

sudo systemctl status cmsdbldr_trker_cmsr.service

* Stop Loader

sudo systemctl stop cmsdbldr_trker_cmsr.service 

* Start Loader

sudo systemctl start cmsdbldr_trker_cmsr.service

* Restart Loader

sudo systemctl restart cmsdbldr_trker_cmsr.service

IMPORTANT: All log files are located:

/var/cmsdbldr/rest_*

DB Loader uninstall

If you have installed Resthub - you have to uninstall it in first step. Because it requires DB Loader.

* Uninstal Loader Resthub

sudo rpm -e cmsdbldrapi

* Uninstal Loader

sudo rpm -e cmsdbldr

DB Loader Resthub

IMPORTANT: Resthub reads the same configuration as DB Loader. But if a user does not want to install data into Database. Just have a configuration to read data. From the configuration example above we should remove "API_PORT".

DB Loader Resthub installation

* Install Resthub

sudo rpm -i cmsdbldrapi-0.0.8-1.noarch.rpm

* Check service status

sudo systemctl status cmsdbldrapi

* Stop Resthub

sudo systemctl stop cmsdbldrapi

* Start Resthub

sudo systemctl start cmsdbldrapi

* Restart Resthub

sudo systemctl restart cmsdbldrapi

IMPORTANT: All log files are located:

/var/cmsdbldr/cmsdbldrapi.err
/var/cmsdbldr/cmsdbldrapi.out
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 2018-10-30 - AivarasSilale
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback