# Restoring Salesforce Metadata and Custom Objects Using Workbench

While performing out-of-place restores of partial or complete metadata and custom objects, there is a possibility of restore failures due to mismatch in configuration between source and destination environments or any other Salesforce restrictions. In such case, it is recommended to restore the metadata and custom objects using Workbench.

## Restoring Metadata Using Workbench

1. Download the metadata files from Commvault.

2. Create a package.xml file. For more information, see the Deploying and Retrieving Metadata with the Zip File in the Salesforce documentation.

3. Create a zip file that contains the downloaded metadata files and package.xml.

4. Deploy the zip file via Workbench using the following steps:

   1. Log in to your Salesforce Production or Sandbox environment from the Workbench portal.

   2. From the navigation pane, go to migration > Deploy.

   3. Click Choose File and select the zip file.

   4. Select the Allow Missing Files and Single Package checkboxes and other options as applicable.

   5. Click Next.

   6. Click Deploy.

      The metadata files are restored.

## Restoring Custom Objects Using Workbench

1. Download the custom objects from Commvault.

2. Create a package.xml file. The following is an example format of the xml file

       <?xml version="1.0" encoding="UTF-8"?>
       <Package xmlns="http://soap.sforce.com/2006/04/metadata">
           <types>
               <members>MyCustomObject__c</members>
               <name>CustomObject</name>
           </types>
           <types>
               <members>MyCustomLayout__c</members>
               <name>CustomLayout</name>
           </types>
           <types>
               <members>MyCustomTab</members>
               <name>CustomTab</name>
           </types>
           <version>60.0</version>
       </Package>

3. Create a zip file that contains the downloaded metadata files and package.xml.

4. Deploy the zip file via Workbench using the following steps:

   1. Log in to your Salesforce Production or Sandbox environment from the Workbench portal.

   2. From the navigation pane, go to migration > Deploy.

   3. Click Choose File and select the zip file.

   4. Select the Allow Missing Files and Single Package checkboxes and other options as applicable.

   5. Click Next.

   6. Click Deploy.

      The custom object files are restored.

×

Loading...