Chemistry commons Notes
Jump to navigation
Jump to search
Database Management
Source chemistry commons
source /nfs/soft/anaconda3/bin/activate ~khtang/.conda/envs/chemcommons
Import data from Spreadsheet
- This will be deprecated once we switched to use postgres
bash /nfs/home/khtang/work/gitlab/ChemistryCommons-2-0/CC_load_scripts/load_common.bash import mem2 [Reactions_Reference_Spreadsheet.xlsx]
Export Chemistry Commons DB
Run this script to create a snapshot of the database and JSON files for Enumeration
bash /nfs/home/khtang/work/gitlab/ChemistryCommons-2-0/CC_load_scripts/load_common.bash export mem2 [destination]
Restore data from backup
psql -U commoner -d commons -p 5434 < [db_snapshot_file]
How to simulate disaster
Stop chemistry commons docker container
ssh epyc2 sudo docker stop chemcommons
Delete database and create
psql -h mem2 -U commoner -d excipients -p 5434 //psql console login => drop database commons; => create database commons;
Restore db
psql -U commoner -d commons -p 5434 < [db_snapshot_file]
Start CC docker container
ssh epyc2 sudo docker start chemcommons