SMRT Portal Recovery Installation - dyim42/SMRT-Analysis GitHub Wiki
The following steps will recover a SMRT Portal installation that is broken, or perhaps suffered a form of catstrophic corruption (files deleted, moved, etc.). Job history from the most recent database backup can be used to populate the new smrtportal DB.
#####Set $SMRT_USER, $SMRT_ROOT:#####
SMRT_ROOT=/opt/smrtanalysis
SMRT_USER=smrtanalysis
su - $SMRT_USER
#####Stop running services. KILL processes if necessary:#####
$SMRT_ROOT/admin/bin/smrtportald-initd stop
$SMRT_ROOT/admin/bin/kodosd stop
#####Backup existing v2.3 installation directory.:#####
sudo mv $SMRT_ROOT/install/smrtanalysis_2.3.0.140936 $SMRT_ROOT/install/smrtanalysis_2.3.0.140936.bak
This directory can be removed once the new installation has been verified and failure analysis has been completed.
#####Install v2.3.0 + patch-2:#####
bash ./smrtanalysis_2.3.0.140936.run -p ./smrtanalysis-patch_2.3.0.140936.p2.run --rootdir $SMRT_ROOT
#####Start Services:#####
$SMRT_ROOT/admin/bin/smrtportald-initd start
$SMRT_ROOT/admin/bin/kodosd start
#####Uncompress DB dumpfile. Note that the timestamp for your most recent DB dumpfile will be different:#####
gunzip $SMRT_ROOT/userdata/database/mysql.archive-20150206_052701/backup/2.3.0.140936/smrtportal-2.3.0.140936.backup.20150130_004701.sql.gz
#####Reimport latest DB backup, retaining users, groups, and job history:#####
$SMRT_ROOT/admin/bin/dbadmin \
--dbuser-smrtportal smrtportal \
--dbpasswd-smrtportal smrtportal \
--dumpfile $SMRT_ROOT/userdata/database/mysql.archive-20150206_052701/backup/2.3.0.140936/smrtportal-2.3.0.140936.backup.20150130_004701.sql\
-–import
#####Confirm web Services are alive:#####
curl http://<HOSTNAME>:8080/smrtportal/api
{
"success" : true,
"message" : "Web services are alive"
}