Restore Tab

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 “Resume Restore” button will continue a restore from the place where it last stopped.
  • The “Restart Restore” button will ignore previous restore history and start 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).

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.

Restore Status Columns

CopyStorm/Restore includes a series of columns for each table that is restored. These columns include:

Column Name Description
Stage The current restore stage for a table can be one of:

  • Waiting — no processing has taken place.
  • CandidateScan — scanning the restore rules looking for candidate records.
  • CandidateLoopScan — looking for recursion in the data that adds additional candidate records.
  • CandidatesReady — all restore candidates have been found.
  • Restore — inserting / updating records in Salesforce.
  • RestoreReferences — restoring reference fields that could not be restored in the previous step.
  • Finished — done restoring to this table.
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.