Retrieving metadata from a sandbox
To start retrieving metadata from a sandbox, we need to configure build.xml
, package.xml
, and build.properties
. The build.properties
file is used to specify Salesforce credentials to form a connection between your machine and the Salesforce sandbox. The build.xml
file contains Ant tasks that need to be performed in the sandbox. package.xml is project manifest it will contain packages to retrieve or deploy.
We will go through the common procedure to retrieve metadata from a Salesforce organization to a local machine using the Ant Migration Tool:
- Go to the location where you extracted the Force.com Migration Tool
.zip
file. You need to edit thebuild.properties
file using any editor. - In this case, we will use vim editor. Run the following command:
$vim build.properties
- Let's have a look at the sample
build.properties
file:
build.properties sf.username = devopsxxx@Salesforce.com.dev sf.password = mypassxxxxxxxxxxxxxxxxxxxxxxxxx sf.token = <Security Token Generated...