Gitlab is now using https://gitlab.lcsb.uni.lu as it's primary address. Please update your bookmarks. FAQ.

Commit 747650e6 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

restore script

parent e6d9609f
#!/bin/bash
sudo service tomcat7 stop
sudo cp /opt/backup/backup.tar.gz .
tar -zxf backup.tar.gz
gzip -d map_viewer_db.gz
if [ -e "map_images.tar.gz" ]
then
tar -zxf map_images.tar.gz
if [ -e "/var/lib/tomcat7" ]
then
CATALINA_HOME="/var/lib/tomcat7"
fi
if [ -e "/var/lib/tomcat8" ]
then
CATALINA_HOME="/var/lib/tomcat8"
fi
sudo rm -rf $CATALINA_HOME/webapps/map_images/
sudo mv map_images $CATALINA_HOME/webapps/
fi
if [ ! -e "~/.pgpass" ]
then
echo "localhost:5432:*:map_viewer:123qweasdzxc" >~/.pgpass
chmod 0600 ~/.pgpass
fi
dropdb -U map_viewer map_viewer;
createdb -U map_viewer map_viewer;
psql -U map_viewer -f map_viewer_db map_viewer
sudo rm backup.tar.gz
rm map_images.tar.gz
rm map_viewer_db
rm minerva.war
sudo service tomcat7 start
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment