Search
Close this search box.

How to Pull a Metadata Backup From Workbench

Red Argyle Logo without name
Red Argyle logo

Before we do work in an org, we take a metadata backup of the org to give us a moment-in-time copy of the metadata. As we move forward with the project, having completed this step allows us to revert our changes back to that exact moment as well as see what may have changed in the org since. There are a few different ways to perform these backups:   

In today’s post, I’ll focus on giving you step-by-step instructions for completing a metadata backup from Workbench.

 

How to Pull Metadata Backup From Workbench: Your First Move

Package.xml Manifest File

First things first: you’ll need to have a package.xml file in order to pull your metadata backup from Workbench. You can use this Heroku app to generate your package.xml file: https://packagebuilder.herokuapp.com/. And for more information on package.xml files, and why they’re so important, here’s a helpful Salesforce link: https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/daas_package.htm.

 

Instructions for getting the package xml file for a metadata backup from Workbench

 

The screenshot above is an example of some of the components you could retrieve using API version 34.0. (Don’t forget–all orgs were upgraded to Summer ‘16 this month, making the most recent version 37.0.)

The package.xml file can be used to retrieve records for all types of metadata in Salesforce. If there are no records for a specific metadata type, the retrieve will still pass, it just will not include those metadata types with no results.

Note: You cannot use an asterisk wild card to work with all standard objects; each standard object must be specified by name.

In addition to the Heroku app I list above, there are other options out there to help you get a list of your metadata, like Sublime Text and Mavensmate, or this Salesforce Toolkit. Apps like these will help you generate a full or partial package.xml file, depending on your needs.

Now keep that package.xml file handy as you follow these step-by-step instructions for completing a metadata backup from Workbench–you’re going to need it.

 

How to Pull Metadata Backup From Workbench: Step-by-Step Instructions

  1. Navigate to workbench.developerforce.com.
  2. Choose the environment:
    • Production – used for production environments as well as developer environments
    • Sandbox –  used for all types of sandbox environments
  3. Choose the API version that matches the version for which you generated your package.xml file:
    • 37.0 – this is the current version of Salesforce, Summer ‘16
    • 36.0 – Spring ‘16
    • 35.0 – Winter ‘16
    • 34.0 – Summer ‘15
    • 33.0, etc. – each release of Salesforce has a different API version

       

      Metadata backup from Workbench instructions, image 2
      Steps 2 & 3 above: Choose the environment type and API version before logging into Salesforce.

       

  4. Check “I agree to the terms of service.”
  5. Click “Login with Salesforce”
    • Enter the username and password for the environment
      Note: If you’re currently logged into Salesforce in the same browser in which you have Workbench open, you can skip to the next step. Log out of other orgs if you do not want to use Workbench with them, or open Workbench in another browser.
  6. Navigate to the “Retrieve” UI
    • In the “Jump To” picklist, choose “Retrieve” and click “Select”
    • In the Migration menu in the nav bar, click “Retrieve”
  7. For “Unpackaged Manifest,” choose your package.xml file (as discussed above)

     

    Metadata backup from Workbench instructions, image 3
    Step 7 above: Add your package.xml file as the Unpackaged Manifest.

     

  8. Leave “Package Names” empty
  9. Leave “Single Package” false
  10. Click “Next”
  11. Once you have successfully staged the request, click “Retrieve”
  12. Review and download results
    Note: The page will continue to refresh until the request passes or fails.
  • Results at the bottom of the page give you information on your retrieve request:

Done – this will be true when the results are ready

ID – this is the ID of the operation that was performed

Status – this will be “succeeded” or “failed,” based on the operation results

Success – this will be true if the retrieve is done, succeeded, and the manifest file successfully pulled down the metadata into a zip file

FileProperties – these are all of the metadata components that were pulled with the retrieve; you can preview them before you download the file

Messages – these messages give you insight into the retrieve operations results; e.g., some metadata types may not exist in the API version chosen, may not have any components to retrieve, or may not be available in the environment that you are pulling

  • When the retrieve passes, a zip file will be ready for download; click “Download Zip File” to get your backup

 

Metadata backup from Workbench instructions, image 4
Step 12 above: Process Status UI displays the status of the operation and will provide a link to the package to download upon success.

 

Are you new to using Workbench for metadata backup? Let us know how it goes in the comments here or via Twitter. And for more information on using Workbench, be sure to check out this blog post from Tom. I hope you’ll find this guide helpful!

Red Argyle logo
Red Argyle logo

Related Blog Posts