Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F76856603
clean.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 10, 19:21
Size
935 B
Mime Type
text/x-shellscript
Expires
Mon, Aug 12, 19:21 (2 d)
Engine
blob
Format
Raw Data
Handle
19768736
Attached To
R2664 SHRINE MedCo Fork
clean.sh
View Options
#!/bin/bash
#########
# Restoring i2b2 to pre SHRINE installation state
#
#########
source
./i2b2.rc
#########
echo
"[i2b2/clean.sh] Begin."
echo
"[i2b2/clean.sh] HIVE: If exists, restore Backup copy of HIVE Ontology Datasource (file:ont-ds.xml)"
cp backup/ont-ds.xml
${
JBOSS_DEPLOY_DIR
}
/ont-ds.xml
sudo -u postgres psql
${
I2B2_DB_HIVE_USER
}
< clean_hive.sql
echo
"[i2b2/clean.sh] PM: Restoring PM Config, removing SHRINE project"
interpolate_file clean_pm.sql
"SHRINE_USER"
"${SHRINE_USER}"
> clean_pm.sql.interpolated
sudo -u postgres psql
${
I2B2_DB_PM_USER
}
< clean_pm.sql.interpolated
echo
"[i2b2/clean.sh] ONT: Removing Ontology User and Data"
interpolate_file clean_ontology.sql
"I2B2_DB_SHRINE_ONT_USER"
"${I2B2_DB_SHRINE_ONT_USER}"
> clean_ontology.sql.interpolated
sudo -u postgres psql
${
I2B2_DB_ONT_USER
}
< clean_ontology.sql.interpolated
find -name *.interpolated | xargs rm
echo
"[i2b2/clean.sh] Done."
Event Timeline
Log In to Comment