---
title: "Retrieve All Salesforce Metadata"
url: "https://blog.beyondthecloud.dev/tips/retrieve-all-salesforce-metadata"
category: "DevOps & CLI"
tags: "sfdx, admin"
published: "2024-06-07"
---

# Retrieve All Salesforce Metadata

Two Salesforce CLI commands pull an entire org's metadata: generate a manifest from the org, including managed and unlocked packages, then retrieve against that manifest.

You can retrieve all Salesforce metadata using just 2 Salesforce CLI commands.

```bash
sf project generate manifest \
    --from-org {ORG-ALIAS} \
    --name package.xml \
    --output-dir ./manifest \
    --include-packages managed,unlocked

sf project retrieve start \
    --manifest ./manifest/package.xml \
    --target-org {ORG-ALIAS} \
    --wait 120
```

If your retrieve is failing due to hitting limits, split your package.xml into smaller ones that do not exceed 10,000 components per file.
