Salesforce provides a sandbox that you can use for testing and demo purposes. You can populate (seed) the sandbox with a Commvault backup from your production Salesforce data or another Salesforce sandbox. Data is restored from a local (sync) database.
Perform granular or bulk seeding by configuring rules or templates that specify the objects that you want to seed and the object records to use for the seeding. If you want to seed multiple objects that are not related, these objects need to be included in the seeding template. The seeding templates will be saved for immediate or future use, consistent reseeding of development or training sandboxes, or to be edited to create new templates.
You can specify any of the following records:
-
All records
-
Records that are returned from a user-defined SQL query
-
Records that have been backed up in the last N number of days
-
The most recently backed up N records
Tip
Due to the complexity and nature of Salesforce, some objects and records might not restore successfully. Issues that can block records from being restored include API limitations, data integrity, complexity in hierarchical relationships, and automation processes that utilize triggers, flows, and rules. To avoid errors or for faster results, disable the validation rules, Apex triggers, flows, and workflows. For the same benefits for managed packages, uninstall the packages. (Managed packages cannot be disabled using APIs.)
Before You Begin
-
Verify that the Salesforce user who performs the restores has the required permissions.
-
In Salesforce, create a destination Sandbox that contains the same metadata as your source organization. The Commvault software does not restore metadata as part of a Sandbox restore.
For information about creating sandboxes, go to the Salesforce help site, Create a Sandbox.
-
Add an app for the destination organization.
-
Review the objects that are not supported for restores.
-
Verify that you have enough free space (it must be the size of the data that you want to restore):
-
If you restore from media, then the free space must be available on the staging database.
-
If you restore from the database, then the free space must be available on the catalog database.
-
You must have enough data and file storage space on your destination Salesforce environment.
-
-
Verify that the profile, users (communityNickName), and RecordType are the same on the destination and the source.
-
Verify that the objects exist on the destination organization.
-
If you want to mask sensitive data during the restore, configure data-masking policies.
-
Verify that you have the following database information:
-
The type of database
-
The client that hosts the database. The access node is able to connect to the database instance using JDBC URL.
-
The database name
-
The credentials for a user who meets the following criteria:
-
Microsoft SQL Server: Owner permissions and if the database does not exist, has the dbcreator role
-
PostgreSQL: Super user permissions
-
-
-
Verify that the Web Server can communicate with the sync database by opening the necessary default ports.
Procedure
-
From the navigation pane, go to Protect > Salesforce.
The Salesforce Overview page appears.
-
Go to the Organizations tab.
-
In the Name column, click the app.
The app details page appears.
-
On the Sandbox seeding tab, click the action button
for the template, and then click Seed sandbox.
The Seed sandbox dialog box appears.
To determine which objects are used for seeding the Salesforce sandbox and create customizable and reusable templates for seeding sandbox with the data you need, see Creating a Template for Salesforce Sandbox Seeding.
-
Under Destination details, from the Destination sandbox organization list, select the Salesforce destination.
-
Under Options, set the restore options:
-
In the Field mappings dropdown, specify how field mapping should be prioritized in case of out-of-place restores.
A field map is generated for all organizations during a backup job. This map indicates a link between each object and a corresponding field that can be used as a mapping field, i.e., has the same value across sandbox and production organizations. Field mappings determine how data from a source corresponds to data in a destination.
This map is generated during the backup process, and eligible mapping fields are prioritized based on following criteria:
-
Field, which is an external Id, is unique and required
-
Field, which is unique and required
If no fields for the object matches this criterion, we may create a new field called CvExternalId. This generated map can be modified as needed from the restore screen with the pencil icon. The automatically generated field maps can be edited by clicking on the pencil icon for the corresponding source or destination organization. New fields can be added and existing fields modified. Any changes made this way are retained for subsequent jobs to or from the destination or source organization.
The source organization record ID is stored in the CvExternalId field as part of a restore job. Later, in subsequent jobs, this field is used to map the records with the source organization's ID. If a match is found, the record is updated. Otherwise, a new record is inserted. This is similar to an incremental restore job.
CvPermissionSet is used to create a new permission set for newly created CvExternalId fields on the restored objects. This permission set is then assigned to the logged in user of the destination organization, allowing that user account to access or insert values in this field later during the restore job.
The API name associated with CvExternalId is CvExternalId__c
Choose one of four options:
-
Skip mapping fields: Do not use a map and fallback to the system default fields for mapping. (Examples include ID or default cloud-mapping fields.)
-
Use CvExternalId to map all objects: CvExternalId is a custom field created by the Commvault restore process. With this option selected, the Salesforce metadata API is used to create the custom field.
If Salesforce restricts creating new custom fields on certain objects, it may return a FIELD_INTEGRITY_EXCEPTION error.
-
Use destination field mappings: The field map of the destination organization used for restore jobs.
-
Use source field mappings: The field map of source organization is used for restore jobs.
-
-
To disable the Salesforce triggers and rules, select the Disable triggers and rules check box.
After the restore is complete, the workflows and triggers are automatically enabled.
-
To restore empty and null values for a backup, select the Restore empty fields check box.
-
To associate all restored records in the destination org with the logged-in user as the record owner (if a record owner does not exist in the destination org), select the Associate ownership to the logged-in user check box.
-
To apply data masking, select the Apply masking on destination check box, and then from the Select data masking policy list, select the data-masking policy.
Note
Data masking can be applied when a cross-instance restore is run and data masking policies are defined.
-
-
Click Run.
-
Click Confirm.
Result
After the operation completes, the destination sandbox contains the records that meet the rules that you configured.
Related Topics
-
To troubleshoot errors that occur during a restore operation, see Troubleshooting Salesforce Restore Operations.