...
While migrating from one environment to another, it is better to use CLI tools to automate the process. This utility allows the changes that were happened to applications (say environment variables have got changed) or components to be deployed to the server.
The properties that need to be replaced in the application are specified in a properties file. When the Utility runs, it makes the necessary changes as defined in the properties file and deploys the applications to the server.
Change Resources based on Environment property
...
Overview
Content Tools
ThemeBuilder