This section provides information for users who upgrade from Platform 4.2 (eXo Chat 1.1) to Platform 4.3 (eXo Chat 1.2).
As of eXo Chat 1.2.0, a new data model is used, so your current Chat database (in MongoDB) has to be upgraded. You can let eXo Platform upgrade your Chat database, or you can do it manually.
Backing up your database
You can use mongodump command to back up your database, assume its name is exochat:
Against a non-authentication MongoDB server:
mongodump --db exochat --out /path/to/store/the/backupAgainst a secured MongoDB server:
mongodump --host {host} --port {port} --username {username} --password {password} --db {dbName} --out "{backup_folder}"Automatic upgrade
You just need to start eXo Platform 4.3 with Chat add-on installed and configured against your database. eXo Platform will upgrade it during the startup.
Manual upgrade
You can upgrade the database manually using a script packed along with the add-on 1.2. After the backup:
Install the Chat add-on 1.2 to obtain the script. It is migration-chat-addon.js
located under:
$PLATFORM_TOMCAT_HOME/webapps/chatServer.war!/WEB-INF/lib/server-{version}.jar
in Tomcat.
$PLATFORM_JBOSS_HOME/standalone/deployments/platform.ear/chatServer.war!/WEB-INF/lib/server-{version}.jar
in JBoss.
Run the script. In case of a non-authentication MongoDB server:
mongo exochat migration-chat-addon.jsIn case of a secured server:
mongo {host}:{port}/{dbName} -u {username} -p {password} migration-chat-addon.jsHow to check that the upgrade is fine
The easy way is to check the collections.
In database of Chat 1.1, you will see room_rooms
:
> use exochat > show collections notifications room_b58b27b61820079232669e40e6a1170e8727d3be room_rooms system.indexes users
In database of Chat 1.2, you will see rooms
:
> use exochat > show collections messages_room_e messages_room_s messages_room_t messages_room_u notifications rooms system.indexes users
Notes for Bitnami users
As of Platform 4.3, the Bitnami installer will automatically install its own MongoDB instance, configure Chat add-on and start Platform. As consequence, Bitnami users who have been running a Platform 4.2 instance with a Chat database will need to drop the Bitnami Chat database, replace it with their old database and thus, they need to upgrade the database as described above.
Here are some notes for the situation:
All the configurations required to connect to Bitnami MongoDB database are set during the installation and then are saved into
chat.properties
, including the database name.
You can use the new configuration created by Bitnami, or keep using your old configuration. However, you are recommended to use the MongoDB instance of Bitnami, while the other parts such as chatPassPhrase are all up to you.
So here is an example procedure for Bitnami users:
Delete the database created by Bitnami. Assume the name is bitnami_exoplatform and you agree to use this name.
Dump your old database and import it to Bitnami MongoDB server, as new bitnami_exoplatform database.
Make sure the new database is accessible by the user created by Bitnami.
Re-configure the chat.properties
file created by Bitnami, for example change the chatPassPhrase
.
Start eXo Platform to let it upgrade the database automatically.