Differences

This shows you the differences between two versions of the page.

Link to this comparison view

engine:7.8:backup_old [2017/04/10 10:59] (current)
Line 1: Line 1:
 +===== Standard Install/​Update Procedures =====
 +
 +==== Required Files ====
 +\\ 
 +The two essential software components for installing LTU engine are:
 +  ***LTU engine software**: ​  ​delivered as a .zip file 
 +  ***LTU license file**: ​  a machine-specific license key necessary for installing and activating the software.
 +
 +==== Installation Steps ====
 +\\ 
 +
 +  * Logged in as "​root",​ in the temporary directory, execute the  script **install.sh**
 +
 +\\ 
 +All system components will be installed and lauched via this single command.
 +\\
 +\\
 +
 +===== Installing LTU engine on EC2 =====
 +
 +Before unzipping the ltu-engine.zip:​
 +
 +\\  1. On your EC2 admin interface, go to Security policy:
 +    * add tcp port 8888
 +    * add tcp port 7789
 +    * add tcp port 8080
 +    * add tcp port 8081
 +
 +\\  2. System configuration :
 +    * Add your hostname to `/​etc/​hostname` and Refresh the hostname configuration:​
 +<file bash>
 +$> echo "<​hostname>"​ > /​etc/​hostname
 +$> hostname -F /​etc/​hostname
 +</​file>​
 +\\
 +
 +  * Add the external Amazon IP and hostname to `/​etc/​hosts`:​
 +<file autoconf /​etc/​hosts>​
 +<​external Amazon IP address> ​    <​hostname>​
 +</​file>​
 +\\
 +
 +   * Add the external Amazon IP address to `/​etc/​network/​interfaces` as a loopback entry:
 +<file autoconf /​etc/​network/​interfaces>​
 +iface lo:0 inet static ​
 +  address <​external Amazon IP address>
 +  netmask 255.255.255.255
 +</​file>​
 +
 +\\
 +\\
 +
 +
 +===== Upgrade Steps ===== 
 +\\
 +  *Unzip the installation software to a temporary directory.
 +
 +  *Logged in as "​root",​ in the temporary directory, execute the  script **install.sh** and follow the instructions.
 +
 +
 +==== Upgrade Engine 6.2.X to Engine 7 ===
 +
 +  * stop services
 +
 +  * apt-get update
 +
 +  * apt-get upgrade
 +
 +  * modify /​etc/​apt/​source.list
 +
 +  * change to wheezy
 +
 +  * apt-get update
 +
 +  * apt-get dist-upgrade
 +  ​
 +  * apt-get install lsb-multimedia erlang
 +
 +  * reboot
 +
 +  * stop services
 +
 +  * unzip engine 7 release archive
 +
 +  * go to your archive folder
 +
 +  * ./​install.sh
 +
 +  * answer yes
 +
 +  * answer yes (or no if you have a too big database for your disk or save some time)
 +
 +===== Backup / Restore Data =====
 +
 +In this procedure you need to setup 2 environment variables:
 +
 +<​code>​
 +BACKUP_FOLDER #Folder where you want to backup your data (could be a nfs mount point)
 +INSTALL_FOLDER #Folder where you extracted the ltu-engine-installation archive.
 +</​code>​
 +==== Live backup ====
 +
 +=== Optional step ===
 +
 +If you want to ensure your data is fully synchronized between the old and the new server, you need to stop the image addition during the migration.
 +To do that, run:
 +
 +<​code>​
 +su - ltu
 +ltud stop processor
 +</​code>​
 +
 +=== Required steps ===
 +
 +<​code>​
 +su - ltu
 +pg_dumpall -p 7791 > $BACKUP_FOLDER/​engine.dump
 +mkdir -p $BACKUP_FOLDER/​data/​ltu
 +cp -r /​opt/​ltuengine/​data/​ltu/​query $BACKUP_FOLDER/​data/​ltu
 +cp -r /​opt/​ltuengine/​data/​ltu/​reports $BACKUP_FOLDER/​data/​ltu
 +cp -r /​opt/​ltuengine/​data/​ltu/​storage $BACKUP_FOLDER/​data/​ltu
 +cp -r /​opt/​ltuengine/​config $BACKUP_FOLDER
 +chown -R ltu $BACKUP_FOLDER
 +</​code>​
 +
 +=== Optional step ===
 +
 +If you run the optional step on the origin server, you may want to restart the stopped services:
 +<​code>​
 +su - ltu
 +ltud start processor
 +</​code>​
 +==== Restore backup on a new server ====
 +
 +To restore a backup on a new server, you have to make sure the Engine version is exactly the same as the one on the server the backup was created on.
 +
 +  * Install the product with the configuration as //root//:
 +
 +<​code>​
 +cd $INSTALL_FOLDER
 +cp $BACKUP_FOLDER/​config/​*.lic ./
 +./​install.sh -i $BACKUP_FOLDER/​config/​ltuengine.spec
 +</​code>​
 +
 +  * After the installation,​ stop the product and restore old data :
 +
 +<​code>​
 +su - ltu
 +ltud stop all
 +ltud start database
 +psql -p 7791 template1 -c "DROP DATABASE saas_si;"​
 +psql -p 7791 template1 -c "DROP DATABASE saas_log;"​
 +cp -r $BACKUP_FOLDER/​data/​ltu /​opt/​ltuengine/​data
 +psql -p 7791 postgres -f $BACKUP_FOLDER/​engine.dump
 +</​code>​
 +
 +
 +If the new server has a different hostname than the old one, the database needs to be updated (the following is only for single server setup. For multi-servers setup please contact the support):
 +
 +
 +<​code>​
 +psql -p 7791 -U saas_admin saas_si -c "​update hw_server set hostname='​$NEW_HOSTNAME'​ where hostname='​$OLD_HOSTNAME';"​
 +psql -p 7791 -U saas_admin saas_si -c "​update application_property set value='​$NEW_HOSTNAME'​ where name='​database_hostname';"​
 +</​code>​
 +
 +<​code>​
 +ltud start all
 +</​code>​
 +
 +
 +  * Now you need to rebuild your application to recreate the kimas. To do that go to your frontoffice __http:​%%//​%%SERVER_IP:​8888__ and rebuild your application in the application section.
 +
 +
 +
 +