Database Migration Tool

Database Migration Tool

Migrate data between two databases as well as between operating systems (Linux to Windows and vice versa).

Possible database migrations  

Data can be migrated between two databases of the same installation as well as also different installation between the following servers:
  1. Postgres to Postgres
  2. Postgres to MSSQL
  3. MSSQL to Postgres
  4. MSSQL to MSSQL
By using the DBM tool, only the table data gets migrated whereas the files/attachments in the application are not migrated. The files and folders are zipped and placed under assetexplorer-directory which should be extracted in the destination server in case of migration to a different installation. 

Prerequisites  

Database configurations details (such as host, port, username , password ) of source server and destination server.
The server where the migration script (migratedb.bat/sh) is executed will be considered as source DB and source database details will be taken from conf/databaseparams.conf file.

Perform Database Migration   

In the destination database application:
 
When migrating to postgres,
 
i. Create Destination Database:

If using Bundled PostgreSQL DB,Start the application to create the destinationdb database using information from conf/database_params. You can modify the destinationdb details by executing bin/changeDBServer.bat/sh.

Note: Avoid using "postgres" as the username, since running the application as a superuser is restricted.
If using an external PostgreSQL,
Follow these steps below to configure external Db.

Stop the application after successful creation.

ii. Remote Connection Setup:
If connecting to PostgreSQL from a remote computer, follow the steps mentioned here.

iii. Empty Destination Database:

    For migration to occur, the destination database should be empty.
    Execute {build_dir}/bin/reinitialize.bat/sh to empty the destination database.
    For version 14202 and above, copy the reinitialize.bat/sh file from <product-home>\server\tools to the bin directory and execute.
 
iv. Start Destination Database Server:
If using bundled PostgreSQL, start the destinationdb server to establish connection with the source Db by executing {build_dir}/bin/startDB.bat.

Steps to be followed in the source database application:
 
v. Migrating to Destination Database:

From the source application, execute {build_dir}/bin/migrateDB.bat.
A dialog box will prompt for destination database server information.
Configure the destination DB details in the applet.
 
vi. Configure Destination Database Details:
 
For MSSQL,
    The database will be created while filling in details in the applet.
For PostgreSQL,
    Provide the PostgreSQL destinationDB details.
    Ensure the same credentials provided during the destinationDB creation are used.
    Avoid using "postgres" as the username, since running the application as a superuser is restricted.        
 
Also the destination database details can be filled in from the console by running migrateDB.bat --console
Select 1 if the destination database server type is postgres
Select 2 if the destination database server type is mssql.
Select 3 to exit.
 
 
Once the given destination details are connected, the type of migration is asked. If you are migrating data from one server to another in a same installation, choose data migration. If you are migrating the data to a different installation, select server migration.

If you choose server migration, the files/attachments backup will be taken as dbMigrationFileBackup.ezip and placed under <product-home>/dbMigrationFileBackup folder, which should be extracted in the destination installation.
 
Note: If you do not select a migration type, then by default Data Migration will be selected.
If the file attachment location is configured externally by configuring attachment settings, then the fileattachments folder will not be included in the migration. Since file attachments are not saved in the AssetExplorer directory, they are not included in filebackup. However, if server migration and the file attachments location are not configured externally, then it will be included.
 
 
 
 
 
 

Production or test setup confirmation  


Once you have selected a migration type, a popup will be shown to confirm whether you want to migrate the data to production or test setup. Click Yes if you want to migrate the data to the production build. If you want to test the migrated data in a test instance, you can click No. You can also Cancel the migration.
 
 
 
 
 
 Note: In the case of Postgres, the supported collation type is C in both source and destination servers. If the destination server has a different collation type, then you are prompted to create a database with the default collation type. If the source server has a different collation type, the collation type cannot be modified and hence you are prompted to take backup and restore it in a bundled database in case of migration to the production setup. Migration to the test setup is allowed though.
 
 
 
Once the type of migration is chosen and the production or test setup confirmation is done, the migration starts and the progress bar will be displayed.

 
 
When the database migration is complete, you will get a popup confirming the same.
 
 
 
On completion of a server migration, the following popup will be displayed, prompting you to extract the zipped files under <product/dbMigrationFileBackup> from the source server to <AssetExplorer> folder on the destination server before the server starts up.



If the file attachments folder is configured externally on the source server, then steps to configuring the same in the destination server will be displayed as well.
 
 
 
Similarly, if the migration fails, a popup will be displayed informing you of the same.


    • Related Articles

    • Configuring Database

      In GUI Setups AssetExplorer is bundled with PostgreSQL database. You can also configure the application to set up MSSQL database. Configure PostgresSQL database Go to <AssetExplorer_Home>\bin directory in the command prompt and execute the ...
    • FAQs Related to Database, HTTPS, and SSL

      How to change the Endpoint Central database from Postgres to MSSQL? By default, Endpoint Central agents come with bundled PGSQL but also supports MSSQL. Click here for a list of MSSQL versions supported by Endpoint Central. For detailed instructions ...
    • Change Default Postgres Database Password

      For Windows: Shut down ManageEngine AssetExplorer. Take a backup of the application or snapshot of the server. Open command prompt with admin privileges. Go to [AE-Home]\bin directory and execute the command: stopDB.bat Execute the command: ...
    • Introduction - CMDB

      Configuration Management Database (CMDB) is a centralized repository that stores information on all the significant entities of your IT environment. The entities, termed as Configuration Items (CIs) constitutes of hardware, software applications, ...
    • Agent-Based Scan

      How does an agent-based scan work? Refer to the following link: UEM Agent What are the OS supported in the agent-based scan? The following Windows OS versions are supported: Windows 10 Windows 8.1 Windows 8 Windows 7 Windows Vista Windows XP* ...