7

I am just getting started with sfdx and trying to retrieve all the metadata present in my sandbox using the command sfdx force:mdapi:retrieve --retrievetargetdir force-app. It runs fine and creates a zip file called unpacakged.zip but no metadata in it.

How do I configure so that it retrieves all the metadata present in my sandbox(not scratch org)?

This is what my folder structure looks like:

.
├── config
│   └── project-scratch-def.json
├── force-app
│   ├── main
│   │   └── default
│   │       └── aura
│   ├── package.xml -> Created by retrieve command and it is plain 
│   │                   package.xml
│   └── unpackaged.zip -> Created by retrieve command but no metadata 
│                         in it.
├── README.md
└── sfdx-project.json
6

You do not need to use unmanaged package , if you have package.xml in your root folder of the project try the below

sfdx force:mdapi:retrieve --retrievetargetdir force-app  -k package.xml

Its clearly documented here on what parameters retrieve command can take

| improve this answer | |
  • Thanks, I will try. I looked at the documentation but didn't know manifest file means package.xml file. – javanoob Oct 7 '17 at 0:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.