Sidehistorik
...
Kodeblok | ||
---|---|---|
| ||
drop database confluence; create database confluence CHARACTER SET utf8 COLLATE utf8_bin; grant all privileges on confluence.* to confluence@localhost identified by 'confconf'; flush privileges; | ||
Kodeblok |
Why change the server.xml and setenv.sh
...
Now, change the files as needed.
Restore Confluence script
This is the script that restores the Confluence on the DR server drserver.site.dk - It needs the files from above to work.
Kodeblok |
---|
#!/bin/bash if [ `id | grep "uid=0(root)" | wc -l` -lt 1 ] then echo "must be executed as root" exit 1 fi if [ -f /mysqlbackup/confluence.sql ] then rm /mysqlbackup/confluence.sql fi echo "Unpacking Confluence database backup" gunzip -c /mysqlbackup/confluence.sql.gz > /mysqlbackup/confluence.sql echo "Dropping and Creating Confluence and JIRA databases" mysql -uroot -password < /scripts/CreateConfluenceDatabase.sql echo "Importing Confluence database backup into MySQL - This takes a while..." mysql -uroot -password < /mysqlbackup/confluence.sql if [ $? -eq 0 ] then echo "Import finished ok" else echo "mysql client ended with exit code different from 0. Stopping script" exit 1 fi echo "Copying server.xml and setenv.sh to Confluence configuration" cp /scripts/server.xml.confluence /opt/confluence/conf/server.xml cp /scripts/setenv.sh.confluence /opt/confluence/bin/setenv.sh rm /opt/confluence/logs/catalina.out echo "Ready for Starting Confluence for http://drserver.site.dk" echo "Start with: /opt/confluence/bin/startup.sh;tail -f /opt/confluence/logs/catalina.out" |