---
schema_version: "1"
id: df402b4c313292dea430d0336b6c801267a54f8de05fb7f70f3fdaff8137a06d
title: Retrieving Metadata from a Salesforce Organization
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-migration-guide/guides/daas/forcemigrationtool-retrieve.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-migration-guide/guide/forcemigrationtool-retrieve.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 275dd5dc7145c10b420454322d062ef71b81988637b532eb1c7fc94a0308c364
products:
  - Ant Migration Tool Guide
  - Platform Developer Content
---

# Retrieving Metadata from a Salesforce Organization

**note:** The Ant Migration Tool is retired with Spring ’24. The tool continues to function as-is for future API versions but isn’t updated with new functionality and isn’t supported. If Salesforce adds a new feature that is incompatible with Ant, the Ant Migration Tool won't be updated to support it. To manage metadata changes, switch to Salesforce CLI for a modern, supported developer experience.

To retrieve Lightning Platform components:

1.  Open a command prompt.
2.  Run Ant by specifying a target name in build.xml. If it’s the first time you’re running Ant, use `ant retrieveUnpackaged` to retrieve unpackaged components specified in package.xml.

**note:** -   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. 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 600 MB or 629,145,600 bytes. The size limit in bytes is calculated as 600 x 1024 x 1024. If you’re working with many components, use the [`listMetadata`](https://developer.salesforce.com/docs/platform/salesforce-migration-guide/guide/forcemigrationtool-listmetadata.md) 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](https://developer.salesforce.com/docs/platform/salesforce-migration-guide/guide/forcemigrationtool-retrieve-bulk.md#retrieving-components-in-bulk).

