Seeding a Salesforce Sandbox

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

Before You Begin

  • Verify that the Salesforce user who performs the restores has the following permissions:

    • A System Administrator profile or an equivalent profile

    • Read/write/modify access to the objects involved

  • 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.

  • Create a client for the destination organization.

    For more information, see Adding a Salesforce App.

  • Review Salesforce Objects Not Supported for Restores.

    For instructions, see Deleting All Salesforce Data on the Destination Before A Restore.

  • 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 destination profile, users (communityNickName) and RecordType match the source profile, users (communityNickName) and RecordType.

  • Verify that the objects exist on the destination organization.

  • If you want to mask sensitive data during the restore, configure data-masking policies. For more information, see Data Masking.

  • 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

  1. From the navigation pane, go to Protect > Applications > Cloud apps > Salesforce.

    The Apps page appears.

  2. In the Restore column, clickRestore.

    • If multiple instances are backed up, the Restore dialog box appears.

    • If one instance is backed up, the Select restore type page appears.

  3. If multiple instances are backed up, expand the instances, select the data that you want to restore, and then click Select Content.

    The Select restore type page appears.

  4. Select Sandbox seeding.

    The Sandbox seeding page appears.

  5. To determine which objects are used for seeding the Salesforce sandbox, create the seeding rules:

    1. From the Object list, select the object that you want to seed.

    2. Click Pick rule/enter query.

      The Add rule dialog box appears.In the Selection criteria area, choose the records that the software adds to the sandbox:

      • To add all records, select All records.

      • To define a filter by using SQL, select SQL where clause.

      • To define a number of days, select Records updated in the last N days, and then in the Last N days box, enter the number of days.

      • To define the number of records, select Most recently updated N records, and then in the Number of records box, enter the number of records.

    3. To include parent objects in the restore, from the Parent objects to restore list, select All parents.

      Important

      Including parent objects has the following effects:

      • Data integrity is maintained. If parent objects are included and some parents do not exist or some parents have incorrect values, the restore still completes.

      • When objects such as User objects are updated, end users receive notifications, which might not be desirable.

    4. To include child objects in the restore, from the Child objects to restore list, select the child objects.

      • To exclude some child objects, select the Exclude children check box, and then in the Children to exclude box, select the child objects that you want to exclude.
    5. Optional: To view the records, click Preview.

    6. Click OK.

  6. Optional: Create seeding rules for additional objects.

  7. After all of the seeding rules are created, click Restore.

    The Restore options dialog box appears.

  8. Under Destination details, provide the destination information:

    1. From the Destination server list, select the server that hosts the Salesforce destination instance.

    2. From the Destination instance list, select the Salesforce instance.

  9. 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.

  10. 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.

  11. Click Submit.

Result

After the operation completes, the destination sandbox contains the records that meet the rules that you configured.

Loading...