Skip to content

AIV Server Migration Windows

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.
  1. Move this dump file to new server and restore this script file into same schema which is created as per prerequisites.

  2. 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.

  3. 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

  4. 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.

  5. 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 <Connector port="8443" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>

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

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

  3. 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]

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

  5. 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.

  6. 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.

Example:

<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxTotal="30" maxIdle="10" maxWaitMillis="10000" minIdle="5" name="jdb./activeidb" username="AIV" password="Test" url="jdbc:mysql://localhost:3306/user?allowPublicKeyRetrieval=true&amp;useSSL=false" type="javax.sql.DataSource" />
  • 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

SrNoFile NameChanges required at
1log4j.propertieslog4j.appender.systemLogger.File, log4j.appender.dbLogger.File, log4j.appender.securityLogger.File, log4j.appender.out.File, log4j.appender.userLogger.File
2settings.propertiesRepositoryLocation, LogDir, BackupLocation, RestoreLocation, DeliveryLocation, Database
3server.xmlFind Host tag at bottom and change path of docBase attribute
4context.xmlFind first Resource and make changes in url, username and password attributes if database is changed

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