+ Start a Discussion
Internal PartnerInternal Partner 

How to export change sets or migrate it from Sandbox to Sandbox in different orgs?

Hi all,

everybody writes about how to migrate a change set from a Sandbox to Production, but nobody about how to migrate or export from a Sandbox environment in one organization to a Sandbox organization in another environment.
I have read about using the ANT migration tool, but for the ones who are newbie using ANT there aren't detailed descriptions how to export a change set or to use ANT to migrate the change set from Sandbox to Sandbox in differente orgs.

Does somebody here knows how to do it?
Raj VakatiRaj Vakati
With Changeset, it's not possible to export. you need to use ANT Migration toll to do it. 

https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/forcemigrationtool_install.htm 
GulshanRajGulshanRaj
There are several ways through which you can deploy component from one org to another org:
1) Using Eclipse. Installation instruction (https://developer.salesforce.com/docs/atlas.en-us.salesforce_developer_environment_tipsheet.meta/salesforce_developer_environment_tipsheet/salesforce_developer_environment_eclipse.htm)
Right-click on the project and click on "Deploy to Server". This will bring wizard.
User-added image

2) Using Mavensmate:
Click on Deploy to server
User-added image
Provide target org credential on clicking "Deployment Connections" and  then deploy
User-added image
3) Using Ant Migration tool:
Here is video (https://www.youtube.com/watch?v=QJ0WQthnlBM)


Thanks & Regards
Gulshan Raj
Sr. Developer

User-added image
 
Internal PartnerInternal Partner
Thanks guys for your kind answers! :).
@GulshanRaj: Wow! thank you so much. The video in your suggested link is helpfuk and gives the basis how to retrieve and deploy metadata with ANT. Do you know this?:

- According to the video, in the package.xml you see the name ApexClass and ApexTrigger, where does these names come from?. Say, we have Lightning Components, what be the name to put in the package.xml?
- When you deploy you don't need the package.xml, but only to put all your elements to deploy in the codepkg folder, right?
- The build.xml includes tags <target name="">: Is this where you set username, password and org URLs to retrieve (source org) and to deploy (target org)?

 
GulshanRajGulshanRaj
Here are answers:
-Maybe that package.xml was configured already, that's why showing components. package.xml is used to define metadata which needed to deploy or retrieve components. Refer this link to understand  package.xml (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/manifest_samples.htm).  This is how we define metadata for  Lightning component in package.xml
<types>
        <members>FirstLightningComponent</members>
        <members>SecondLightningComponent</members>
        <name>AuraDefinitionBundle</name>
</types>

- Package.xml is mandatory for both deployment or retrieval.
- Correct, you have to provide target org credential there for deployment to target org. For retrieving components you need to define source credential there.


Please let me know if you have any question.


Thanks
Gulshan Raj
Chirag MehtaChirag Mehta
You may want to check out "Download Salesforce Change Set package.xml" chrome extension which helps you download package.xml of a changeset. Later you can use this package.xml to extract ZIP (source) using ANT or any metadata API tool.

https://chrome.google.com/webstore/detail/download-salesforce-chang/olkmefomaellbafiabkljcemiljkkbeh
Thierry.TROUINThierry.TROUIN
I confirm, the chrome extension "Download Salesforce Change Set package.xml" is splendid.
Warning it work only on classic, not in lightning
Anatolie Cernii 2Anatolie Cernii 2
Awesomeness confirmed! @Chirag Mehta, thank you for the chrome extension!