AIV Server Migration

This contains set of instructions to migrate whole AIV from one server machine to some others server machine with all data.

Use case: Server migration is required case when AIV is running on one server machine and client wants to shift AIV to some other server machine or client wants to create one development server on some other server machine with all existing data of the existing server.

So here are the steps to migrate AIV from one server to another server with whole data.

Prerequisites: In order to get started, there are some prerequisites we have to take care of as below,

> Same Database should be installed at the server in which we are moving AIV. If AIV is installed with MySQL or PostgreSQL in existing server, same database with same credential should be installed.

> Database schema should be same as in current server

> There should be enough space on Server at the same location AIV in installed currently. It is best practice to move AIV on the same location as in current Server.

1. Take backup of database [MySQL or PostgreSQL] where AIV is installed.
Backup/Restore with MySQL
Backup/Restore with PostgreSQL

2. Move this dump file to new server and restore this script file into same schema which is created as per prerequisites.

3. Once database is restored at the new server, copy whole AIV folder to new server but on the same location. For example, if AIV is working in C drive, then it should be pasted on the same location e.g C driver in new server.

4. Once AIV folder is copied to new server on the same location, open config.json file located in your_location>AIV>repository>config folder with text editor.

5. In config.json file Search for “security” property and change "checked": true to "checked": false in case if external security is enabled. If "checked": false, no need to change it keep It false. The reason behind it is, if external security is enabled and we are starting AIV, it will start fetching all users but as we have migrated to new server machine, the existing license file will not work. So we will enable this after license is updated.

6. Now port number used in AIV login URL is used by current server, so we need to change the server port number for AIV copied in to new server. To do that open server.xml file in any test editor and find the line where existing port number is defined. For example [ ]

7. Change port number which is not occupied anywhere else in this property (port="port_number") and save it.

8. Now start AIV by running startup.bat file from tomcat > bin folder and wait till it get start

9. Once server is started, open AIV in browser by entering URL [with defined port number] and logged in with user having admin credentials, you will see a license request page on the screen [if license page does not appear automatically then go to administration section and open license page]

10. Request for license from this page and update license as soon as you received new license

11. Once the license is updated, you can enable security property to "checked": true (file path is mentioned in step 5) if you are using SSO. Leave this step if you are not using SSO.

12. Make the above changes, save it and restart the tomcat server and refresh external security from Aiv_Configuration settings from the admin section of AIV.

NOTE: This will work if AIV is copied on the same location and with the same credential of DB. If your destination location is different, user need to perform certain changes in order to make it work. Please refer below steps and apply changes accordingly.

Check the data source, schema[database], username & password from context.xml (Find context.xml in your files, path: tomcat - 8080\webapps\aiv\META-INF)
Check the username and password of your data source, if needed change it.
Check data source name from resource and change it as required.

Example:
• Username: The username of the database.
• Password: The password of database.
• Bhaumik: Schema[database] name.

Change path in files as follows:
Path of logs, repository and other settings needs to be updated as we are migrating AIV in different location. Check existing path in below files and update new path in mentioned location.

Change new path in all the “. PROPERTIES files”

Location: AIV\apache-tomcat-8.5.61\webapps\aiv\WEB-INF\classes

If you are facing difficulty in starting migrated server, please contact us at Email: support@aivhub.com.