Please follow the steps below to complete the h2 migration:
For more information. Please refer to the documentation at https://support.smartbear.com/virtserver/docs/installation/h2-migration.html

1. Stop the VirtServer
2. Open the command prompt and navigate to the folder where the h2 migration tool is located.

3. Run the following script to start the migration.
   For Windows: h2-migrator.bat
   For Linux/Mac: h2-migrator.sh

4. While running the script, please provide the newly installed VirtServer installation directory
   e.g.,
   For Windows: h2-migrator.bat "C:\Program Files\SmartBear\VirtServer-3.23.0"
   For Linux/Mac: ./h2-migrator.sh /opt/SmartBear/VirtServer-3.23.0

5. To complete the migration without any human intervention, please use the -u flag as in the following command
   For Windows: h2-migrator.bat "C:\Program Files\SmartBear\VirtServer-3.23.0" -u
   For Linux/Mac: ./h2-migrator.sh /opt/SmartBear/VirtServer-3.23.0 -u

Note: If any memory issues occur during the migration.
      please increase the maximum heap memory allocated to the migration tool in the jvm-config.properties file located in the migration tool directory.

VirtServer running in Docker container
(To be used only if the Virtserver H2 database is used in a persistent docker volume and is to be used with the latest Virtserver docker image.)

1. Stop the VirtServer Docker container
2. Run the migration script by providing additional args - virtserver config file path (-c) and output directory path (-o)

   For Windows: h2-migrator.bat "C:\Program Files\SmartBear\VirtServer-3.23.0" -c "C:\Users\user\DockerVS1\virt-server-docker.yml" -o "C:\Users\sachin.hm\DockerVS1"
   For Linux/Mac: ./h2-migrator.sh /opt/SmartBear/VirtServer-3.23.0 -c /home/user/DockerVS1/virt-server-docker.yml -o /home/user/DockerVS1


Migration revocation steps:

1.If you are in VirtServer 3.16.0 or lesser version and wanted to revert back after h2 migration, you can delete the virt-server.h2.mv.db file manually and restart VirtServer 3.16.0.
  For Windows : C:\Users\<user>\.readyapi\virt-server\virt-server.h2.h2.db
  For Linux : home/<user>/.readyapi/virt-server/virt-server.h2.h2.db

1.If virtserver db files are present in "<home>/.readyapi/virt-server" directory then run the virtserver-h2-migration-revert script file
  For Windows : revert-h2-migrator.bat
  For Linux/Mac : ./revert-h2-migrator.sh

2.If virtserver db files are present in any other directory other than "<home>/.readyapi/virt-server" then run the following command
  For Windows : revert-h2-migrator.bat --db_path=C:\path\to\virt-server\virt-server.h2.mv.db
  For Linux/Mac : ./revert-h2-migrator.sh  --db_path=home/user/.readyapi/virt-server/virt-server.h2.mv.db