The Restore tab is used to launch a restore operation and view progress. This tab allows several operations:
- Estimate the size of a restore.
- Run a restore for the first time.
- Resume a restore from the point at which it last stopped.
- Restart a restore, ignoring any saved history from previous restores.
- View errors and exceptions that occurred during a restore.
The first time a restore is set up for a Salesforce instance the restore tab will look like the following:
The “Estimate Size” button will scan the CopyStorm database and estimate the number of records that will be restored to Salesforce. The estimate is the maximum number of records to be restored.
The “Start Restore” button will restore data to the Salesforce instance. If an “Estimate Size” operation has not been performed, the first thing a “Start Restore” will do is to estimate the size.
If the restore rules specify a RANDOM number of records and no seed is supplied, each time Estimate Size or Start Restore buttons are clicked a new set of randomly selected candidates will be chosen. This process is additive and will result in restoring more than the random limit supplied on the Restore Set Editor tab. Entering a seed value will eliminate this potential problem and allow size estimation before starting a restore. This is most commonly used when restoring a development sandbox to exactly the same state every time.
While a restore is running, the table displayed on this tab will change dynamically with information about the restore progress. The “Cancel” button can be used to stop a restore at any point.
After the restore has finished the Restore tab will expose several new buttons below the progress grid:
- The “Re-scan Candidates” button will reevaluate the table record selection rule and look for new restoration candidates. New candidates may be found if the record selection rule for any table has changed, or if subsequent CopyStorm jobs have added new data to the backup.
- The “Estimate MBytes” button will estimate the number of megabytes to be written to Salesforce, using Salesforce’s estimation algorithm.
- The “Continue Restore” button will continue a restore from the place where it last stopped, optionally ignoring previous restore history and restarting the restore from scratch.
- Be careful about restarting a restore — any record inserted during a previous restore will be inserted again (with a different Salesforce ID).
Continuing A Restore
To resume a restore, click on the “Continue Restore” button. The Continue Restore dialog provides the ability to resume a partially completed restore or to delete restore history and restart a restore from the beginning.
How to Handle Errors
If the restore operation encounters any error(s) an “Exceptions” button will appear on the Restore tab:
Click on the “Exceptions” button to see the details. The exception displayed in the screenshot below was caused by an email address in the CopyStorm backup which did not pass Salesforce validations rules in the target Salesforce. You may see similar problems in your data if schema changes or validation rule changes have made historical data invalid.
CopyStorm/Restore includes a series of columns for each table that is restored. These columns include:
|Stage||The current restore stage for a table can be one of:
|Table Name||The name of the table being restored.|
|# Candidates||The total number of potential records to be restored.|
|# Inserts||The number of records restored by inserting a new record into Salesforce.|
|# Updates||The number of records restored by overwriting the content of existing records in Salesforce.|
|# Ref Updates||The number of records that required a second pass to restore reference fields that could not be set on the first insert or update operations. A common example of this is when a child Account is restored before its parent Account. A second pass is required to set the child’s parentId field.|
|# Restored||The total number of records that were restored.|
|# Skipped||The total number of records that were skipped.|
|# Errors||The number of errors reported while attempting to restore records of this type.|
|Start Time||The time that the restore for this table started.|
|Elapsed Time||The total amount of time spent restoring this table.|