During our development we have used ArcMap 10.5 to be linked to our "Temporarly" PostgreSQL +PostGIS, so we have loaded the data from the Temp DB, we published it as a services to our ArcGIS server, and eventually we have built a set of Maps and Apps by using ArcGIS Portal.
My question now, as we need to migrate the data from the Temp DB to another DB with the same version but with a different "IP", is it possible to do so? will the published services (based on the temp DB) be able to be referencing to the new DB?
You can also try to run the ExternalizeConnectionStrings.bat tool if it's upgraded from pre-10.4 and then update the instance name of the data store within Manager. If this is a site created at 10.4 or on, they're already externalized. The story behind the tool is that if an organization had a password policy within the geodatabase that required the password to be changed every so often, the services using those credentials would need to be republished. By externalizing the connection string, it simply creates a reference to the data store item so if the data store item changes, all services using that referenced string are updated. It was designed for passwords but should work for database instance names as well.