Salesforce Ant Migration in Ubuntu

Salesforce Ant Migration Ubuntu

Copying data is a very powerful tool.We all have done that in our High schools, copying assignments.emoji1

It also plays a significant role in the Professional world. Lets discuss a use-case.If we want to copy Data(like Apex Classes, custom Fields, Triggers, Reports etc.) from one salesforce Org to another Salesforce Data Migration, what efforts does it take?

There are three scenarios for it.

Copying data from –

1.) sandbox to sandbox,

2.) sandbox to Production,

3.) Developer Org to Developer Org.

Salesforce Data Migration

For first two scenarios, creating Change sets is easy, you can also use ANT Migration..But for third scenario, we will have to use ANT Migration.

# For that first you need to download this from Google Drive – https://drive.google.com/drive/folders/1h0Sim-jk1xdoyCZm6ZfEmKqdgLyEpYEr?usp=sharing package and place it anywhere as per your convenience.In my case i have placed it on Desktop.

—————————————————————————————————————————-

# Now go to – salesforce_ant_40.0/sample/build.properties Folder using point and Click(not by Terminal) and open build.properties file.Now

Specify the login credentials for the desired Salesforce organization

ORGANIZATION 1 :

sf.username = [email protected]

sf.password = passwordSecurityToken

ORGANIZATION 2 :

sf1.username = [email protected]

sf1.password = passwordCN82A1pWsJigrSSTFDXXXXXX

—————————————————————————————————————————-

# Open Terminal & type command – cd/home/manpreet/Desktop/salesforce_ant_40.0/sample

Apache ANT Migration

You sample folder somewhat looks like :

Sample Folders For Data Migration

—————————————————————————————————————————-

# Next Command – ant retrieveUnpackaged

where retrieveUnpackaged is the folder name where Data is ant retrieved.With this a new folder with the name retrieveUnpackaged will be created in your sample folder.

UnPackaging Data in Salesforce Migration

Hence your ORGANIZATION 1 Data is retrieved.

—————————————————————————————————————————-

# Next Step is Deploying this to ORGANIZATION 2, for that type command – ant deployUnpackaged. Your Data will be deployed.

Apache ANT Migration

 

Migration in SalesforceIn short, these 3 commands –

_________________________________________________

#1. cd/home/manpreet/Desktop/salesforce_ant_40.0/sample

#2. ant retrieveUnpackaged

#3. ant deployUnpackaged

_________________________________________________

**** Note :- Your Data will be deployed if nothing is missing in your package.xml file.Else errors will be thrown if some dependencies are missing.Like if you are trying to deploy Custom fields of a Custom Object but you have not yet deployed that Custom Object then error will be thrown as dependency is missing. Add that Custom Object first in your package.xml file.

Without data, you are just another person with an opinion.” – W. Edwards Deming

0 Comments

Leave a Reply

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2020 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?