We wish to migrate all our resources including MXDs and REST services from ArcGIS Server 10.3.1 on a machine to ArcGIS Server 10.5 on another machine. Both machines are on Windows Server 2012 R2, 64 bit operating system.
there were many suggestions in this thread
You might like to call the local Esri Tech Support to guide you through the whole process.