1. Copy the applications, files, and configurations. Unfortunately this could only be done manually.
2. Once the environment is copied, enroll a test device to check that everything is copied well.
3. After the test is passed, you can copy the devices (there's a semi-automatic flow by exporting the device list from the old server and importing it to the new server, menu Functions -> Import or Export devices).
4. The last step is the migration. Set the new server URL in MDM settings tab in the configuration settings on the old server.