Newer Version Available

This content describes an older version of this product. View Latest

Retrieving Metadata from a Salesforce Organization

To retrieve Lightning Platform components:
  1. Open a command prompt.
  2. Run Ant by specifying a target name in build.xml. If this is the first time you are running Ant, use ant retrieveUnpackaged to retrieve unpackaged components specified in package.xml.
  • The sample build.xml contains some useful targets for various retrieve() and deploy() options that you can modify or use as is. To see a list of all your named targets in build.xml, enter ant -p at the command line.
  • You can deploy or retrieve up to 10,000 files at once. AppExchange packages use different limits. In API version 43.0 and 44.0, AppExchange packages can contain up to 12,500 files. In API version 45.0, AppExchange packages can contain up to 17,500 files. In API version 46.0, AppExchange packages can contain up to 22,000 files. In API version 47.0 through 50.0, AppExchange packages can contain up to 30,000 files. In API version 51.0 and later, AppExchange packages can contain up to 31,000 files.The maximum size of the deployed or retrieved .zip file is 39 MB. If the files are uncompressed in an unzipped folder, the size limit is 400 MB. If you are working with many components, use the listMetadata target to identify the subset of files that you want to retrieve. You can also retrieve batches of components as described in Retrieving Components in Bulk.

Note