To export Azure AD Connect configurations, you can go to the Azure AD Connect tool and select the additional task named "View or Export Current Configuration." By default, the settings are exported to %ProgramData%\AADConnect. You can choose to save the settings to a protected location to ensure availability if a disaster occurs.
To get a quick view of your settings, you can check "Review Your Solution" in Azure AD Connect to see your current configurations.
To import previously exported settings:
1 - Install Azure AD Connect on a new server.
2 - Select the Customize option after the Welcome page.
3 - Select Import synchronization settings. Browse for the previously exported JSON settings file.
4 - Select Install.
Do you have a staging server? I have seen this error before when there are different configurations between the staging server and the production server (different versions, etc). In that case you will also need to review the configurations to make sure they match on both.