# 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:

![](https://2924009365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FyPmqVkPxhj2oT8fbgB%2Fuploads%2Fgit-blob-99905f0d2dbcb549f5e58736c42e665d4e1c5fa2%2F10969a84-RestorePicture1.png?alt=media)

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

![](https://2924009365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FyPmqVkPxhj2oT8fbgB%2Fuploads%2Fgit-blob-25a05bfedb0c40a06f70cfa7b4506bb048780481%2F32d4338a-RestorePicture2.png?alt=media)

## Continuing A Restore

To resume a restore, click on the “Continue Restore” button. The [Continue Restore dialog](https://learn.capstorm.com/copystorm-restore/reference/restore-tab/resume-restore) 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:

![](https://2924009365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FyPmqVkPxhj2oT8fbgB%2Fuploads%2Fgit-blob-c775807ee5e41ffb183249cde1a2e31055e962d5%2Fd3fed159-RestorePicture3.png?alt=media)

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.

![](https://2924009365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FyPmqVkPxhj2oT8fbgB%2Fuploads%2Fgit-blob-1a3b83a190c8f2905d52288d4c821991b9b5b9e7%2Fc70428c9-RestorePicture4.png?alt=media)

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

| Column Name   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Stage         | <p>The current restore stage for a table can be one of:</p><ul><li>Waiting — no processing has taken place.</li><li>CandidateScan — scanning the restore rules looking for candidate records.</li><li>CandidateLoopScan — looking for recursion in the data that adds additional candidate records.</li><li>CandidatesReady — all restore candidates have been found.</li><li>Restore — inserting / updating records in Salesforce.</li><li>RestoreReferences — restoring reference fields that could not be restored in the previous step.</li><li>Finished — done restoring to this table.</li></ul> |
| 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.capstorm.com/copystorm-restore/reference/restore-tab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
