Overview
Exporting and importing index contents is useful when taking backups or when moving the index to another search cluster. Export and import are much faster than actual re-indexing. This article will describe how to export and import index contents via PowerShell scripts.Prerequisites
Download the following package and extract it to, for example, the folder where you have stored the IDOL installation package.Shared.zip
The procedure - Export
For the export we use PowerShell script ExportIDX.ps1. The script is in Scripts folder and it has quite good instructions within the code. The script can be used for taking full and incremental exports. This article focuses on full export and import.1. On M-Files server, stop MFIndexingManager service and wait until all indexer processes have been shut down.
2. On IDOL server, open PowerShell window and navigate into the Scripts folder.
3. Create a folder for your export, or use some existing folder, like C:\Temp, for example.
3. Use the following command to run the script:
powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -File .\ExportIDX.ps1 -srcIDOLHost localhost -srcIDOLACIPorts 9000,19003 -outputPath "C:\temp\IDOL_export"
In the example above, we export all data from Daily (9000) and from Main index (19003). You can check the ports from admin tool's IDOL settings or from .cfg file in each engine/component. Make sure the export folder exists before running the export.
If you are exporting from a single engine installation, only port 9000 is needed.
4. When the export is finished, there will be several .gz compressed files in the folder. Note down the name of the folder.
5. Start the MFIndexingManager service on M-Files server.
The procedure - Import
For the import we use PowerShell script ImportIDX.ps1.1. On M-Files server, stop MFIndexingManager service and wait until all indexer processes have been shut down.
2. On IDOL server, open PowerShell window and navigate into the Scripts folder.
3. Use the following command to run the script:
powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -File .\ImportIDX.ps1 -tgtIDOLHost localhost -tgtIDOLACIPorts 9000,19003 -inputPath " C:\temp\IDOL_export " -timestamp 20200921
In this example we are importing to a cluster setup, so we must specify ACI ports of Daily and DIH. The timestamp is the name of the folder that was created during export.
4. After the import is finished, the script will send DRESYNC command to the cluster for committing the added material. You can monitor the progress from DIH's index.log or from individual engine's index.log. After that you should start to find objects via the quick search.
5. Start the MFIndexingManager service on M-Files server.
