Chemistry commons Notes: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== 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 Enum...") |
No edit summary |
||
Line 26: | Line 26: | ||
ssh epyc2 | ssh epyc2 | ||
sudo docker start chemcommons | sudo docker start chemcommons | ||
[[Category:Commons]] |
Revision as of 19:55, 21 September 2023
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