How Veeam Backup for Salesforce Restores Object Hierarchy
Consider the following example. You want to restore a record in the Contact object:
- This record refers to another record in the Account object. In this case, the Account object is the 1st level parent for the Contact object.
- There are 2 backed-up records in the Case object linked to the record you want to restore. The Case object is the 1st level child for the Contact object. If there are also records in the CaseMilestone object that are linked to these 2 records in the Case object, the CaseMilestone object will be the 2nd level child for the Contact object.
Parent Object Restore
By default, the product restores the 1st level parent records only (that is, the record in the Account object from our example). However, you can instruct Veeam Backup for Salesforce to restore parent records of higher hierarchy levels as described in section Restoring Records. While restoring a parent record, the product checks whether the record exists in Salesforce:
- If the parent record exists in Salesforce, the product skips the record and does not proceed to higher levels of the parent hierarchy for this record.
- If the parent record does not exist in Salesforce, the product re-creates the record in Salesforce using the backed-up data.
Child Object Restore
By default, the product restores child records 2 levels deep down the hierarchy only (that is, 2 records in the Case object and records in the CaseMilestone object in our example). However, you can instruct Veeam Backup for Salesforce to restore child records of deeper hierarchy levels as described in section Restoring Records. While restoring a child record, the product first checks whether the record exists in Salesforce and does either of the following:
- If the child record exists in Salesforce and the record data has not been changed, the product skips this record.
- If the child record exists in Salesforce but the record data has been changed, the product updates this record using the backed-up data.
- If the child record exists in Salesforce but it has been moved to the Salesforce Recycle Bin, the product restores this record from the Recycle Bin.
- If the child record does not exist in Salesforce, the product re-creates this record in Salesforce using the backed-up data.