Installation/Appliance/Migration to 14.04
Contents |
Introduction
A good idea is, if possible, to keep the old system around for a time. This way if something goes very wrong during or shortly after this migration. It is possible to revert to the initial system.
Migrate to appliance 14.04
Currently it is supported to migrate to the Appliance 14.04 from:
- Openbravo Appliance 12.04
- Old appliance based on rPath
- Ubuntu package: openbravo installed with the openbravo package for Ubuntu (sudo apt-get install openbravo-3)
- Ondemand: Openbravo Ondemand.
For migrating to the new appliance it is required at least Openbravo 3.0PR15Q1.3.
In case of Openbravo retail it is required at least 3.0RR15Q1.4.
Before the migration it is high recommended to have a running instance in a consistent state. This means that no local changes should be present in the database and that the application should compile without any issues.
This is recommended as it allows for clear and easy separation of any potential issue during the migration.
Preparation checklist for migration
- Prepare new server, configure the timezone, install updates, reboot
- Check the tomcat and postgres config and migrate to the new server
- /etc/profile.d/tomcat.sh # check if you have changed the xmx of tomcat, etc
- /etc/postgresql/9.3/main/postgresql.conf # check if you have changed the shared buffers, the track functions, etc
- Note: Ensure that the change is still needed, since maybe the new default value is equal or greater than old one.
- Check that you don't have any other databases different that the Openbravo standard one, the backup will ignore it and you need to copy manually in case that you still need it.
- Copy the needed keys of the /home/openbravo/.ssh/authorized_keys.
- Move the backups config
- /etc/openbravo-backup.conf
- crontab -l # as openbravo user will show the backups schedule
- Do a migration test to ensure that everything continues working in the new system
- When you do the final migration, remember that the first step is stop the production tomcat.
From Openbravo appliance 12.04
Attachments, check that you have the backups in the usual path, if not you need to manually copy to new instance, for appliance: /opt/OpenbravoERP/attachments
Appliance 14.04 has PostgreSQL 9.3 and in appliance 12.04 is PostgreSQL 9.1, the migration process will update the database, usually there is no problems in this migration but if you have custom developments, remember to check that they continue working.
Backup for migrate from appliance 12.04:
- Create a backup in the appliance.
If the new server is configured with public key, then you can follow this process.
Connect to the new server using a private key that is also valid for the old server:
ssh -A openbravo@<ip_new_server>
The '-A' option kind of exports the private key so allows to connect from the new serer to the old one using it. Care should be taken when using the '-A' option as to only use it when connecting to trusted servers.
Then copy the backup from there to the new server:
sudo mkdir -p /backups/manual # create folder to store manual backups sudo chown -R openbravo:openbravo /backups # fix owner of backups folder recursively scp openbravo@<ip_old_server>:/backups/manual/backup-xxx.tar /backups/manual/ # copy the backup from the old machine into the manual backups dir of the new instance. # Note: Change backup-xxx.tar with the name of the backup just created.
From Ondemand
The Ondemand server is based in Appliance 12.04, so the steps are exactly the same, go there.
Note: if you migrate from Ondemand to an Appliance 14.04, then you will not able to go back to Ondemand. Because you can not downgrade from PostgreSQL 9.3 to 9.1.
From Ubuntu package
Attachments, check that you have the backups in the usual path, if not you need to manually copy to new instance, for Ubuntu package: /opt/OpenbravoERP-3.0/attachments
Appliance 14.04 has PostgreSQL 9.3 and in the Ubuntu package 12.04 is PostgreSQL 9.1 (Ubuntu package 10.04 has PostgreSQL 8.4), the migration process will update the database, usually there is no problems in this migration but if you have custom developments, remember to check that they continue working.
Backup for migrate from Ubuntu package:
- ssh ubuntu@<ip_old_server>
- sudo su - openbravo
- cd $HOME
- wget https://code.openbravo.com/tools/rm/appliances-migration/raw-file/tip/openbravo-migrate-from-ubuntu-package
- chmod +x openbravo-migrate-from-ubuntu-package
- ./openbravo-migrate-from-ubuntu-package
If the new server is configured with public key, then you can follow this process.
Connect to the new server using a private key that is also valid for the old server:
ssh -A openbravo@<ip_new_server>
The '-A' option kind of exports the private key so allows to connect from the new serer to the old one using it. Care should be taken when using the '-A' option as to only use it when connecting to trusted servers.
Then copy the backup from there to the new server:
sudo mkdir -p /backups/manual # create folder to store manual backups sudo chown -R openbravo:openbravo /backups # fix owner of backups folder recursively scp openbravo@<ip_old_server>:/home/openbravo/backup-xxx.tar /backups/manual/ # copy the backup from the old machine into the manual backups dir of the new instance. # Note: Change backup-xxx.tar with the name of the backup just created.
From old rPath appliance
Attachments, check that you have the backups in the usual path, if not you need to manually copy to new instance, for rPath appliance: /opt/OpenbravoERP/attachments
Appliance 14.04 has PostgreSQL 9.3 and in rPath appliance is PostgreSQL 8.4, the migration process will update the database, usually there is no problems in this migration but if you have custom developments, remember to check that they continue working.
The appliance 14.04 have OpenJDK while the old rPath appliance had SunJDK, in most cases this change is transparent, but rarely there could be problems with some fonts. Check your custom reports that they appear correctly. Also rarely there may be an issue with displaying some (logo) images.
Backup for migrate from rPath:
- Take a backup from the webconsole (http://<IP>:8003), guide of backups in rPath.
If the new server is configured with public key, then you can follow this process.
Connect to the new server using a private key that is also valid for the old server:
ssh -A openbravo@<ip_new_server>
The '-A' option kind of exports the private key so allows to connect from the new serer to the old one using it. Care should be taken when using the '-A' option as to only use it when connecting to trusted servers.
Then copy the backup from there to the new server:
sudo mkdir -p /backups/manual # create folder to store manual backups sudo chown -R openbravo:openbravo /backups # fix owner of backups folder recursively scp openbravo@<ip_old_server>:<backup_path>/backup-xxx.tar /backups/manual/ # copy the backup from the old machine into the manual backups dir of the new instance. # Note: Change <backup_path>/backup-xxx.tar with the full path of the backup just created (e.g. /backups/backup-xxx.tar).
Comparison of old appliance based on rPath with current appliance based on Ubuntu, go there
Restore
Then you can connect by ssh to the new server and the backup will be in /home/openbravo folder. From this point you can follow the normal restore process.
Things to do after the migration
After the migration, a good practice is take a look regularly to the system to check that everything continues fine:
- Check all the logs for errors.
- Check that the backups are done in the configured schedule.