Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Migrating data from a Salesforce instance to an unrelated Salesforce instance the mapping between system tables can be complex and mapping rules are needed to control how records in a CopyStorm backup map to records in a target Salesforce.
This article review two types of mapping rules:
Simple column value mapping rules.
Complex mapping rules.
All mapping rules provide a map of Ids in the CopyStorm backup to corresponding Ids in the target Salesforce.
For example:
If a User record in CopyStorm has the same email address as a record in the target Salesforce, map the CopyStorm User.Id to the Salesforce User.Id.
Mapping rules are stored in a configuration file named “DefaultRecordMapRule.xml”, stored in any of the normal places for CopyStorm/Restore configuration files. It contains two types of supported entries:
ColumnBasedBuilder — a mapping rule determining a match between two records based on the value of one or more columns.
FunctionBasedBuilder — a mapping rule determining a match between two records based on user supplied Java code, using any technique to determine if records match.
The built-in DefaultRecordMapRule.xml looks like:
A Simple Column Value Mapping Rule is used when a CopyStorm and Salesforce record should be considered the same if one or more columns in the two records match. For example, the following rule indicates that two User records are the same if the records contain the same email address:
A rule indicating that Record Types match if they are for the same SObject and have the same Name is:
A Function Based Rule uses arbitrary Java code to build an Id mapping between CopyStorm records and Salesforce records. For example:
The built-in Pricebook2 function rule ensures that the standard pricebook in the CopyStorm backup maps to the standard pricebook in the target Salesforce.
The built-in Organization function rule ensures that the Salesforce Org Id in the CopyStorm backup maps to the Org Id of the target Salesforce.
There are two steps required to add a new Function Based Rule to CopyStorm/Restore:
Write a Java class implementing the rule and store the implementation in a jar within the “lib” sub-directory of the CopyStorm/Restore installation.
Add a “FunctionBasedBuilder” XML entry to the “DefaultRecordMapRuleBuilder.xml” file.
For example, this is the function based rule for Organization built into CopyStorm/Restore:
<DefaultRecordMapRuleBuilders>
<!-- Column Based Builders match records based just on the values of one or more columns. -->
<ColumnBasedBuilder tableName="User" columns="Email" />
<ColumnBasedBuilder tableName="Profile" columns="Name" />
<ColumnBasedBuilder tableName="UserRole" columns="Name" />
<ColumnBasedBuilder tableName="Group" columns="Name" />
<ColumnBasedBuilder tableName="RecordType" columns="Name,SObjectType" />
<!-- Function based builders require custom code to build a mapping. -->
<FunctionBasedBuilder tableName="Pricebook2" class="Pricebook2RecordMapRuleBuilder" />
<FunctionBasedBuilder tableName="Organization" class="OrganizationRecordMapRuleBuilder" />
</DefaultRecordMapRuleBuilders><DefaultRecordMapRuleBuilders>
<ColumnBasedBuilder tableName="User" columns="Email" />
</DefaultRecordMapRuleBuilders><DefaultRecordMapRuleBuilders>
<ColumnBasedBuilder tableName="RecordType" columns="Name,SObjectType" />
</DefaultRecordMapRuleBuilders>public class OrganizationRecordMapRuleBuilder extends AbstractDefaultRecordMapBuilder {
private static String ORGANIZATION = "Organization";
/**
* Build a list of rules that map from CopyStorm record ids to ids in the target Salesforce.
*
* @param session -- connection to the target Salesforce.
* @param dataSource -- connection to the source CopyStorm database.
* @returns list of rules mapping CopyStorm ids to Salesforce Ids
*/
@Override public List buildRules(Session session, DataSource dataSource) throws Exception {
CopyForceTableFactory copyForceTableFactory = CopyForceTableFactory.getInstance();
List results = new ArrayList();
//
// If the CopyStorm backup does not include the Organization table then we have no way of determining the original organization id.
//
if( !copyForceTableFactory.isTableDefined(dataSource, ORGANIZATION )) { return new ArrayList(); }
JdbcTemplate jdbcTemplate = new JdbcTemplate( dataSource );
ICopyForceTable csTable = copyForceTableFactory.getTable(dataSource, ORGANIZATION );
List csOrgs = jdbcTemplate.queryForList( "SELECT Id FROM " + csTable.getCopyForceName() , String.class );
if( 1 != csOrgs.size()) { return results; }
RecordMapRule rule = new RecordMapRule(ORGANIZATION, "Id");
rule.getValueMap().put(csOrgs.get(0), session.getUserInfo().getOrganizationId());
results.add(rule);
return results;
}
}The Revert Pending tool undoes operations that set previously inserted or updated records to a pending state. This tool will change the state of records from Pending back to Inserted or Updated. The use case for this tool is:
I accidentally reset a group of records to Pending and need to undo the change.
This tool only works on records where both the Original Id and Restored Id are non-blank (i.e. records that have previously been Inserted or Updated).
There is one decision to make when using this tool:
What records should be reverted from Pending back to Inserted or Updated?
Release Date: 17-Apr-2024
This is a feature, bug fix, and Salesforce API version upgrade release. As always, existing CopyStorm configuration files are backwards compatible.
17-Apr-2024
Original Release
This release updates CopyStorm/Restore to use Salesforce API version 59.
This release introduces CopyStorm/Restore support for Folder and S3 data partitions. With this update, CopyStorm/Restore can recover field data stored in a local Folder or in S3.
The “Resume Restore” popup has been updates with a “Retry Failures” checkbox. If selected, this checkbox will cause CopyStorm/Restore to mark all Skipped records as Pending before proceeding to insert or update the pending records.
CopyStorm/Restore Flow management has been updated to query Salesforce for the active version of Flows selected on the “Advanced” tab. If there is an active version, the active version will be disabled / re-enabled by CopyStorm/Restore.
Multi-Lingual Knowledge Restore Fixes.
Resolved issues preventing multi-lingual Knowledge Articles from being restored.
Filenames with Colons.
Resolved an issue preventing Files and Attachments with the Colon “:” character in the filename from being recovered on Windows.
CopyStorm/Restore supports the ability to restore Salesforce data directly from a Snowflake database. This allows organizations that use CopyStorm to archive Salesforce data into Snowflake (for analytics or storage) to also leverage that same data for recovery purposes.
When configured with a Snowflake connection, CopyStorm/Restore behaves similarly to how it would with a traditional relational database. All standard restore operations are supported as long as the data exists in Snowflake.
You’re already archiving Salesforce data to Snowflake with CopyStorm.
You need a simple recovery option without setting up a second relational database.
You don’t need , , or file attachment support.
Metadata Restore – Metadata cannot be restored from Snowflake.
Point-in-Time Restore / Snapshots – Snapshot data is not supported in Snowflake.
CS:Govern Restore – CS:Govern is not available for Snowflake.
Base64 / Binary Content – Snowflake does not support native CLOB or binary types in the required format. As a result, objects like Attachment & ContentVersion cannot be restored from Snowflake.
CopyStorm/Restore restores all or part of a Salesforce instance using a backup created by CopyStorm.
CopyStorm provides peace of mind by keeping a hot backup of your production Salesforce instance in a local relational database.
CopyStorm/Restore turns your low-cost sandbox instances into high value developer environments using your production backup data.
CopyStorm/Restore can also be used to restore small or large parts of your production database in an emergency, but no one wants an emergency! Just as important is CopyStorm/Restore’s ability to populate inexpensive Salesforce developer sandboxes with slices of your production data:
CopyStorm/Restore can populate a sandbox with the type of data you need for a development project.
CopyStorm/Restore can restore a sandbox to a known state multiple times per day.
CopyStorm/Restore provides a low-cost way for Salesforce consultants to demonstrate new features using the customer’s production data WITHOUT touching the customer’s production Salesforce.
Developers and contractors are probably asking, “OK. I see how this would help me a lot. How much time do I have to invest in the tool?”.
Just a few minutes is all you need — watch this video for a demo:
A Salesforce backup is always a good idea. Using your Salesforce backup to super-charge your developer sandboxes is even better.
The Dependency Detail tab lists the order in which tables will be written to Salesforce, the referenced tables occurring later in the list of tables, and the original table dependencies from the Salesforce metadata.
This page contains similar content to the Restore Order Detail tab, including two additional columns.
The “All Required” column lists all tables that must be restored before the table in the second column.
The “All Nillable” column lists all tables that are referenced by nillable reference fields in the table in the second column.
CopyStorm/Restore restores all or part of a Salesforce instance using a backup created by CopyStorm.
This article outlines the complete process used to populate a Salesforce sandbox with production Salesforce data:
Create a backup of your production Salesforce instance using CopyStorm (or use an existing backup).
Open the CopyStorm/Restore application.
Enter Salesforce credentials for the instance to be restored.
Enter database credentials for the CopyStorm backup database.
Select the data that will be restored to the Salesforce instance.
Run the restore.
Save the CopyStorm/Restore configuration so you can reuse it later.
Use the restored Salesforce instance.
The most complicated part of this process is step #5 — selecting the data to be restored. However, this step is only as complex as your selection criteria. Examples of simple selection criteria that can be chosen with only a few button clicks include:
Restore 1000 random Accounts along with any related Opportunities, Cases, and Contacts.
Restore these specific Contacts along with any related Accounts and records from the custom table ABC__c.
Restore the 500 largest Opportunities from the past 6 months along with any related Accounts and Contacts.
The following short video illustrates the entire CopyStorm/Restore process:
For examples of other types of CopyStorm/Restore scenarios, see the .
Salesforce records often contain references to other records. For example:
Contact records contain a reference to an Account in their AccountId field.
Nearly all records contain a reference to the Salesforce user who owns the record in an OwnerId field.
The Reference Fields portion of the Restore Set Editor defines the action which should be taken if a record references another record that is neither:
The following video demonstrates how to restore metadata to Salesforce with CopyStorm/Restore:
Restoring metadata using CopyStorm/Restore is a simple point-and-click process — this can be used to:
Promote code, permissions, or other metadata changes from Sandbox environments to Production.
Roll-back metadata to previous versions if metadata has been incorrectly updated in Production.
All versions that have been backed up with CopyStorm are available to restore, providing an easy way to undo changes to metadata or migrate metadata between environments. CopyStorm/Restore can upload or roll back changes to dozens of metadata types, including:
The Restore Plan tab provides insight into the decisions made to determine the order in which CopyStorm/Restore will find restore candidates and the order in which records will be inserted / updated in Salesforce. There are a number of subplans displayed as illustrated in this screenshot:
All plans are an accurate representation of what CopyStorm/Restore does during a restore except for the Candidate Scan Order. The Candidate Scan Order plan is a good representation but the implementation is a bit more complex in order to handle arbitrary direct and indirect circular relationships between tables.
— lists the order in which tables will be written to Salesforce.
— lists the order in which candidates for a restore will be found and is based on the rules set up in the Restore Editor tab.
CopyStorm/Restore makes populating a Developer Sandbox with production data a painless operation. This article provides a guide for how to do this for your operation.
A CopyStorm backup of your production Salesforce data.
A Salesforce developer Sandbox.
This step will determine the type and volume of data that will be restored to the Sandbox. This step is both important and non-optional due to fairly severe size restrictions on Developer Sandboxes. It is highly unlikely that you will be able to import your entire production data set.
The choice of what types of records to restore depends on what you plan to do with the Sandbox. Records are often selected based on criteria like:
Parameters in this tab are less likely to be configured by the average user. They include:
Release Date: 5-Aug-2025
This is a feature, bug fix, and Salesforce API version upgrade release. As always, existing CopyStorm/Restore configuration files are backwards compatible.
This release updates CopyStorm/Restore to use Salesforce API version 64.
The Overrides tab supports adding and removing relationships between tables, and is an essential tool when Salesforce metadata contains inaccuracies or ambiguities. In practice, options on this page should not be changed unless instructed to by Capstorm support.
Most of the overrides necessary are probably already built into CopyStorm/Restore and you will not need any additional overrides.
The Salesforce Asset table showcases the need for overrides in order to build a good restore plan. The Asset table’s metadata claims that both of the ContactId and AccountId columns are nillable. Though technically true, it is also true that both Account and Contact must be restored before asset because the Asset table does not allow both Asset.ContactId and Asset.AccountId to be null. CopyStorm/Restore forces the correct order for restoration by overriding the relationships between Asset/Contact and Asset/Account to be required for the purposes of deciding the order in which tables are restored.
If this was done using the GUI, the entry would have:
A Rule Type of Forced
The Set Records to Skipped tool directly sets the status of records to Skipped, causing CopyStorm/Restore to never attempt to restore the records. This is useful in a number of cases where records are identified in the candidate scan, but:
It is known that the records will have problems if they are restored, but the record scanning results need to be kept.
They are being held back from the current restore operation in preparation for being restored later.
The following screenshot shows available options on the Set Records to Skipped dialog:
A handful of Salesforce tables can be children of many other types of tables. Good examples include Attachments and Notes.
If you want to include the Attachments for all selected tables, one way is to open the restore rule for each table and include Attachments as a related list. Another quicker way is to open the Attachments editor and quickly select all possible parents using a GUI extension that only appears on tables like Attachments.
On the screen shot, Attachments for Contacts, Leads, etc. can be included in the restore set simply by checking the box next to the parent table name. Though this action is equivalent to adding Attachments as a related list, you will find this technique must faster for larger restore sets.
The Restore Order tab lists the order in which tables will be inserted / updated into Salesforce.
The order is determined using:
The metadata from Salesforce to determine nearly all relationships.
Additional configuration information in CopyStorm/Restore.
This is used to supplement inaccurate or incomplete Salesforce metadata.
CopyStorm/Restore will perform parent/child record analysis much faster if the CopyStorm database foreign keys are fully indexed.
To create the necessary indexes, check the on CopyStorm’s Configuration tab and rerun CopyStorm.
CopyStorm/Restore will still work without indexes but the analysis required to determine the order in which records must be restored will be much slower. For databases with millions of rows the performance is likely to be unbearable. This is because CopyStorm/Restore needs to do a lot of table scans by running queries like:
SELECT id FROM Contact WHERE accountId IN (….)
These will cause the entire Contact table to be scanned (an Order(n) operation). After creating the indexes, each lookup is an Order(1) operation (e.g. 1000s of times faster).
The Show Skipped Reasons tool displays the reason(s) why CopyStorm/Restore failed to restore records.
Skipped records are organized using two parameters:
Category — the general type of reason a record was skipped.
Most reasons use the category “Default” but some, like Lead, may use the category “Unsupported”.
The Migration Setup tab contains tools which are useful when migrating data to a Salesforce instance unrelated to the Salesforce instance used to create the CopyStorm backup.
This is useful when trying to perform tasks like:
Mapping Users in a CopyStorm backup to users in the target Salesforce. In this case, Salesforce Ids will not work due to being unique to a Production or Sandbox instance’s setup. The Record Mapping Rule tool on this page supports implementing and establishing rules that CopyStorm/Restore will use to map users from the CopyStorm backup to users in the target Salesforce.
Maintaining Salesforce Ids in a CopyStorm backup when creating data in the target Salesforce. In this case, Salesforce Ids will be regenerated when data is inserted. The Original Record Id Rule tool on this page supports creating and populating a new custom field to maintain the source CopyStorm database Id values.
The Candidate Scan Order tab lists the order in which Restore Set Editor rules will be traversed to find candidates to be restored.
Scanning for candidate records is a difficult problem due to direct and indirect circular relationship loops in Salesforce. For those of a graph theory bent, the problem of finding candidate records is a classic NP-Complete graph traversal problem in the same category as “The Traveling Salesman Problem” and finding minimal spanning ring systems in chemistry. Like all problems in this class, the search path is difficult to represent exactly in a linear set of steps. However, the plan displayed by CopyStorm/Restore is an honest representation of the search plan even thought the actual algorithm used by the search is a bit more complex.
There are a few core operations in a candidate scan:
A “Find Records in Table” step searches for records within the table. In the plan below, the “Find records in Account” is likely running a SQL statement against the Account table.
CopyStorm/Restore automatically restores deleted records for all record selectors except for “All” and “Random”. To restore deleted records with these selectors, check the “Include Deleted Records” checkbox.
In a CopyStorm backup a record is deleted if the “IsDeleted” column is set to true. There is nothing special about the “IsDeleted” column — it is a normal column Salesforce uses to indicate that a record has been deleted.
The Global Parameters editor is used to specify:
Parameters that apply to every table.
Parameters that apply to the overall restore process.
Parameters that are table specific, usually because of a Salesforce restriction.
The Restore Order Detail tab lists the order in which tables will be written to Salesforce according to the list specified in the Restore Order tab.
The following examples reference the screenshot below.
If a table name appeared in the Required Prerequisites column for Account it means that CopyStorm/Restore’s table scanning algorithm decided to write Account records to Salesforce even though the Account table contains a non-nillable reference column referencing a table later in the list of tables to be restored. In practice, this should never happen in a plan built by CopyStorm/Restore. However, if it does, this plan will show the issue and allow overriding Salesforce dependencies to fix the problem.
If a table name appeared in the Nillable Prerequisites column for Account it means that CopyStorm/Restore’s table scanning algorithm decided to write Account records to Salesforce when the Account table had a nillable column referencing a table later in the list of tables to be restored. This condition happens fairly frequently in Salesforce, and CopyStorm/Restore attempts to reduce the impact on restoration performance by optimizing table ordering. This condition is not an error but means that CopyStorm/Restore will patch up nillable reference fields in a second pass, after the records have been restored.
For most Salesforce metadata objects there are two restore type options.
Complete: Restore the a complete backup of the object to Salesforce.
Expert: Modify the raw definition of the object manually before deploying to Salesforce.
All CopyStorm/Restore simple editors look and behave similar to the ApexPage example below. Note that the only modifiable parameter is the version.
Switching the restore type to Expert will change the display to the Expert Mode Editor. For additional help see the page.
The Custom Object editor is used to select the precise components of a standard or custom SObject that will be restored.
For a partial restore only particular elements of a Custom Object should be deployed. The following example will do a limited restore of several custom fields.
A complete restore will cause all properties of a Custom Object to be deployed.
An expert restore provides fine grained control at the Custom Object XML level. The initial XML can be:
The XML corresponding to the current partial editor.
Snapshot Tracker Database View Performance.
Resolved a performance issue with the Tracker Database tab when performing Snapshot recovery.
Email Notification Fix.
Resolved an issue preventing sending of SMTP notifications.

Restore Order Detail — lists the tables in the order in which they will be restored plus any related tables that are restored later in the plan.
Dependency Detail — lists the tables in the order they will be restored plus all table dependencies. This is the best insight into how CopyStorm/Restore selects the order in which to restore tables.
Overrides — used to correct dependency relationships when they are incompletely defined in the Salesforce metadata. It is rare for a customer to use this tab.








Contains common recipes for the restoration of Salesforce data using CopyStorm/Restore. Included are a basic sandbox recipe, restoring Accounts with largest Opportunities, and restore Accounts limiting the number of Cases per Account. A discussion of issues surrounding a complete restore and recipe of a complete restore is also included.
Provides information essential to understanding how CopyStorm/Restore restores records and complex relationships to a Salesforce database.
Describes the internal structure and types of data stored in the CopyStorm/Restore Tracker Database.

Maximum number of concurrent write request to Salesforce. It is rare to set this value because CopyStorm/Restore dynamically selects a value which gives optimal performance as part of its runtime Salesforce analysis.
Skip Record Id Check
When enabled, CopyStorm/Restore will avoid the check to see if a record is already in the target Salesforce. Note that when “Skip Record Id Check” and “Skip Original Id Check” are both enabled, all operations will be Inserts.
Skip Original Id Check
When enabled, CopyStorm/Restore will avoid the check to see if a record has already been restored to the target Salesforce by checking the “Original Id” column. Note that when “Skip Original Id Check” and “Skip Record Id Check” are both enabled, all operations will be Inserts. Note that this option will only be displayed if the “Original Record Id” Migration feature is enabled.
Max # Per Update
Maximum number of records to be sent to Salesforce in a single batch. By default use the parameter from the Global Parameters tab. Never set this value unless something like an ApexTrigger or Workflow is limiting the number of records that can be written in a batch. This condition typically occurs as a result of poorly written Apex code.

# Salesforce Writers
Record count per object for records restored or skipped.
Exception and skip record reason history.
Automation enable / disable.
Performance metrics (RAM, CPU, Records Per Minute).
A new job log is created any time CopyStorm/Restore scans for recovery candidates or uploads records to Salesforce.
CopyStorm/Restore now supports tracker databases in MySQL, SQL/Server, and Oracle. This means that you can store record recovery information and history in your database of choice:
H2 (the default).
PostgreSQL.
MySQL.
SQL/Server.
Oracle.
Update Rich Text image processing to support additional record types.
Fix issue causing Rich Text image tag attributes to be removed.
Add support for additional URL formats for Rich Text images.
Resolve issues preventing multi-lingual, multi-version Knowledge Articles from being recovered properly.
Add Knowledge Article features to enable recovery of Files and Attachments related to Online or Archived articles.
Fix issue causing CopyStorm/Restore to attempt to disable Triggers and Workflows that were already disabled via “Disable Selected Now”.
Remove BigObjects from CopyStorm/Restore object selection.
Fix issue causing a stack trace when pasting a Record Filter with Ctrl-V.
Fix issue causing Tracker Zip exports to be unusable on Windows.
Add CopyStorm/Restore launch feature to require OAuth login before accessing the application.
5-Aug-2025
Original Release
There are a number of occasions that require table specific processing rules. This section describes how to augment the built-in table specific processing rules in CopyStorm/Restore.
The most common case requiring a table specific rule is a need to limit the number of records sent to Salesforce in a single batch. The default value, 200, may be too large for specific tables because of complex INSERT / UPDATE triggers causing the “Too Many DML Statements” error to be thrown by Salesforce.
CopyStorm/Restore supports overriding or extending the default table processing rules by editing a file named “TableRuleRegistry.xml” in a subdirectory “config” of the root CopyStorm/Restore directory. By default, CopyStorm/Restore includes a template TableRuleRegistry.xml with a large block comment explaining usage.
Several common overrides are included below.
The following sample TableRuleRegistry.xml file will cause CopyStorm/Restore to limit all writes to Salesforce to ten or fewer records:
<TableRules>
<TableRule name="default" restoreBatchSize="20" />
</TableRules>The following sample TableRuleRegistry.xml file will cause CopyStorm/Restore to limit all inserts / updates to the Case table to five or fewer records.
<TableRules>
<TableRule name="Case" restoreBatchSize="5" />
</TableRules>Restored by another table rule.
This editor contains three columns for each reference field:
A checkbox which determines whether or not the reference field should be restored.
If not checked the field will not be modified on an UPDATE and will take the default value on an INSERT.
The name of the reference field with a superscript indicating the Salesforce table to which it refers.
The action to take if the value of the reference field in CopyStorm points to a record not present in the target Salesforce.
The following screen shot lists the reference fields for the Account table in a default Salesforce instance:
For all reference fields EXCEPT those referencing the Salesforce User table, the following options will be available:
Set to Null
If the referenced record is not already in Salesforce then set the reference field to null.
Skip Record
If the referenced record is not already in Salesforce then do not restore the record.
Create Record
Reference field linking to the Salesforce User table have a different set of options. Common reference fields of this type include “OwnerId”, “CreatedById”, and “LastModifiedById”.
Salesforce User references are treated differently because Salesforce will not permit a record to be created with an owner that is an inactive Salesforce User.
Use Default
If the referenced User record is missing or is an inactive Salesforce User then use the Salesforce User specified as the default User on the “Global Parameters” tab.
Skip Record
If the referenced User record is missing or is an inactive Salesforce User then do not restore the record.
Apex Classes, Pages, and Triggers.
Permission Sets, Profiles, Roles, and Groups.
Custom Objects, Page Layouts, and Translations.
To restore metadata to Salesforce with CopyStorm/Restore:
CopyStorm/Restore’s Metadata Tab provides an easy way to surgically upload new or modified metadata from the CopyStorm backup database into Salesforce.
Selected metadata will be uploaded to Salesforce – select part of a metadata item, or upload the full item to Salesforce.
The Version selector allows historical versions of the metadata item to be uploaded, updating Salesforce with the version of the metadata as of the selected date and time. Uploading a historical version is a simple way to revert changes and undo metadata modifications that are causing problems in production or sandbox Salesforce instances.
Deploying the selected metadata is as easy as pressing the Deploy button, CopyStorm/Restore will handle the rest! After pressing the Deploy button and confirming the upload, CopyStorm/Restore will:
Create a zip file containing the selected metadata items (and versions).
Upload the zip file to Salesforce’s Metadata deployment API.
Display the results of the upload.
Choose 500 random Accounts.
Choose 100 Contacts that have open Cases.
Choose the top 100 Opportunities in the current quarter.
Choose all Accounts from the list of Ids in the file ABC.txt.
Choose all Contacts from a list of Ids pasted into CopyStorm/Restore.
Choose 100 Accounts that have at least one record in my custom object.
Choose 250 random My_Custom_Object__c records.
To learn more about selecting records see the reference manual selection on Record Selectors.
In this video we will select 100 random Accounts along with any related Contacts and Opportunities. The data will be restored to an empty Salesforce Developer Sandbox.
A Parent Table of Account
A Child Table of Asset
A similar rule would be defined for the Contact/Asset relationship.
There are several types of dependency rules that can be added.
A Forced Dependency rule states that all records in a parent table must be restored before records in a child table.
An Ignored Dependency rule states that CopyStorm/Restore should ignore a parent/child table relationship even if it is defined in Salesforce metadata. An example of this is the relationship between ContentDocument and ContentVersion. The ContentVersion table must be restored before ContentDocument because the only way to create a ContentDocument record is as a side effect of creating a ContentVersion. However, Salesforce metadata declares that there is a non-nillable parent/child relationship from ContentDocument to ContentVersion.
A Pseudo Dependency rule states that CopyStorm/Restore should act as if there is a required relationship between two tables even when Salesforce metadata indicates no relationship. The purpose of this rule is to force one table to be restored before another.
CopyStorm/Restore attempts to restore tables in an order which will minimize the number of reference fields patched during a second pass — the following screenshot shows an example restore order:
Table — the name of a table with skipped records.
These parameters may be set at the top of the Show Skipped Reasons dialog. If not set, all values are displayed. In addition a search string may be specified, limiting displayed records to those whose reason contains the search string.
The following additional operations are supported:
The “Delete” button deletes skipped reasons from the tracker database.
The “Export” button saves skipped reasons to a CSV file.
A “Find Records in Table Referenced By” step looks for records in a table based on the value of a reference field in another table. In the plan below, step 10 finds Contact records referenced by the field AccountContactRole.ContactId.
Parameters that control details of skipped record reporting.

The current or any past CopyStorm backup.
The current definition in Salesforce.
For additional help see the Expert Mode Editor page.


Though a Partial or Complete restore of a meta data element usually works, sometimes it is necessary to edit the raw XML that will be deployed to Salesforce. The Export Mode restore type provides this feature plus a few others.
The raw data for the current partial restore, any backup in Capstorm, or the current Salesforce definition can be loaded and edited.
Differences between what will be deployed can be quickly compared with the current partial restore, any backup in Capstorm, or the current Salesforce definition.
Finding all occurrences of a pattern can be quickly performed.
Note that in Export mode, the raw data to deploy for an object is stored in the copyStormRestore file as part of the restore session configuration.
To restore a meta data object using the Export mode, simply choose Expert from the restore type pull-down menu.
The metadata to load into the left or right panels is selected using two different pulldown menus.
The “Base Version” pulldown loads metadata into the editor on the left.
The “Compare With Version” pulldown loads metadata into the comparison viewer on the right.
You will see several types of options in the pulldown menu.
The following screen shots illustrate how differences are displayed when the metadata on the left and right differ. For the example an ApexTrigger metadata objects was selected.
There two techniques for searching metadata.
Differences will be calculated automatically and can be systematically walked thru using arrow control on the right.
Specific text can be found by entering a regular expression in the Find parameter. These, too, can be systematically walked thru using arrow controls on the right.
Though CopyStorm/Restore provides good performance with its default settings, there are a few best practices to achieve optimal performance.
To determine which records should be restored, CopyStorm/Restore performs a lot of reference field lookups on its CopyStorm database. If reference fields in the CopyStorm database are not indexed performance can be greatly impacted. To add all the necessary indexes to the CopyStorm database:
On the CopyStorm Configuration tab make sure that the Create Indexes option is checked.
Run CopyStorm to automatically create any missing indexes.
CopyStorm/Restore tracks the progress of a restore using a small-footprint database called a “Tracker Database”. This database is named on the Global Parameters tab and, by default, is stored in the directory $HOME/.capstorm/copyStormRestoreSets. If your home directory is not on a local disk, performance can be improved by changing the tracker database location to a location stored on local disk. For example
If the tracker database is “fred” then it will be stored at:
$HOME/.capstorm/copyStormRestoreSets/fred.mv.db
If the tracker database is C:\tmp\fred then it will be stored at C:\tmp\fred.mv.db
If the location already contains a tracker database, the pre-existing one will be used. If not, CopyStorm/Restore will automatically create a new one.
To upload data to Salesforce, CopyStorm/Restore uses 1-10 virtual data entry clerks (also called Salesforce Writers). Each Salesforce Writer enters data into Salesforce concurrently. In addition to the number of Salesforce Writers, the amount of work given to each writer in a single batch can be controlled to increase performance.
There are two parameters on the Global Parameters tab which control the level of parallelism:
The “Default Max Per Update” parameter controls the amount of work given to a single Salesforce Writer.
This parameter defaults to 200 but a value of up to 600 can often improve performance.
The “# Salesforce Writers” parameter controls the number of concurrent threads used to write to Salesforce.
Values for these parameters that work best for you depend on several factors:
The speed of your internet connection to Salesforce. This is the most important factor.
Salesforce limits the number of active update requests per Salesforce login for your entire Organization.
Running too many restores at the same time can cause this limit to be hit.
This issue has been observed when a customer was running three separate restores concurrently where each restore used the same Salesforce credentials and 10 concurrent threads.
In Capstorm’s test labs we typically use values of:
Default Max Per Update = 400
Salesforce Writers = 10
High parallelism parameters can, under certain circumstances, degrade restore performance. This has been observed when restoring to a table with a computed column involving aggregation of data from another table. If this happens:
CopyStorm/Restore will still work but may have to make multiple restore requests for the same batch of records.
This happens internally in the program and the only visible effect is on restore performance.
CopyStorm/Restore will automatically lower the level of parallelism on a table when it is causing restore performance issues.
The level of parallelism can also be controlled for a specific table by setting table specific parameters on the Restore Set Editor tab.
CopyStorm/Restore uses a small footprint relational database (based on H2) to keep track of all restore activity. Like any database, it is possible (but rare) for this database to become corrupted. This article explains how to recover a corrupted H2 database.
Copy the corrupted H2 database into the new directory.
Copy the file [CopyStormRestore Install Directory]/lib/h2*.jar into the new directory.
Open a command prompt and run java -cp h2*.jar org.h2.tools.Recover
The previous step will create a .txt file with the same name as your database. It may take a while to run and does not produce output.
java -cp h2*.jar org.h2.tools.RunScript -url "jdbc:h2:file:~/tmp/RecoveredTracker" -user root2 -password capstorm -script EMR-UAT-tracker.mv.txt -showResults
The database in the -url parameter should not exist.
The -user and -password parameter should NOT match a user in your corrupted database. root/capstorm are the defaults for a CopyStorm/Restore tracker database.
Of course, there is no guarantee that the recovery will work. Each case is likely to be unique. However, if the following tables are intact and have data there is a decent chance of recovery.
RestoreConfig — this table must have values. It is used by CopyStorm/Restore to determine the version of the tracker database.
RestoreTable — this table lists all Salesforce tables in the tracker and references to a unique tracking table for each Salesforce table. Do a SELECT * on this table.
RestoreTableRecordReference
See this article for details about what is in a tracker database.
Release Date: 28-Apr-2026
This is a minor feature and bug fix release. As always, existing CopyStorm/Restore configuration files are backwards compatible.
28-Apr-2026
Original Release
Salesforce API version 65 deprecates the SOAP username/password login endpoint. Customers should migrate to an external client application configured with OAuth. Restore jobs using a login type that does not support API 65 will automatically fall back to API 64, and an exception will be logged at the start of each job as a reminder to migrate.
This exception can not be eliminated until OAuth authentication is used.
The "Fallback API Detected" error does not stop your jobs from running - it is informational, and indicates that CopyStorm/Restore is not able to use the most recent Salesforce API features. The error will be resolved when updating to JWT (or other OAuth) authentication.
Please reference .
This release includes an upgrade to the H2 database used for restore tracking. Existing tracker databases are not compatible with this version.
This release updates CopyStorm to use Salesforce API version 65.
The target Salesforce organization is now displayed more prominently before a Restore job begins, reducing the risk of restoring to an unintended org.
Overflow Snapshots are no longer included by default during Candidate Scanning. This change improves scan performance for most restore workflows.
Improved the error message displayed when a ContentVersion restore fails on an unsupported database type (e.g. Snowflake).
Fixed an issue where the "Trace Mode" configuration option was not applied correctly during restore execution.
Resolved an issue where tracker database operations could fail for objects with unusually long names.
The Salesforce API version is now logged at the start of each Restore job to aid in troubleshooting.
Fixed an issue where the "Rich Text Fields" configuration tab incorrectly included formula fields that contain hyperlinks.
When creating data in Salesforce, autonumber columns are given new values automatically. To override this behavior and restore historical autonumber column data with CopyStorm/Restore, there are two approaches that can be taken:
Uploading data to a custom autonumber field requires that autonumber generation be disabled during the restore. It is always best practice to perform this task during a maintenance window to prevent users from creating data while autonumber generation is disabled.
To disable autonumber generation for a custom field while restoring data with CopyStorm/Restore:
Go to the custom field in the Object Editor.
Record the field information, including the next number in the sequence and the display format.
Modify the field type, setting it to Text.
This will disable autonumber generation during the restore.
Upload the data with CopyStorm/Restore.
Modify the field type, changing it back to an autonumber.
This will re-enable autonumber generation.
Use the field information from Step 2 — potentially with a different sequence number depending on the data being uploaded.
Salesforce’s standard autonumber fields (i.e. Case Number) come with an additional restriction — their field type cannot be modified. Uploading data to a standard autonumber field requires that the standard field be replaced with a copy used in place of the standard field.
To set up a copy of the standard field that can be used with CopyStorm/Restore:
Create a new custom field to hold the autonumber data.
Create an insert trigger to populate the new custom field:
If there is no data in the custom field, populate it by copying the standard autonumber field.
If there is data in the custom field, keep the data and don’t overwrite the field content.
After Salesforce is configured with a field to use when restoring the autonumber data, the custom field can be uploaded just like any other field in Salesforce — there are no special configurations needed during the restore process!
Parameters for controlling the suppression of common record skipping reasons – for example: Child records may be skipped when their parent record(s) are skipped – this skipped reason is typically suppressed because it is a side effect of the parent being skipped.
Inactive Price Books
Record when an opportunity or quote references an inactive price book.
Commonly used parameters that affect the complete restoration process.
Ignore Timestamps
If checked, CopyStorm/Restore will overwrite records in Salesforce even if they have matching modification timestamps. If unchecked, CopyStorm/Restore will skip records with matching modification timestamps.
Clicking on the Restore Tab’s “Re-scan Candidates” button will display a dialog to configure parameters for the re-scan operation:
Pressing the “Start Operation” button will cause CopyStorm/Restore to identify any new records in the CopyStorm database that match the current configuration in the Restore Set Editor. All records that are identified will be added to the Tracker Database – allowing them to be restored by CopyStorm/Restore.
The default settings in this popup will cause all tables, records, and relationships to be rescanned. This will ensure that any changes in the CopyStorm database or Restore Set Editor are reflected in the Tracker Database.
There are three checkboxes that can be used to limit the amount of data scanned:
Rescan All Record Relationship Dependencies (if false, only new records are scanned)
If this checkbox is checked, all records’ related list and reference field rules will be scanned.
If this checkbox is unchecked, only newly identified records’ related list and reference field rules will be scanned.
Mark Updates as Pending (if false, only new records will be marked as pending)
If this checkbox is checked, both new records and records that have been updated in the CopyStorm database will be set to Pending in the CopyStorm/Restore Tracker (and subsequently inserted or updated in Salesforce).
If this checkbox is unchecked, only new records will be set to Pending in the CopyStorm/Restore Tracker.
Select Specific Table Rules to Include (by default all are included)
If this checkbox is checked, CopyStorm/Restore will only scan for new records in the indicated tables.
If this checkbox is unchecked, CopyStorm/Restore will scan for new records in all tables configured in the Restore Set Editor tab.
If the Select Specific Table Rules to Include checkbox is checked, a table selector will appear to allow specific table selection:
The “Related Lists” editor determines which records from related lists will be restored for each record. For example, when restoring Account the related lists Contacts, Cases, and Opportunities will usually be available.
To restore a related list click on the check box next to the name.
In the following screen shot the related lists Assets, Cases, Contacts, and Opportunities were selected for the Account table. This will cause CopyStorm/Restore to restore all Asset, Case, Contact, and Opportunity records related to selected Account records. Note that the superscript on each related list indicates the SalesForce Table and Column associated with the list.
Related lists can be selected to any level. Example: Account->Contact->Attachments.
As related lists are selected, they will automatically be marked as checked in the master table list on the left.
The control buttons at the top are often quite important and can be used to:
Expand/Collapse the tree of related lists.
Select all related lists (direct, grandchildren, great-grandchildren, .etc.) to any level.
Deselect all related lists.
In the following screen shot, the account named Capstorm, LLC and all of its related lists were selected for a restore. The steps were:
Set the Account filter to select just the Capstorm, LLC company.
Click on the Select All button for related lists.
Are you curious about how many tables were actually selected? The answer is 60!
When restoring test datasets to developer sandboxes or other environments with limited data capacity, it can be useful to limit the total number of records that will be restored either in:
Any single related list under any single record – for example, to ensure that no single Account will have more than the specified number of Contacts.
A single table, regardless of how many related records are in the CopyStorm database, will be limited to the specified number of records.
In practice, it is unusual to restore absolutely every related list for a record because certain system tables are best excluded (since they are already populated). When the Select All button is clicked, checking the “Include System Tables” checkbox will give you the option of restore none, a few, or all related system tables.
In Salesforce, it is common to see attachments and files associated with EmailMessage records. The Salesforce API however has restrictions about linking ContentDocumentLink records to EmailMessage records over the API when the EmailMessage record status is not ‘Draft’ and produces an exception in this scenario. This information be found in the Salesforce Object Reference for EmailMessage here.
On the EmailMessage object however, there is a field called IsClientManaged that when true allows users to modify EmailMessage.ContentDocumentId sto link file attachments even when the Status of the EmailMessage is not set to ‘Draft’. As of the 10.64.3 GA release of CopyStorm/Restore, an additional parameter in the Restore Set Editor for EmailMessage can be selected to push EmailMessage records with IsClientManaged = true regardless of the value in the CopyStorm database.
NOTE: This behavior is disabled by default and must be enabled through the CopyStorm/Restore configuration file.
Follow the below steps to push EmailMessage records with the IsClientManaged field set to ‘true’ for all records:
Open CopyStorm/Restore and navigate to the Restore Set Editor tab
Click on EmailMessage in the lefthand list of objects
In the Select Records section of the EmailMessage Restore Rules find the Additional EmailMessage Parameters section and check “Set IsClientManaged”
Clicking on the Restore Tab’s “Continue Restore” button will display a dialog to configure parameters for the restore operation:
Clicking on the “Start Operation” button will cause CopyStorm/Restore to upload all Pending records from the Tracker Database into Salesforce – either resuming a previously cancelled restore job or augmenting a previous restore with all new candidates in the Tracker Database.
If any record(s) are being retried via the Tracker Database’s “Set to Pending” feature, their historical skip reason and exception information will be removed from the tracker prior to the restoration reattempt (if they fail to restore a second time, the most recent skip reason and exception will be recorded).
To delete the history of previously restore records and restart the restore from the beginning, update the “Reset Restore” dropdown:
Do Not Reset – keep all Restore history.
Reset Exception History – delete Exception logs before restoring records.
Reset Restore History – delete all restore history and record maps before re-scanning for candidates and restarting the Restore.
To try to insert / update records that previously failed to Restore, check the “Retry Failures” checkbox. If this checkbox is checked:
Mark all “Skipped” records in the Tracker as “Pending”.
Try to Insert or Update all records that were changed from “Skipped” to “Pending”.
To limit the tables that CopyStorm/Restore will push to Salesforce, check the “Select Specific Table Rules to Include” checkbox. If this checkbox is:
Unchecked, all pending candidates will be restored.
Checked, only pending candidates from the selected tables will be restored.
Checking the “Select Specific Table Rules to Include” checkbox will display a table selector, allowing specific tables to be selected as candidates for restoration:
Repair Reference Fields
This option will cause CopyStorm/Restore to update previously restored records with the latest Id mappings from the Tracker Database and Migration tabs.
This option should be used when performing incremental restores using the “Select Specific Table Rules to Include” option.
Ignore Advanced Tab Rules
The Set to Pending tool resets the Track Database back to a “Pending” state, causing CopyStorm/Restore to attempt to restore the records again. This is useful in a number of cases:
A validation caused records to be skipped during a previous restore. The validation rule was then disabled and the records should now be restored.
Records were previously restored but the data in the CopyStorm backup has changed. Previously restore Salesforce data should be overwritten.
Records in Salesforce were deleted by hand and should be re-restored without losing the tracker history.
The following screenshot shows available options on the Set to Pending dialog:
There are a few decisions to make when using this dialog:
Choose which records to reset to pending.
Choose which record statuses can be affected.
Default parameters will change all visible skipped records to a pending state.
Records to Reset to Pending
“Visible”: Only change the status for records that are currently displayed in the Tracker Database table, taking filters into account.
“Table”: Change the status for all records in the currently selected table, do not take filters into account.
“Select Tables”: Change the status of one or more tables in the tracker.
The Profile Set editor provides fine grained control for the restore of a Salesforce Profile record.
For a partial restore, specific sub-components of a Profile are selected for the restore. A partial restore is often used when migrating a Profile to a new environment where the original Profile contains entries related to objects/fields are not in the target Salesforce.
A complete restore will cause all properties of a Profile to be deployed.
An Expert restore provides fine control over the XML which is restored. See the Expert Mode Editor for details.
Restoring a Salesforce custom setting is a simple process once you understand:
Each custom setting is kept in a Salesforce SObject where the sobject has a extra flag indicating that it is a Custom Setting.
A custom setting restore is a two step process.
The first step is to restore the SObject.
Goto the CopyStorm/Restore MetaData tab
Search for the custom setting table in the list of CustomObjects.
Restore the table.
After this step your target Salesforce will contain the custom setting but no values will be set for the setting.
This step restores the customer setting data using CopyStorm/Restore (just like any other table).
Goto the Restore Set Editor Tab
Select the table associated with the custom setting.
Make sure the “All” record selected is active.
Run the restore.
CopyStorm/Restore supports saving a restore set configuration in two formats:
Plain-text XML.
Encrypted text using 256-bit DES encryption.
Both formats allow saving Salesforce and database credentials — passwords are always encrypted. A CopyStorm/Restore session can be completely restored using the File / Open operation.
The “Save” dialog allows the selection of a directory and file name, as well as options to Encrypt and Save Passwords:
The plain-text XML version of the file is not intended to be edited by hand, as it is fairly complex. If problems arise from hand-editing a configuration file, Capstorm may not supply support.
The Notes Tab is useful for storing notes about a restore. The text is free-form and saved in the CopyStorm/Restore configuration file.
The Deploy action (button) launches a dialog for initiating and monitoring a deployment to Salesforce. Deployments consist of three stages:
Review/update the options controlling the deployment.
Review the deployment plan.
Run the deployment.
Generally the only step a user needs to do is click on the “Deploy” button.
The Deployment Options tab controls how the deployment is executed.
The Deploy Plan tab lists a summary of all metadata objects that will be deployed. This is used as a final review prior to launching the deployment.
The Deploy Log tab shows the progress of the deployment as it happens and provides a way to cancel an active deployment.
During a deployment this tab may look like the following:
When the deployment is complete the log tab will show the final status of the deployment:
When Salesforce Knowledge is used in multiple languages, there are “master language” articles and “translations.” Salesforce has very strict rules about how these articles must be handled. The CopyStorm restore process is designed to follow these rules automatically to ensure a multilingual Knowledge Base is restored correctly
The most important rule is that for any article version, the master language article is always restored before its translations. CopyStorm’s process identifies the master article and ensures it is restored first.
For example, the restore will happen in this order:
First, it restores Version 5 of the English master article: “How to Reset Your Password.”
Next, it restores the translations of Version 5, such as “Cómo Restablecer su Contraseña” (Spanish) and “Wie Sie Ihr Passwort zurücksetzen” (German).
Finally, it promotes the master language and translations to Online or Archived, depending on the status of the article in the CopyStorm database.
This order is necessary because a translation cannot be correctly published in Salesforce until its master version already exists.
Salesforce has another rule: a translation cannot be published if its master article has a new Draft version in progress. CopyStorm’s smart sorting process handles this by making sure the current Online master version and its translations are restored before it tries to restore a new Draft of that same master article. This keeps the parent article in a stable Online state so its children translations can be published without errors.
Translations do not need to be archived one by one. Salesforce simplifies this process.
When a master language article is archived, Salesforce automatically archives all of its published translations at the same time.
CopyStorm’s restore process uses this behavior. The final “archiving” phase of the restore job focuses only on archiving the master articles. CopyStorm correctly sets the master article’s status to Archived and relies on Salesforce to then handle the connected translations.
By following these strict ordering and archiving rules, CopyStorm ensures that master articles and all their translations are restored with their relationships intact.
Release Date: 15-Sept-2023
This is a minor feature and bug fix release. As always, existing CopyStorm/Restore configuration files are backwards compatible.
15-Sept-2023
Original Release
This release introduces a feature to detect and warn if email deliverability is enabled in the target Salesforce org. CopyStorm/Restore can be configured to warn if email deliverability is enabled, halt the restore if email deliverability is enabled, or ignore email deliverability entirely.
Data restoration logic has been updated so that UNKNOWN_EXCEPTION errors will not cause the full CopyStorm/Restore job to terminate – instead, the impacted records will be marked with the UNKNOWN_EXCEPTION error and CopyStorm/Restore will continue with the rest of the recovery.
With this release, Tasks that are marked as Archived within Salesforce can be matched using the Multi-Column record match policy along with non-Archived Tasks.
The Permission Set editor provides fine grained control for the restore of a Salesforce permission set.
Warning: Restoring a Permission Set completely replaces its definition in Salesforce. Unlike Profile restores, Permission Set restores DO NOT incrementally change a Permission Set.
For a partial restore, specific sub-components of a Permission Set are selected for the restore. A partial restore is typically used when migrating a Permission Set to a new environment where the original Permission Set contains entries related to objects/fields are not in the target Salesforce.
A complete restore will cause all properties of a Permission Set to be deployed.
An Expert restore provides fine control over the XML which is restored. See the Export Mode Editor for details.
While it is best practice to store Salesforce Reference Ids in Reference Fields, there are a handful of situations where a Reference Id may be stored in a Text field.
By default, CopyStorm/Restore will use Reference Field metadata to determine whether or not a field contains a Reference Id, and which table(s) the Id may reference. In cases where Reference Ids are stored in Text fields CopyStorm/Restore can be configured to treat the field as a Reference Field, which will cause CopyStorm/Restore to:
Take the reference information into account when determining the table restore order.
Use CopyStorm/Restore’s Old Id to New Id mapping to ensure referential integrity when uploading field values for the Text field.
To configure CopyStorm/Restore to treat a Text field as a Reference field:
Create a file [CopyStormRestore]/config/CopyForceMetadata.xml
Use the following template to populate the file:
This article discusses common reasons that may prevent records to restore using CopyStorm/Restore.
Your Salesforce instance may have triggers that need to be disabled prior to restoring records. Here are a few examples:
A BeforeUpdate trigger computes sales tax for a Quote. The error seen when restoring records is “TOO MANY SOQL STATEMENTS”.
A BeforeInsert trigger does data validation on a specific field whose validation rules have changed over time. The error seen indicates that an INSERT or UPDATE failed.
Errors caused by triggers may be complex because a failure at a high level (e.g. Opportunity) may cause subsequent failures.
CopyStorm/Restore’s default configuration will not restore Opportunity or Quote records referencing inactive price books or prices. To include these records you must explicitly enable the behavior on the Global Parameters tab.
You may see an error indicating that data from the backup is not valid for a restore. These are typically caused by numeric values with too many digits or email addresses in an invalid format, represent real errors in your source Salesforce database, and should be corrected.
This section explains the best practices for recovering and restoring Salesforce Knowledge base using CapStorm/Restore. Because Knowledge is a uniquely complex object with strict rules, these articles provide a detailed look at CapStorm’s specialized restore process.
The Knowledge Article Restore Lifecycle — an overview of the three-phase process (Draft, Online, Archive) that CapStorm follows to safely restore Knowledge articles, including important considerations to know before starting.
How CapStorm Handles Master Language and Translations — an explanation of the specific rules and automated processes CapStorm uses to correctly restore a multilingual Knowledge base, ensuring master articles and their translations are handled in the proper order.
— a guide to the advanced settings available for Knowledge recovery, explaining what options like “One Version Per Push” do and the best-practice scenarios for using them.
There are a number of reasons that may cause CopyStorm/Restore to skip a record during restore. The most common include:
The record references another record that is not in the CopyStorm database.
The record references a record that failed to restore for another reason.
The record is already in the target Salesforce and has exactly the same timestamp.
There are also a number of Salesforce table specific reasons that will cause a record to be skipped (i.e. operations Salesforce does not allow). For example,
Activated Contracts cannot be written to Salesforce.
Converted Leads cannot be written to Salesforce.
Opportunity Line Items cannot be inserted if they reference an inactive price.
Quotes cannot be inserted if they reference an inactive price book.
Normally, when a record is skipped the reason is stored as part of the tracker database (an exception to this rule is make for Converted Leads and Activated Contracts). When there is a reason in the tracker database it can be found by clicking on the “Status” of a record — the reason will be displayed in a popup dialog. If no popup dialog appears, CopyStorm/Restore did not record the reason the record was skipped.
There are a few options on the “Global Parameters” tab that can increase the number of skipped record reasons that are recorded. These options can be found under the “Skipped Record Reporting Options”. If you enable all options in this section, the maximum number of “skipped record reasons” will be recorded in the tracker database.
Release Date: 12-Jan-2024
This is a minor feature and bug fix release. As always, existing CopyStorm/Restore configuration files are backwards compatible.
12-Jan-2024
Original Release
CopyStorm/Restore has been updated to support CopyStorm Table Partitions created by the CopyStorm/Medic Partition Editor tool. After Partitions are created in CopyStorm/Medic, CopyStorm/Restore will automatically query and restore fields from the correct partition(s).
To prevent chicken-and-egg issues in File recovery, the ContentDocumentId reference field on ContentVersion has been updated to always default to the “Set to Null” setting. Any previous configurations for this field will continue to be respected – and any changes to this reference field’s configuration will be respected.
The Record Mapping Rule tool is used to create rules telling CopyStorm/Restore how to map between records in the CopyStorm backup to records in the target Salesforce. This is very useful for migration in mapping Salesforce users and a variety of core Salesforce configuration records.
For example:
Mapping Salesforce Users by their email address.
Map Record Types based on record type (where the names are not the same in CopyStorm and the target Salesforce).
CopyStorm/Restore includes default mapping rules for a few common tables. However, these rules do nothing by default because no specific mappings are supplied.
Restoring proper record ownership when restoring historical data can be a complex operation for several reasons:
By default, Salesforce does not permit an inactive user to be the owner of a record.
When migrating data from another Salesforce instance, the record owner probably does not exist in the target Salesforce.
While discussing how to manage these issues, this article will also cover a related problem:
Each time CopyStorm, CopyStorm/Restore, or CopyStorm/Medic runs, it records job information and statistics into a set of history logging tables within the CopyStorm database. The History Tab supports viewing and exporting CopyStorm job history.
The History Tab consists of two sections — a top section used to search for past CopyStorm jobs and a bottom section displaying a one-line status for each job in the database.
When the “View…” column is clicked from the History tab, a dialog appears providing detailed job status. This dialog will open with the Overview tab which displays a list of the tables present in the restore set with metrics for the records that were restored, skipped, or encountered exceptions within each table.
By clicking the “View…” link in the left-most column for any given table in the Overview list, you can view more detailed information about the restore operations carried out on the records within that table.
CopyStorm/Restore organizes tables into groups based on the probability of a table being directly selected for a restore. There are a number of groups predefined by CopyStorm/Restore:
The Original Record Id Rule tool is used to create a custom field in the target Salesforce and populate the new custom field with record Ids from the CopyStorm backup database. This is useful in a number of migration scenarios when the original Id of records being migrated must be maintained.
For example:
The Original Id may be used after the migration to correlate data between the source and target orgs.
Salesforce Id may be used as a key by an external system which must be able to access the original Salesforce Id.
Original Id field creation is enabled by checking the “Enable this Feature” checkbox. Available options include:
The Meta Data tab enables the restoration of Salesforce metadata with surgical precision.
This tab is divided into three sections:
The Object Selector — add or remove a metadata object from the deployment set.
The Object Editor — precisely select the properties of a metadata object that should be deployed.
The Object Deployment Tools — deploy the selected metadata.
A CopyStorm/Restore can be opened, viewed, and manipulated independently of CopyStorm/Restore using the . The H2 Console is a web based tool built into the H2 which supports all of the regular SQL commands associated with any relational database. The launch script for the H2 Console is located in the same directory as CopyStorm/Restore and called:
h2console.bat (windows)
sh h2console.sh (Linux and Mac)
Note: IT IS IMPORTANT to start the H2 Console using this script if you intend to modify a tracker database using SQL. Otherwise your modifications will failed because required database triggers will not be found (the triggers are implemented in Java and loaded using the
Release Date: 19-Dec-2025
This is a minor feature and bug fix release. As always, existing CopyStorm/Restore configuration files are backwards compatible.
Java version 17 or higher is required for CopyStorm/Restore version 10.64.3. A supported Java environment is included with each Windows installation, however, Linux or Mac users should verify installed Java version prior to upgrading.
Parameters for controlling the level of parallelism and memory used when scanning the CopyStorm database for records to restore.
Before restoring Attachments with CopyStorm/Restore it may be useful to understand how Attachments are handled by Salesforce and how they are different from most tables. When a table in Salesforce contains a reference to another table it is almost always possible to know the type of table being referenced. For example, the Contact.AccountId field will always reference a record in the Account table. However, in the Attachment table, a number of reference fields are not so specific (e.g. Attachment.parentId) and can reference many built-in and all custom tables in Salesforce. This type of table is also known as “polymorphic” because they can “morph” into being a child of almost any type of table.
When restoring polymorphic table records, the best way to find the records is almost always to start with their parent table.
If this is a bit confusing, here is a specific example for restoring Attachments related to Accounts:
This informs CopyStorm/Restore to avoid inserting or updating Account records. The application will still find candidate records — this is necessary because the Attachments to be restored reference Accounts.
This informs CopyStorm/Restore that it should:
CopyStorm/Restore allows you to incrementally restore records to a Salesforce sandbox. This article will show you how.
If you do not want to know how CopyStorm/Restore works, this is the only section you need to read. The instructions are:
Open the configuration file used by CopyStorm/Restore during the original restore.
Go to the Restore Set Editor tab and modify or add rules that control which records should be restored.
Go to the Restore tab and click on the “Re-scan Candidates” button.
Release Date: 2025-Apr-01
This is a minor feature and bug fix release. As always, existing CopyStorm/Restore configuration files are backwards compatible.
The CopyStorm/Restore Record Lineage feature is specifically designed to maintain data record lineage. It keeps recovery information between backed-up and recovered versions of the same data within the CopyStorm database, ensuring that the relationship between data at different points in its lifecycle is preserved.
Release Date: 16-Dec-2024
This is a feature, bug fix, and Salesforce API version upgrade release. As always, existing CopyStorm/Restore configuration files are backwards compatible.
This release updates CopyStorm/Restore to use Salesforce API version 62.
CopyStorm/Restore’s Advanced Metadata Selector provides a way to identify Metadata that has been modified at a particular point in time. After selecting the point in time, CopyStorm/Restore will automatically identify the metadata items that were modified during the provided window.
The following dialog will appear:
Provided Parameters:
Start Date (Optional): Metadata changes made after this date will be added to the Restore Set.
Opportunities cannot be inserted if they reference an inactive price book.
Higher values increase the level of parallelism (i.e. number of virtual data clerks) but also increases the load on your network.
More concurrent threads take more system memory. This is unlikely to be an issue on a 64-bit system but is something to consider.
The performance of your database can be a factor but rarely causes issues.
Table specific parameters override global defaults.
Use the custom field instead of the standard field throughout the Salesforce instance.
Back up the Salesforce instance using CopyStorm.
-script argument is the recovery file created in the first step.SkippedRecordReason — this table can be empty but must exist.
RestoreException — this table can be empty but must exist.
RestoreHistory — this table can be empty but must exist.








Record Status to Reset
Only change the status of records with the selected status or statuses.
Other Options
Limit changes to records updated in the CopyStorm database since the most recent restore.
Change the status only for records with a modification timestamp newer than the timestamp the record had when it was restored.
Only records that have been deleted from the target Salesforce.
Change the status only for records that were previously restored but are now missing from Salesforce.
Clear the Restored Id field for each record.
In addition to changing the record status, remove the “Restored Id”.





Selection Strategy
Most Recent
Use the most recent change between the Start / End dates.
Earliest
Use the oldest change between the Start / End dates.
Selection Rules
Full Metadata Restore
If checked, CopyStorm/Restore will configure all newly selected metadata items to be fully restored.
If unchecked, CopyStorm/Restore will use the currently selected default.
Keep Existing Selections
If checked, CopyStorm/Restore will keep currently selected Metadata in the Restore Set.
If unchecked, CopyStorm/Restore remove all currently selected Metadata from the Restore Set, then repopulate the Restore Set based off of the provided parameters.


If necessary, create the referenced record in Salesforce.









Inactive Prices
Record when an opportunity or quote line item references an inactive price (or a price in an inactive price book).
Missing Referenced Records
Record when a record contains a reference Id that cannot be found (or was not restored). This is usually caused when a Salesforce table is missing from the CopyStorm database.
Missing Reference Rules
Record when a record contains a reference Id without a rule for restoring the reference. This is usually caused by using a CopyStorm/Restore configuration file that was created using a database with a different schema than the current database.

Decrypt Compliance Data
If checked, decrypted compliance data will be pushed to Salesforce. This data may, or may not, be obfuscated based on the database user’s role. If unchecked, data will be pushed to Salesforce directly from the CopyStorm database, as-is.
Show Missing Fields
Include fields that are missing from the CopyStorm database or from Salesforce when displaying available fields to restore in the Restore Set Editor.
Show Formula Fields
Include formula fields when displaying available fields to restore in the Restore Set Editor.
Referenced Record Not Found Default
Default action to take when a record to restore references a record that is not in the target Salesforce instance.
Examples:
A Case record restore candidate references a Contact no longer in Salesforce.
An Account record restore candidate references a parent Account no longer in Salesforce.
Available values are:
Set to Null – ignore a missing reference and set the column to NULL in the target Salesforce.
Skip Record – do not restore a record if a referenced record cannot be found in the target Salesforce.
Create Record – create missing referenced records in the target Salesforce if necessary.
If Email Deliverability is Enabled
Default action to take when Email Deliverability is enabled in the target Salesforce instance.
Possible default actions If Email Deliverability is Enabled are:
Continue – Continue the restore.
Warn – Display a warning dialog prior to running a restore.
Halt – Terminate the restore entirely.
For production restores Halt is generally the best default option. This is to prevent unwanted emails being sent out on INSERTS/UPDATES
Note: The Author Apex Salesforce Permission is required to validate Email Deliverability.
If the Author Apex permission is unavailable, CopyStorm/Restore will always act as if Email Deliverability is enabled.



This option will cause CopyStorm/Restore to not use the rules specified on the Advanced Tab.
When checked, CopyStorm/Restore will not automatically disable triggers, validation rules, workflows, etc… when restoring data.







The maximum number of insert/update requests that CopyStorm/Restore will make at the same time. The default value, 1, will write up to 200 records at a time using a single request. The maximum value, 10, will write up to 2000 records at a time using 10 concurrent requests. Higher values cause CopyStorm/Restore to consume more memory but can reduce total copy time by a factor of 2-10x. Observed performance increases depend on a number of factors including active triggers and validation rules.
Allow Nulls
If checked, fields with a value of null will be restored (potentially destructive).



Custom
Load metadata that the user has edited in this or a past session of CopyStorm/Restore.
2020-01-10 14:34:50
Load the backup from the CopyStorm database which was created on the specified date.
Current Backup
Load the most recent back found in the CopyStorm database.
Current Partial
Load the metadata corresponding to the current partial selection for the metadata object.
Current Salesforce







Load the current definition from the target Salesforce instance.
CreatedDate and LastModifiedDate.By default, not even a Salesforce administrator has the privileges necessary to assign an inactive Salesforce user as the owner of a record. However, any user can be granted this ability by:
Creating a Permission Set that includes the Salesforce system permission “Update Records with Inactive Owners”.
Associating the new Permission Set with a Salesforce user account.
CopyStorm/Restore will recognize that its connection to Salesforce has this elevated permission and do the right thing. If you need additional help, see the Salesforce release notes that introduced this feature.
This problem most often occurs during a Salesforce migration project. For example, suppose that the Acme company purchased the Dynamo company and the Salesforce team has been told to migrate all data from Dynamo’s Salesforce into the Acme Salesforce.
The CopyStorm backup of the Dynamo database contains a record owner named “josiah@dynamo.com”
In the Acme Salesforce, “josiah@dynamo.com” will be replaced by the new Salesforce user “josiah@acme.com”.
During the data migration all records owned by josiah@dynamo.com should be transferred to josiah@acme.com once all Dynamo data has been migrated to the Acme Salesforce.
The best practice to address this issue is to create a migration mapping for Users in the CopyStorm/Restore Migration Setup tab. By using the Record Mapping Rule Editor on this tab you can explicitly tell CopyStorm/Restore how to map users in the Dynamo database to users in the target Acme Salesforce. For details see these articles:
By default, not even a Salesforce administrator can write to the standard Salesforce audit fields, including:
CreatedById
CreatedDate
LastModifiedById
LastModifiedDate
If you need to restore these fields:
Create a Permission Set including the Salesforce system permission “Set Audit Fields upon Record Creation”.
Associate the new Permission Set with a Salesforce user account.
CopyStorm/Restore will recognize that its connection to Salesforce has this elevated permission and do the right thing (e.g. restore audit fields).
In addition to the audit fields detailed in #3 above, restoring the “CreatedBy” and “CreatedDate” fields for Chatter Feeds requires an additional permission.
If you need to restore these fields:
Create a Permission Set including the Salesforce system permission “Insert System Field Values for Chatter Feeds”.
Associate the new Permission Set with a Salesforce user account.
CopyStorm/Restore will recognize that its connection to Salesforce has this elevated permission and do the right thing (e.g. restore audit fields).
This release includes a new configuration option for the EmailMessage object “Set IsClientManaged”. When this option is enabled, all records are uploaded with the “IsClientManaged” field set to true. This allows data related to Sent emails to be inserted into Salesforce.
Improved Restore SQL query performance for queries that filter on unindexed columns.
When “Retry Failures” is checked, Restore History will now include records marked as pending by “Retry Failures” in the “Start Pending” counter.
Fixed an issue preventing the Max Per Parent and Max Total parameters from being enforced on related list scan.
Fixed an issue preventing recovery of Knowledge objects with names other than “Knowledge__kav”.
Fixed an issue that could cause the wrong User Id to be assigned to OpportunitySplit and OpportunityTeamMember records.
19-Dec-2025
Original Release
CopyStorm/Restore will re-process the restore rules and look for additional candidates to restore.
Click on the “Resume Restore” button.
Records previously restored will be skipped.
New candidates will be restored.
That’s it! You can repeat this recipe as often as you like to add new records to Salesforce.
CopyStorm/Restore keeps track of what needs to be restored and what has already been restored in a local H2 database.
The name of the database is found on the Global Parameters tab in the “Tracker Database Name” field.
The default name is generated by the application and unique to the configuration file.
It can be changed to any name desired.
The H2 database is stored in the directory:
$HOME/.capstorm/copyStormRestoreSets
The H2 database tracks the mapping of a record’s ID in the CopyStorm backup to the unique ID assigned by Salesforce while restoring.
The first step of any restore is to scan the CopyStorm backup database for records matching the rules in the Restore Set. As candidates are found new records are created in the CopyStorm/Restore tracking database.
The second restore step involves:
Finding all records in the tracking database that have not been restored.
Restoring records and recording their corresponding Salesforce Ids in the tracker database.
If the restore modified a Salesforce record, the Id will be the same as the tracker Id.
If the restore added a new record to Salesforce, the restored Id and tracker Ids will be different.
Clicking on the “Re-scan Candidates” button causes CopyStorm/Restore to look for new restore candidates and put them into the tracker database.
The tricky part of this process is figuring out which records to restore and the order in which to restore them — a fundamental graph theory problem that our CTO is happy to talk about any time over a beer.
CopyStorm/Restore Record Lineage assists with:
Ensuring data accuracy. Providing the history of data over its lifetime, you can verify its accuracy and identify potential discrepancies.
Improving auditability and compliance. Maintaining a record of different versions of data allows you to trace changes made to the data through its full lifecycle.
Streamlining recovery. Keeping track of all versions of data, even when data recoveries may have changed its unique Id many times, means that you can ensure that data recoveries will not introduce duplicate data.
CopyStorm/Restore has been updated with the ability to recover record data from Snowflake for data enrichment.
Note that CopyStorm/Restore can only restore data that is supported on Snowflake – Files and Attachments, Metadata Recovery, and Snapshot Recovery are not supported.
Add support for OAuth User/Password and Client Credentials flows.
Reworked Rich Text image preprocessing to support multiple url formats.
Add options in the Snowflake connection string builder for the MFA private key file and optional private key file password.
Update CLI exit codes to be non-zero if any Exception is reported by CopyStorm/Restore.
Add XML configuration for S3 connections to use permanent credentials (instead of temporary session credentials).
Improve transaction handling in tracker database schema upgrades.
Fix issue with CapStorm licensing traffic when using an authenticated proxy.
2025-Apr-01
Original Release
Option to support multiple restores in parallel using the same H2 Tracker Database.
Fix for Workflow Automatic Management to ensure that all disabled workflows are re-enabled after restore.
This release introduces a new configuration option that allows the H2 Tracker Database to operate in server mode. This enables multiple simultaneous connections, so two or more restores can run at the same time using the same tracker database.
Address an issue where CopyStorm/Restore would disable but not re-enable all workflow rules when using automatic workflow management. CopyStorm/Restore now re-enables all disabled workflows after the restore process finishes.
MySQL queries: Improvement
Eliminate use of Substring() on data values to optimize query execution speed and efficiency.
Tracker Database export files format: Improvement
Exports now have a CSV extension instead of a txt extension.
New “Cancel” option in Exit dialogue: Improvement
The option to Cancel is now displayed in the “Are you sure?” exit dialogue that appears when CopyStorm/Restore is closed without saving an updated configuration file.
Advanced Metadata Editor: Fix
Fix issue where the Advance Metadata editor did not display the last line of the XML..
16-Dec-2024
Original Release
<CopyForceMetaData>
<!--
Treat the field Contact.TextField__c as a reference field which:
- Contains references to either the Account or Contact table.
- Uses a relationship name of MyCustomRelationship.
-->
<FieldRule table="Contact" field="TextField__c" relatedToTable="Account,Contact" relationshipName="MyCustomRelationship"/>
</CopyForceMetaData>To add or modify the mappings for a specific table, click on the “Edit” button next to its name. A dialog will appear showing existing mappings allow them to be edited or removed and allowing additional mappings to be imported from a CSV file.
When the Save Changes button is clicked, CopyStorm/Restore will validate the mapping rules looking for entries that are missing in either the CopyStorm database or in Salesforce. Though missing entries will be silently ignore during the restore process, cleaning them up is almost always the right choice.
In addition to mapping rules provided on the Migration Setup tab, CopyStorm/Restore will always map records using a handful of built-in mapping rules. Mappings on the Migration Setup tab will override the default mappings.
User
Field matching on Email
Profile
Field matching on Name
UserRole

Any exceptions that occurred during the job will be displayed in the Exceptions tab. In the following example, the job had six exceptions. Each exception can be selected to view the full stack trace to assist with troubleshooting.
If any records from the CopyStorm Database are “skipped” and not uploaded to Salesforce during a restore job, the “Skipped Reasons” tab will display each instance of skipped records, and the reason why they are skipped. Below is an example of several records being skipped for various reasons.
CopyStorm/Restore jobs support the temporary disabling of Saleforce Automation Flows during the restore process according to the user specified configuration. (For more info on configuring this behavior, see here.) Logs of any temporarily disabled Salesforce Automations, as well as the re-enabling of such Automations can be viewed here. See below for example.
Performance metrics for each restore job can be viewed under the “Performance Logs” tab. See below for an example.
In addition to viewing historical job data, the History Tab can be used to delete job records and to export job data to Excel-compatible CSV files.
To delete job history records:
Click on the check box next to one or more Job #.
Click on the “Delete” button.
To export all data associated with a job history record to CSV files:
Click on the check box next to one or more Job #.
Click on the “Export” button.
Select a destination folder to save the .zip bundled CSV files.
The zip folder will have the following structure:
<C:/Specified Path to file/Specified file name.zip/Specified file name/>
RestoreJob.csv – Data from the History tab.
RestoreJobAutomation.csv – Data from the Automation Logs tab.
RestoreJobExceptions.csv


Uncommon
Tables that are typically not restored. Many of these are restored automatically on a sandbox refresh.
Custom
Contains all custom object tables (i.e. tables not created by Salesforce).
Package
Contains custom objects from well-known 3rd party packages. Not all packages are known by CopyStorm/Restore — please contact to add a new one to the built-in group.
System
Contains tables that are almost never restored. Most of these tables are restored automatically on a sandbox refresh.
Future
Contains tables that are not currently available to be restored but will be in the future. Tables in this group tend to have obscure, non-standard restore rules.
Not Restorable
Contains tables that cannot be restored using the Salesforce API.
It is possible to add tables to an existing group or to create additional groups by editing the file “SalesforceTableFamilies.xml” in the “config” subdirectory of the CopyStorm/Restore installation. The default file contains documentation detailing how to add new records.
Several sample entries are included below.
All of the GEOCACHE custom tables begin with the prefix “geocache__” — this was determined by looking at the registered package prefix in Salesforce. The following XML will put all GEOCACHE tables into the Package group:
The following XML will create a new Group named “MyProject”, containing three tables:
Common
Tables that are typically used to drive a restore. A table is put into this group if it is added to the restore set and not also a member of another group.
Less Common
Tables that are typically only restored because they are referenced by another table.
<SalesforceTableFamily name="Package">
<Pattern rule="geocache__.*" />
</SalesforceTableFamily><SalesforceTableFamily name="MyProject" >
<Pattern rule="masterList__c" />
<Pattern rule="masterSubList__c" />
<Pattern rule="cookieJar__c" />
</SalesforceTableFamily>Enable This Feature
Check this checkbox to enable Original Id column creation and population.
Field API Name
The Salesforce API Name of the Original Id field. This field will be created automatically if it does not already exist.
Field Label

To add a metadata object to the deployment set, click on the checkbox next to its name. Default behavior will be to load the object into the Object Editor. To remove a metadata object from the deployment set, uncheck the box next to its name.
To narrow a search for metadata objects, use the filter controls above the Object Selector list:
Meta Data Type — if selected, only metadata objects of the given type are displayed. If blank, all metadata types are shown.
Selected — if checked, only metadata object that are part of the deployment set will be shown.
Invert — when clicked, unchecks any checked items and checks all unchecked items.
Clear — when clicked, unchecks all visible checked items.
Name Filter — as characters are typed into this box, only metadata objects containing the typed text will be displayed.
The Object Editor allows selection of:
The version of the metadata object which will be deployed.
The sub-components of the metadata object which will be deployed.
There are two types of object editors:
Simple — the only available option is the version which will be deployed.
Examples include ApexPage, ApexClass, and PermissionSet.
Complex — there are multiple sub-components that can be selected individually.
An example of this is CustomObject — its sub-components include CustomFields, ValidationRules, etc…
There are several basic object deployment tools:
Deploy — deploys the selected metadata to Salesforce.
Show Plan — displays a summary of metadata in the deployment plan.
Create Deployment Directory — create a directory structure usable by the Salesforce Migration Tool to deploy the selected metadata.
Create Destruction Directory — create a directory structure usable by the Salesforce Migration Tool to delete the selected metadata.
There are several key things to understand before launching the H2 Console.
If your tracker database is named MyTracker123 (on the CopyStorm/Restore General Parameters tab) then the H2 path to your tracker database is:
jdbc:h2:~/.capstorm/copyStormRestoreSets/MyTracker123
The default user name for a tracker database is: root
The default password for a tracker database is: capstorm
CopyStorm/Restore cannot be using your tracker database at the same time as the H2 Console.
The following screen shots show the sequence of logging into a H2 database and running a query.
Once H2 credentials are entered, click on the Connect button to login and launch the H2 query tool.
For additional help see:
The level of parallelism to allow when scanning for restore candidates. Increased parallelism can increase restore performance but will cause CopyStorm/Restore to use more memory.
Available values are:
Minimal: Scan 1 table at a time, 1 batch of referenced records at a time, and wait until a table is fully scanned before scanning the next table.
Medium (Default): Scan 5 tables at a time, 5 batches of referenced records at a time, and start scanning referenced tables when there are 3 batches of records awaiting a scan.
High: Scan 25 tables at a time, 25 batches of referenced records at a time, and start scanning referenced tables as soon as there is a batch of records awaiting a scan.
Parallel Candidate Scans
The maximum number of tables that can be scanned for records simultaneously.
Parallel Reference Scans
The maximum number of queries that can run simultaneously when scanning for related records. This limit is Per-Candidate-Scan. For example, if “Parallel Candidate Scans” is set to 2, and “Parallel Reference Scans” is set to 3, there may be up to 6 related record queries running simultaneously.
Candidate Scan Batch Size
The number of records to process in a single batch when looking for candidates to restore (10 to 1000). Larger numbers can increase restore performance but will cause CopyStorm/Restore to use more memory.

Candidate Scan Parallelism
Restore Attachments.
Only restore Attachments that are directly related to the selected Account(s).
To restore a particular Attachment, constrain the search using a filter. This is rarely necessary due to Attachments being largely static once attached to an object.
CopyStorm/Restore will find the Accounts, decide nothing needs to change, and then restore the Attachments.

CopyStorm/Restore has the ability to transform data in the CopyStorm backup database prior to writing it to the target Salesforce. Built-in data transformers include:
Scramble — replace each letter with a different letter, replace each number with a different number.
Email Scrambler — build a new email address of the same size but with random letters & digits.
Email Append Invalid — append “.invalid” to an email address.
Asterisk — replace the source data with “******”.
Random Dictionary Substitution — for Names, Countries, Cities, Streets…etc
Lorem Ipsum — replace a block of text to the infamous “Lorem ipsum dolor sit amet, consectetur adipiscing…”
Random Date/Time — replace a date or date/time with a random date or date/time within the same year.
Read more about built-in transformers in the
If the built-in transformers are insufficient for your needs the instructions in this article can be used to add a new transformer to CopyStorm/Restore. The approach described in this article is the same as what CopyStorm/Restore does internally.
To add a dictionary transformer that substitutes values from a provided list of values, you can create or update update the TransformerRegistry.xml file with a tag:
<Transformers> <Dictionary name=”My Transformer Name” file=”/path/to/a/file.txt”/>
This will add two new transformers:
Random: My Transformer Name
Uniform: My Transformer Name
These transformers will replace the input text with a value taken from the text file (one value per line). The Random transformer will replace each input value with a random line from the text file. The Uniform transformer will replace each input value with a line from the text file, always replacing the same input text with the same value from the text file.
The first step is to build a Java class implementing “com.capstorm.copystormrestore.transform.ITransformer”. The code below contains the implementation of the Asterisk transformer:
The parameters to the transform() method are:
The method must return the value to insert / update in Salesforce.
Once the class has been created, package it into a jar and put the jar into the “lib” subdirectory of the CopyStorm/Restore installation. CopyStorm/Restore will only find your class if it is installed in this directory.
For CopyStorm/Restore to discover a field transform it must be declared in a file named “TransformerRegistry.xml” and placed into a directory where CopyStorm/Restore looks for configuration files (for example, the “config” sub-directory of the CopyStormRestore installation).
The TransformerRegistry.xml file should look like the following:
Where:
“name” is the value that will appear in the CopyStorm/Restore GUI.
“class” is the full path to the class built in the first step.
To set up a build and test environment for a new transformer in Eclipse:
Create a new Java project.
Update the new project’s path to reference all jar files in the “lib” sub-directory of CopyStorm/Restore.
For other development environments, including building and testing on the command line, make sure that all the required Jars are on your Java class path.
If this is to much for your team send an email to and they will be happy to arrange a small service contract.
Snapshot Recovery is used to recover Salesforce data that is stored in a CopyStorm Snapshot. This is useful in a variety of recovery scenarios when the data or schema contained within the primary CopyStorm data set is insufficient to perform a historical data recovery.
For example:
A field was deleted in Salesforce and is no longer contained within the primary CopyStorm data set.
Salesforce records must be reverted to their state at a known point-in-time.
Salesforce records modified during a known window must be reverted to the state the records took at a known point-in-time.
To configure CopyStorm/Restore for Snapshot Recovery, select a Snapshot using the “Data Set” drop-down on the CopyStorm/Restore Main tab. Records from the selected Snapshot will be available for restoration.
Selecting a Snapshot will configure CopyStorm/Restore to recover records from the specified Snapshot.
After selecting a Snapshot, CopyStorm/Restore will display Point-In-Time Recovery Parameters near the top of the application. These parameters are used to recover record data from a specific time or interval:
More information about CopyStorm/Restore’s Point-In-Time Configuration can be found either later in this document or within the Point-In-Time configuration dialog:
Point-In-Time configuration is driven by the Point-In-Time strategy selected in the “Recover” drop-down:
Most Recent: Recover the latest version of selected records.
A Point In Time: Recover the version of selected records closest to the selected date / time.
A Single Date: Recover records that were modified on a given date.
Between Two Times: Recover records modified between to dates / times.
When the “Most Recent” Point-In-Time Strategy is used, CopyStorm/Restore will use the record filtering and relationship rules configured on the to find records within the selected Snapshot.
If there are multiple versions of a record within the Snapshot, the version with the most recent modification time will be restored to Salesforce.
When the “A Point-In-Time” Point-In-Time Strategy is used, CopyStorm/Restore will use the record filtering and relationship rules configured on the to find records within the selected Snapshot, only considering record versions modified prior to the provided date/time.
If there are multiple versions of a record within the Snapshot, the version with the most recent modification time (prior to the provided date/time) will be restored to Salesforce. If a record is in the Snapshot, but no version of the record has a modification time prior to the selected date / time, the record will not be restored.
This Point-In-Time Strategy is used to revert Salesforce records to the values that the records held on a specific day and time.
Available date/time formats include:
dd-MMM-yy (19-May-1984)
M/d/y (5/19/84)
dd.MM.yy (19.5.1984)
dd-MM-yy (19-5-84)
When the “A Single Date” Point-In-Time Strategy is used, CopyStorm/Restore will use the record filtering and relationship rules configured on the to find records within the selected Snapshot, only considering record versions modified from the start to the end of the provided date (/time).
If there are multiple versions of a record within the Snapshot, the version restored to Salesforce can be configured using the “Pick” dropdown. Available values include:
Latest Version – restore the version with the most recent modification time.
Earliest Version – restore the version with the oldest modification time.
If a record is in the Snapshot, but no version of the record has a modification time within the Point-In-Time Strategy interval, the record will not be restored.
This Point-In-Time Strategy will find records that were modified between:
If a day is provided:
The beginning and end of the day.
For example, if “2021-05-10” is provided, CopyStorm/Restore will find record versions with modification date / times between “2021-05-10T00:00:00.000Z” and “2021-05-10T23:59:59.999Z”.
If a day and hour is provided:
When the “Between Two Times” Point-In-Time Strategy is used, CopyStorm/Restore will use the record filtering and relationship rules configured on the to find records within the selected Snapshot, only considering record versions modified from the start to the end of the provided interval.
If there are multiple versions of a record within the Snapshot, the version restored to Salesforce can be configured using the “Pick” dropdown. Available values include:
Latest Version – restore the version with the most recent modification time.
Earliest Version – restore the version with the oldest modification time.
If a record is in the Snapshot, but no version of the record has a modification time within the Point-In-Time Strategy interval, the record will not be restored.
Though CopyStorm/Restore can faithfully restore Salesforce audit fields, there are a number of cases where the LastModifiedBy and LastModifiedDate fields cannot be restored. This article explains why.
If both the CreatedBy/CreatedDate and the LastModifiedBy/LastModifiedDate fields are not being restored accurately then the answer is simple. The Salesforce credentials in use are missing the necessary privileges to write to audit fields. See the article on Restoring Audit fields for instructions to enable this Salesforce feature.
If your Salesforce credentials do have the proper permissions, then several other conditions can cause the LastModifiedBy and LastModifiedDate fields to fail to match the values in the CopyStorm database. To understand the condition details, you must first understand what the option Salesforce permits on audit fields means. The permission that allows writing to Salesforce audit fields is called:
Set Audit Fields upon Record Creation
The permission means exactly what it says: Audit fields can be set on a record INSERT but NOT on a record UPDATE. This “feature” is at the core of why CopyStorm/Restore cannot always restore the LastModifiedBy/LastModifiedDate fields to match what is in the backup.
The rest of this article describes scenarios where CopyStorm/Restore is forced to UPDATE records and thus change their LastModifiedBy and LastModifiedDate fields.
Though CopyStorm/Restore will always restore records in the optimal dependency order, circular relationships can make the order ambiguous. Consider the following case we have seen with multiple Salesforce instances.
The Account table has a field called PrimaryContactId — a reference to a Contact record.
The Contact table has a field called AccountId — a reference to an Account record.
Here is how CopyStorm restores these records.
Restore Account records and keep track of all occurrences of PrimaryContactId that are not yet known (because the Contact table has not yet been processed).
Restore Contact records.
Use the Ids on the restored Contact records to patch the Account.PrimaryContactId fields that were skipped when Accounts were inserted.
It is Step #3 that causes the LastModifiedBy/LastModifiedDate values on Account records to change to the Salesforce credentials running CopyStorm/Restore. Unfortunately there is no other choice since:
Salesforce does not permit writing to audit fields on update.
The Account records have to be created before the associated Contact records making step #3 required.
Some Salesforce record types are created as a side effect of creating another record and CopyStorm has no control of over the audit field values for records created by side-effect. Common examples include:
ContentDocument records are created as a side effect of inserting a ContentVersion record.
OpportunitySplit records can be created as a side effect of inserting an OpportunityTeamMember.
ContentFolder records can be created as a side effect of inserting a ContentWorkspace.
There are a number of record types in Salesforce that do not support an INSERT operation when they are in specific state. In this case CopyStorm/Restore will often:
Create the record in a state that allows INSERT.
Update the record to match the original values in the database record to restore.
Step #2 causes the LastModifiedBy/LastModifiedDate values to be different that those on the original record in the backup. Common examples include Lead and Contract.
It is possible for the side effect of a trigger or workflow to cause an update on a record restored by CopyStorm/Restore. Though CopyStorm/Restore supports disabling of triggers/workflows during a restore, the problem still comes up for several reasons.
The CopyStorm/Restore user “forgets” to disable a trigger/workflow.
The trigger/workflow is part of a managed package and Salesforce does not support their disablement.
Users can expect 100% accuracy as much as they want but any application using the current Salesforce API will not be able to deliver this level of performance. The only choice we know of for getting 100% accuracy is to hire Salesforce to perform the restore and then pay many $$$ and wait. Once a 100% person sees the cost and wait time we suspect they will live with a few audit fields being different.
Release Date: 22.Aug.2024
This is a bug fix version upgrade release. As always, existing CopyStorm/Restore configuration files are backwards compatible.
22.Aug.24
Original Release
This release focuses on customer experience and bug fixes. Notable items include:
Salesforce Improvements & Bug Fixes: Restore of Salesforce knowledge articles when all articles are in an “archived” state. Prior releases require a version of the article to be active.
Application Experience & Interface: Improve performance of restore candidate scanning when using Snapshots.
EmailMessage.ActivityId: Fix Update Issue
Addresses an issue where CopyStorm/Restore attempts to update the EmailMessage.ActivityId field. The restore process now permits only INSERTS for this field.
Knowledge Restoration: Improvement
CopyStorm/Restore now supports restoration of Knowledge Articles that are all in an “Archived” state
Restore Set Editor: Fix for Record Selector Synchronization Issue
Fix an issue where the text area (for ID list, SOQL, etc.) resets unexpectedly
Fix an issue where ID File input does not persist properly
Email Deliverability Notification: Improvement
Record Filters in CopyStorm/Restore provide an easy way to limit record selection without writing SQL. Following these steps will enable CopyStorm/Restore to restore a specific set of records to Salesforce.
To limit restored records to specific criteria:
Select the “Filter” in the “Which Records” dropdown.
Click on the empty filter to edit.
Create the criteria by dragging and dropping fields and references.
Test the filter and validate the criteria.
Press “Save” to apply the filter.
To enable filter-based record selection for a table:
Select the table in the Restore Set Editor.
Update the “Which Records” selector to “Filter”.
Click on the “Click Here To Edit” button to open the filter editor.
Edit the filter by dragging and dropping fields and operators from the left-hand side of the dialog into the right-hand tree.
Referenced data can be filtered by expanding reference fields in the field tree.
Click on an item in the right-hand filter tree to edit the criteria. Pressing “Save” will save changes in the criteria editor, and pressing “X” will delete the criteria from the filter.
To test the filter and verify that it is finding the correct records, press the Preview button. This will query the CopyStorm database for a sample set of records that match the criteria and display them in the table.
To view all fields in the query results, select “All Fields” in the “Show” drop-down. To view the SQL query that was generated, press the “Show Query” button.
If the query results are correct, press “Save” to save changes to the filter and close the dialog. To close the dialog without saving changes, press the “Cancel” button.
Capstorm is commonly asked “How can I do a complete restore of my Salesforce?”, and the short answer is you cannot. This article explains why and the kinds of restores that occur in practice.
For a person coming from a traditional database world, how to do a complete restore is a simple question. Traditional databases allow an operator to easily disable database access and replace the image with a backup — this technique allows an operator to put a database into a known state at any desired point in time.
Salesforce, however, is unlike a traditional database in several important ways, making a traditional database restore impossible:
It is impossible to get an exact point in time backup of Salesforce using the Salesforce API.
Salesforce cannot be shutdown during the restore process. This often means that data entered by employees may be overwritten during while the restore is in progress.
This article describes the default behavior for restoring Knowledge articles and article versions when the One Version Per Push setting is turned off. The process works in batches, grouped by version number (e.g., CopyStorm/Restore restores all Version 1s, then all Version 2s, and so on).
Before restoring anything, CapStorm looks at all the article versions selected for recovery and sorts them into a very specific order. This “smart selection” prevents errors. The order of importance is:
Archived Articles First: It deals with the oldest, completed versions first to get them out of the way.
Online Articles Next: These are the active, published versions.
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.
The “Fields to Restore” editor determines which fields for each record will be restored to Salesforce.
By default all fields are selected.
If a field is not selected it will:
Be set to null for records inserted into Salesforce.
Custom: Directly set scanning parallelism parameters.
Fix issue where the Email Deliverability notification dialog is not resizable, preventing users with low-resolution screens from proceeding
Email Restore: Improvement
Prevent “Invalid Byte 2 of UTF-8 Sequence” Error From Halting the Restore. Restore will skip an email if it contains an invalid character, but this will not stop the entire restore process.
Tracker Database: Fix for Long Running Query Cancellation
Fix issue where long-running queries to the CopyStorm Database are not canceled properly when viewing the Tracker Database
Update Tracker Database to show progress when running queries against the CopyStorm Database
Configuration Values: Fix to Save all Configurations
Fix an issue where the following configuration values are not persisted to the configuration file:
Candidate Scan Batch Size
Enable Trace Mode
“Continue Restore” button: Fix
Fix an issue where “Continue Restore” clears pending candidates – causing the restore operation to finish instantly with no records restored
Snapshot Candidate Scanning: Improved Performance
yyyy-MM-ddTHH:mm:ss.sssZ (2021-02-28T18:32:24.373Z)
The beginning and end of the hour.
For example, if “2021-05-10T14” is provided, CopyStorm/Restore will find record versions with modification date / times between “2021-05-10T14:00:00.000Z” and “2021-05-10T14:59:59.999Z”.
If a day, hour, and minute are provided:
The beginning and end of the minute.
For example, if “2021-05-10T14:32” is provided, CopyStorm/Restore will find record versions with modification date / times between “2021-05-10T14:32:00.000Z” and “2021-05-10T14:32:59.999Z”.








Field matching on Name
Group
Field matching on DeveloperName and Type
RecordType
Field matching on Name and SObjectType
Pricebook2
First map the Standard Pricebook in CopyStorm to the Standard Pricebook in Salesforce, then use field matching on Name
Organization
If the CopyStorm database contains 1 Organization, map it to the current User’s Organization. If this does not map, the CopyStorm database contains conflicting information from multiple Salesforce instances.



RestoreJobPerformance.csv – Data from the Performance Logs tab.
RestoreJobSkipReasons.csv – Data from the Skipped Reasons tab.
RestoreJobTables.csv – Data from the Overview tab.





The Label to use when creating the Original Id field.
Permission Set Name
When creating an Original Id field on a Salesforce Object, CopyStorm/Restore will update this Permission Set to allow access to the new field. This permission set will be created and assigned to the CopyStorm/Restore Salesforce User if it does not already exist.
Field Description
The Description to use when creating the Original Id field.






If checked, CopyStorm/Restore will truncate the SOQL Log File at the start of each restore operation.
Truncate Error Log on Restore
If checked, CopyStorm/Restore will truncate the restoration error log at the start of each restore operation.
Enable Trace Mode
If checked, CopyStorm/Restore will log details about the restore process to stderr. This option is typically used when Capstorm is diagnosing a problem.

The restore process will change Salesforce.
A restore is analogous to hundreds of data entry clerks rapidly entering data into Salesforce.
Salesforce has no idea that the “clerks” are really a restore process, as API calls and “clerks” look the same to Salesforce.
Not all tables and metadata in Salesforce are writable from the API.
There is no such thing as an empty Salesforce database — even an “empty” sandbox has dozens (or more) tables populated with data.
There is another Salesforce “twist” that can further complicate restores. Restoring Salesforce metadata (e.g. ApexClasses, Components, PageLayouts, Triggers, SObjects, etc…) often requires dependency knowledge that is not necessary when restoring a traditional relational database. This knowledge is not always provided by the Salesforce API. Since API limits the size of a single metadata deployment, the knowledge of metadata dependencies is an absolute requirement. Total automation of a metadata restore would require a “compiler/semantic analysis” solution that understands the dependencies between all Salesforce metadata types. With the exception of internal Salesforce development, there is no absolute authority on how to perform this dependency analysis.
In practice there are three general classifications of restores used — Sandbox, Production, and Migration.
The main objective of a sandbox restore is to populate an empty development sandbox with a rich subset of data from a production backup. The sandbox generally has one of the following purposes:
To provide a rich set of data for a developer.
To provide a rich set of data for a trainer to use in a class.
In this case, multiple sandboxes are populated using the same restore process.
Since sandboxes rarely have enough space to hold all of the production data, a user needs to select the data important to their task. For example, a developer may want to restore all Opportunities won in the past 6 months with a value greater than $50,000 along with their associated Accounts, Contacts, Cases, and related custom objects. The process a developer would follow is:
Select the records and relationships to restore.
Press a button to restore the records and relationships.
Optionally add additional records and relationships.
Press a button to restore the additional records and relationships.
Repeat the two steps above until the sandbox contains all desired data.
A less frequent type of sandbox restore is to refresh the data in a sandbox from current production data.
CopyStorm/Restore supports all of these restore cases and sees many of them every day.
Production restores are more varied than sandbox restores but tend to fall into these categories:
Column Restore
Restore a handful of columns in a table due to data corruption.
Hierarchy Restore
Restore an Account (or another top-level record) and all associated tables after it was accidentally deleted and removed from the recycle bin.
Polymorphic Restore
Restore the Attachments / Notes for a given set of Contacts (or another object).
The common characteristic of production restores is that an operator has surgically precise knowledge about what needs to be restored.
Though it is technically possible for a massive restore to involve hundreds of tables and millions of records on a production Salesforce, this would mean that either the Salesforce infrastructure has failed or your Salesforce data governance has suffered a massive failure/breach. In practice this almost never happens. The worst production disasters Capstorm has seen have involved:
A Salesforce data center failure lost 6 hours of production updates.
A key logger corrupted specific fields in a customer’s Salesforce for a period of 2 months.
A programming error deleted a large set of attachments.
A mistake in a trigger corrupted a known set of fields.
From a data recovery standpoint, all of these were surgical level restores since there was a level of precision available to identify the corrupted or missing data.
Migration restores involve moving large hierarchies of records from one Salesforce instance to another where:
The target Salesforce instance already contains a lot of records.
The source instance records may or may not match records already in the target.
How to determine record matching varies by record type.
The table structure of the two instances is not the same.
Data transformation is likely required to move records.
The Salesforce system tables in the two instances do not match.
Plus dozens of other subtleties.
Doing a migration is generally much more complex than a sandbox or production restore. The core issue is a classic ETL problem:
Extract the data from the source Salesforce.
Transform the data into the structure required by the target Salesforce.
Load the data into the target Salesforce.
Capstorm products deal with the Extract problem (CopyStorm) and the Load problem (CopyStorm/Restore). The Transform problem is highly specific to each migration and is what typically makes a migration project difficult.
Another type of migration restore is used by several Capstorm customers — bringing data from many disparate systems into Salesforce. In these cases:
Data from many sources is populated into a CopyStorm created schema using customer written code.
CopyStorm/Restore is used to restore the data into a production Salesforce.
The highest volume example of this type of migration task that Capstorm knows about restores millions of records every day collected from over 50 disparate data sources.
If your requirement is to “click a few boxes and restore any Salesforce instance to the exact state of a backup” then we wish you good luck. However, if your operational requirements fall into the restore categories described above the Capstorm suite of products is your best choice. Of course, you could write the tools in-house and discover the less documented underbelly and restrictions of the Salesforce API on your own time. If you want to be convinced that there is an underbelly, check out this article we posted a few years ago: Salesforce’s Seven Deadly Sins.
recordId
The Salesforce Id of the record being processed.
value
The current value of the column. This may be null.
table
The name of the table containing the column to transform.
column
The name of the column to transform.
columnWidth
The maximum width of the column value.
public class AsteriskTransformer implements ITransformer {
@Override
public String transform(String table, String column, int columnWidth, String recordId, String value) {
if( StringUtils.isBlank(value)) { return value; }
return StringUtils.repeat("*", value.length());
}
}<Transformers>
<Transformer name="Asterisk" class="com.capstorm.copystormrestore.transform.AsteriskTransformer" />
</Transformers>Drafts Last: Finally, it handles any unfinished drafts.
Within each of these groups, it follows another important rule: Master language articles always go before their translations. Original articles must be restored before their Spanish or German versions can be added.
No matter what an article’s status was in the backup—even if it was Archived or Online—CapStorm will always create it as a Draft in the new Salesforce org. This is a rule from Salesforce that CapStorm follows carefully.
After this phase, there is a collection of new Draft articles, all sorted and created in the right order.
Right after a new Draft article is created, CapStorm immediately checks its original status from a backup.
If the article was originally Online or Archived, this phase changes its status from Draft to Online.
Every article has to pass through the Online state before it can be archived.
So, at the end of this phase, all the articles that need to be restored are now sitting in an Online state in Salesforce.
This phase is the final cleanup crew for the entire restore job. It only begins after every other record for every table has been restored.
The main reason CapStorm waits to archive articles is to protect translations and different versions of the same article.
Here’s how it works:
Wait Until the End: At the very end of the job, this process scans for any articles that are currently Online in Salesforce but should be Archived.
Perform a Safety Check: Before archiving an article, it does one final, important check. It looks back at a CopyStorm backup to see if there are any other versions of that same article that haven’t been restored yet.
Archive or Wait: If all versions have been restored, it safely changes the status from Online to Archived. If it finds that other versions are still waiting to be restored (perhaps in a future job), it will leave the article Online to avoid causing problems.
After this final phase, the Knowledge Base now correctly matches the state of the backup. Online articles are online, and Archived articles are archived, with all their translations and versions correctly linked.
This careful, three-phase process ensures that even something as complex as Salesforce Knowledge is restored safely and accurately every time.
When the setting, “One Version Per Push” is enabled, the restore lifecycle becomes simpler, and the “Final Archiving” phase described above is no longer needed.
With this setting on, the archiving process happens automatically and sequentially. When CapStorm creates a new version (e.g., Version 2) from the currently online version (Version 1), the Salesforce method it uses automatically archives the previous version (Version 1) as part of the action.
In this mode, archiving is handled one version at a time with each step, rather than all at once at the very end of the job.
Here are a few things to keep in mind when restoring Knowledge articles:
“Unpublish Article” in History: When CapStorm creates a new version of an article, it uses a specific Salesforce method that supports translations. A side effect is that there may be an “Unpublish Article” entry in the new version’s history. This is expected and is a result of the method required to maintain translation relationships.
Deleting Drafts Can Be Risky: Be very careful if Draft versions of an article are manually deleted in Salesforce. If there is no currently Online version of that article (i.e., all other versions are Archived), Salesforce will delete the entire article and all its versions. This is a Salesforce platform behavior.
Batching Articles with Different Owners: If a batch of articles are being restored that have different owners, it may result in a generic “unknown exception” from Salesforce. To resolve this, there are two options:
Go to the “Advanced Parameters” for the __kav table in the restore job and set the Batch Size to 1.
Ensure that all articles being restored in a batch share the same owner.
Links in Rich Text Fields: If articles contain rich text fields that link to other Knowledge articles, those links may be broken on the first version that is restored. This is because the process that fixes links runs before the records are inserted, so it cannot see other new articles that don’t exist yet. The links should be corrected as subsequent versions are restored.
Images in Rich Text Fields: If a rich text field contains an image that fails to process for any reason, Salesforce may delete the image and all text that comes after it in that field.
More on
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).
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.
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:
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.
Table Name
The name of the table being restored.
# Candidates
Be left unchanged for updated records.
Fields required for creating a new Salesforce record are marked as (required).
If any required fields are not checked then only update restore operations are permitted.
The editor contains filtering tools above a list of all available table fields. In the following screenshot the filter has been used to only show fields whose name contains the text “Billing”:
Other “Fields to Restore” options:
Selected
If checked, only selected fields will be displayed.
Invert
When pressed, the field selection will be inverted. All selected fields will be deselected, and all non-selected fields will be selected.
Clear
The “Field Obfuscation & Masking” button launches a dialog used to control how individual fields are restored.
The “Transformer” column indicates that a data transformation should be applied BEFORE data is written to Salesforce. In the example screenshot two columns have been assigned to transformers. Available transformers include:
Asterisk
Converts a column to all **** before writing the field to Salesforce.
For example, “Rebecca” will become “*******”.
Email Scrambler
Randomizes email address fields before writing them to Salesforce.
For example, the email “luck@casino.com” may become “AuFK@uuiLT.com”.
Email Append Invalid
Appends “.invalid” to email address fields before writing them to Salesforce.
For example, the email “luck@casino.com” will become “luck@casino.com.invalid”
Lorem Ipsum
Change a block of text to the infamous “Lorem ipsum dolor sit amet, consectetur adipiscing…”
Random: Account Name / City Name / Country Name / Street Name / First Name / Last Name / Job Title
Converts a column to a value selected randomly from a dictionary.
The value will be selected from a built-in dictionary containing values for the indicated type (e.g. “Random: Account Name” will use a dictionary of Account Names).
Uniform: Account Name / City Name / Country Name / Street Name / First Name / Last Name / Job Title
Converts a column to a value selected non-randomly from a dictionary. The same input value will always provide the same output value.
The value will be selected from a built-in dictionary containing values for the indicated type (e.g. “Uniform: Account Name” will use a dictionary of Account Names).
Scramble
Converts each letter or digit to a random character of the same class before writing the field to Salesforce.
Supports all numerical fields including phone, integer, or double.
For example,
Same Year Date/Time
Converts a date or date/time field to a random date or date/time within the same year.
If the built-in Transformers do not perform the action you need, CopyStorm/Restore supports adding new Transformers. Contact support@capstorm.com if you want to learn how this is done.
Other columns on this dialog provide read-only information about each column in the corresponding table.
The Advanced Tab supports control of what Salesforce triggers, validation rules, flows, workflows, and restricted picklists are temporarily disabled during a restore. Note than any item disabled by CopyStorm/Restore will automatically be re-enabled when a restore completes or is cancelled.
Why are these features necessary? Let’s look at a few examples:
There is a Salesforce trigger that initiates notifications for Opportunities larger than $50,000. During a restore running this trigger would be a bad idea.
Validation rules have changed over time and much historical data will not pass the current rules. Disable the rules during a restore.
Control of the following item types is supported:
Configure the scope of automation management to include Rules and Workflows from Managed Packages.
Configure the timing of automation re-enablement.
Disabling triggers during a restore is a common necessity. For example, if an Opportunity trigger sends an email on large opportunity creation you will want to avoid this when restoring to a sandbox. Another common problem is triggers which are not designed to handle large blocks of records and when they receive a large block they exceed the Apex statement limit per transaction.
When a trigger is added using the Edit Trigger Selection button, CopyStorm/Restore will disable the trigger at the beginning of the restore process and re-enable it after the restore completes or is cancelled. Note that on a sandbox the disablement/enablement of triggers is relatively fast, but on a production environment changing the enablement status of a trigger will cause unit tests to run.
Disabling validation rules during a restore is a common process because older data will often not pass the current validation rules.
In most cases, letting CopyStorm/Restore manage validation rule disablement/enablement is sufficient. When this option is enabled:
CopyStorm/Restore disables active validation rules for a table just before data is written to the table.
Once updates/inserts to a table are complete, CopyStorm/Restore re-enables the validation rules it disabled in the previous step.
If updates to one table cause updates in another table (for example: an OpportunityLineItem change can cause an update to the Opportunity table) then it may be necessary to explicitly choose validation rules to disable. If a rule is explicitly selected then the rule will be disabled at the beginning of the restore process and re-enabled when the restore process completes or is cancelled.
If automatic management is enabled and a validation rule appears in the explicit list then the automatic management system will ignore the rule.
Disabling ProcessBuilder/Flows during a restore is a common necessity to avoid processing. For example, if an Opportunity flow sends an email on large opportunity creation you will want to avoid this when restoring to a sandbox.
When a Flow is added using the Edit Flow Selection button, CopyStorm/Restore will disable the Flow at the beginning of the restore process and re-enable it after the restore completes or is cancelled.
When a Flow is selected, the current version of the Flow is displayed. When CopyStorm/Restore disables the flow as part of the restore process, it will query Salesforce for the current active version – and disable the active version (and re-enable the disabled version when the restore is finished).
Disabling workflow rules during a restore is a common process to avoid a process that normally happens when a user enters/modifies a record via the GUI.
In most cases, letting CopyStorm/Restore manage workflow rule disablement/enablement is sufficient. When this option is enabled:
CopyStorm/Restore disables active workflow rules for a table just before data is written to the table.
Once updates/inserts to a table are complete, CopyStorm/Restore re-enables the workflow rules it disabled in the previous step.
If automatic management is enabled and a workflow rule appears in the explicit list then the automatic management system will ignore the rule.
Disabling restricted picklists during a restore is a common process to avoid encountering errors with older records whose values do not meet the criteria of the current picklist definition.
In most cases, letting CopyStorm/Restore manage restricted picklist disablement/enablement is sufficient. When this option is enabled:
CopyStorm/Restore disables active restricted picklists for a table just before data is written to the table.
Once updates/inserts to a table are complete, CopyStorm/Restore re-enables the restricted picklists it disabled in the previous step.
If automatic management is enabled and a restricted picklist appears in the explicit list then the automatic management system will ignore the rule.
Note that this element will not disabled a Global Picklist (a picklist defined outside of the confines of a specific table).
Disabling Duplicate Detection rules during a restore is a common practice needed to restore older data whose values do not meet current duplicate rule criteria.
In most cases, letting CopyStorm/Restore managed duplicate detection rule disablement/enablement is sufficient. When this option is enabled:
CopyStorm/Restore disables active Duplicate Detection rules for a table just before data is written to the table.
Once updates/inserts to a table are complete, CopyStorm re-enables disabled Duplicate Detection rules.
Disabling Required Field rules during a restore is a common practice needed to restore older data that may not have a value for a new field or a field that was not historically required.
In most cases, letting CopyStorm/Restore managed required field disablement/enablement is sufficient. When this option is enabled:
CopyStorm/Restore disables the “Required” option for a field just before data is written to the field’s table.
Once updates/inserts to a table are complete, CopyStorm re-enables disabled “Required” options.
Disabling Lookup Filters during a restore is a common practice needed to restore older data that may not have reference fields that match current Lookup Filter validations.
In most cases, letting CopyStorm/Restore managed lookup filter disablement/enablement is sufficient. When this option is enabled:
CopyStorm/Restore disables the Lookup Filter rules for a field just before data is written to the field’s table.
Once updates/inserts to a table are complete, CopyStorm re-enables disabled Lookup Filter options.
The CopyStorm/Restore Tracker database contains information about records that can or will be restored. The following screenshot was taken after a restore operation was partially completed:
Object
Filters displayed records by object name. Only objects which are part of the restore set are listed.
The middle part of the dialog shows the status of each record and the corresponding data from the CopyStorm backup.
The first three columns contain tracking data for each record, the remaining columns contain record data from the CopyStorm backup. The “Name” column always appears first, other columns appear in alphabetical order.
The Tracker Database can be queried directly using tools like , or any other H2 database browser.
Database schema documentation can be found here.
The Notifications Tab contains parameters used to control who receives a status email when a non-GUI CopyStorm/Restore job runs and under what circumstances email is sent. CopyStorm/Restore supports email notifications via SMTP or via a Salesforce SOAP API call.
Send Email To
Yes
The “Test Email Delivery” button causes an email to be sent to the recipient list. If communication to the SMTP email server or target Salesforce org is successful an acknowledgement dialog will be displayed and an email will be delivered to the recipients.
If communication to the SMTP email server or target Salesforce org fails, a dialog will be displayed showing the error. In this case you should show the error to your local administrator.
Lineage Recovery is used to restore historical, record-specific data.
An Example:
Account ACME has 5 lineage entries.
There is a process that deletes/inserts the ACME Account in Salesforce.
The phone number for ACME has changed across these versions.
The phone number for ACME needs to be reverted to its value as of April 1st 2025.
To restore this phone number to its value as of April 1st, 2025, a Point-In-Time Lineage Recovery can be used.
In order for CopyStorm/Restore to consider Record Lineage during restoration, lineage data must be available. To track a records physical evolution, Record Lineage Creation must be enabled.
To configure CopyStorm/Restore for Lineage Restoreation, start by enabling the Lineage candidate scanning parameter in “Global Parameters” -> “Record Lineage Parameters”
Lineage records can exist within the Primary CopyStorm Database or within a Snapshot.
For example, CopyStorm is configured to disregard deleted records from the Primary Database & store in the “Default Recycle Bin” Data Set.
Options:
Most Recent: Recover the latest version of selected records.
A Point In Time: Recover the version of selected records closest to the selected date / time.
A Single Date: Recover records that were modified on a given date.
Between Two Times: Recover records modified between to dates / times
Configure Record Selection Parameters in the Restore Set Editor tab.
Following the example, we will search for the ACME Account:
During Lineage Restoration, Record Previews will display which Lineage Version is found as a potential recovery candidate.
In the example above, the Lineage Version is:
Legacy (34)
Legacy indicates that this particular record is NOT HEAD.
The number in parenthesis (34) indicates how many versions it is away from the HEAD version. In this case, the resulting record is 34 versions earlier than the HEAD revision.
After configuring Record Selection Parameters, navigate to the Restore tab and scan for candidates.
After Candidate Scan is completed, candidates can be viewed on the Tracker Database tab.
During the Restoration, CopyStorm/Restore will:
Recognize that 001WH00000H2VAnYAN is Legacy lineage
Look for the HEAD revision of the “ACME” Account
Find the ID of the HEAD Revision & Confirm its existence in Salesforce
Match 001WH00000H2VAnYAN to the HEAD ID
There are countless use cases for Lineage Recovery. If you’re unsure how to apply it to your specific scenario, please contact support@capstorm.com for guidance.
CopyStorm/Restore is generally used in GUI mode, but it is possible to run Copystorm/Restore as a command line application. This is useful for repetitive tasks such as:
Refreshing 15 training Salesforce sandboxes in preparation for the next training class.
Prerequisites:
A CopyStorm/Restore configuration file. This is the file saved by the GUI when selecting File -> Save As.
The simplest form of a CopyStorm/Restore command line is:
CapStorm provides several powerful settings for Knowledge restores, found under the Additional Knowledge__kav Parameters section of the __kav table. Understanding these options gives maximum safety and control over the restore process.
This setting helps ensure a safe and successful restore of complex Knowledge articles. When enabled, CapStorm will only restore a single version of any specific Knowledge article each time you run a restore job. This setting is important for Archived or Online Knowledge Article Versions that have related files (or other related objects).
If there is an article with three versions, the restore job would need to be run three times to restore its full history. This will cause the first version to be pushed by the first job (along with related records), then the second version by the second job (with related records), etc… The process will also handle translations separately, restoring the master version in one run and its translations in another.
The main reason to use this setting is to keep the newest article version in an editable Draft state for as long as possible. Once an article is published as Online, it becomes read-only, which can cause two common problems:

















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




“Rebecca” may become “Kiojjkl”
“567-45-0987” may become “778-33-0997”
“+44 45 345 8876” may become “+62 33 123 9567”
When pressed, all selected fields will be deselected.


Clear
Causes the current filter to be removed.
Show Fields
Only displays certain fields based on the specified option. Options include:
All — show all fields.
None — show Original Id, Restored Id, and Restore Status.
Choose Fields — select specific fields to show.
Tool
Use Tools to modify records in the Tracker Database. Tool options include:
Filter Type
The type of filter to use. Options include:
Simple
Advanced
Filter visible records using a Record Filter.
Record Type
Filters displayed records by restore status. Options include:
All — show all records.
Inserted — show records that were inserted into Salesforce.
Updated — show records that were updated in Salesforce.
Skipped — show records that were skipped by CopyStorm. Clicking on the status value will display a popup with the skipped reason.
Pending — show records waiting to be inserted or updated in Salesforce.
Field
Lists all columns which support filtering by text.
Contains
Lists options for interpreting the text following this pulldown. Options include:
Contains — show any record containing the filter string.
Equals — show any record matching the filter string exactly (case insensitive).
StartsWith — show any records starting with the string.
Apply
Original Id
The unique Salesforce Id for the record in the CopyStorm backup.
Restored Id
The Salesforce Id the record was restored to in Salesforce. If the record was restored via an update, the value will be the same as the Original Id. Otherwise the value will be different.
Status

Causes the current filter to be applied to the data.
The restoration status of this record. Values include:
Inserted — this record has been added to Salesforce as a new record.
Updated — this record has been added to Salesforce by updating an existing record.
Skipped — this record was not restored to Salesforce. Click on the status to view the underlying reason.
Send Email To
Yes
Notification emails will be sent to this white space separated list of email addresses.
Subject
Yes
The subject line used for notification emails. Though it can be any text you want, there are a few special text values that will be replaced dynamically before a message is sent:
“{status}” will be replaced by “OK” or “ERROR” based on the outcome of the job.
If there are any exceptions encountered then “ERROR” will be substituted, otherwise “OK” will be used.
“{application}” will be replaced by “CopyStorm/Restore”.
Send Notification On
No
Determines when CopyStorm/Restore will send a notification email:
Success: If checked, an email will be sent if a job works perfectly (no exceptions).
Exception(s): If checked, an email will be sent if a job has any exception (including non-fatal exceptions where CopyStorm/Restore recovered).
Require Encryption
No
If checked, CopyStorm/Restore will require that connections to the email server be encrypted with TLS.
Email User
No
Username used to authenticate with the SMTP server.
Email Password
No
Password used to authenticate with the SMTP server.
Notification emails will be sent to this white space separated list of email addresses.
Subject
Yes
The subject line used for notification emails. Though it can be any text you want, there are a few special text values that will be replaced dynamically before a message is sent:
“{status}” will be replaced by “OK” or “ERROR” based on the outcome of the job.
If there are any exceptions encountered then “ERROR” will be substituted, otherwise “OK” will be used.
“{application}” will be replaced by “CopyStorm/Restore”.
“{file}” will be replaced by the base name of the CopyStorm/Restore configuration file used by the job.
For example, the configuration file “C:\capstorm\config\myCopyStormRestoreConfig.copyStormRestore” will be replaced with “myCopyStormRestoreConfig.copyStormRestore”.
Send Notification On
No
Determines when CopyStorm/Restore will send a notification email:
Success: If checked, an email will be sent if a job works perfectly (no exceptions).
Exception(s): If checked, an email will be sent if a job has any exception (including non-fatal exceptions where CopyStorm/Restore recovered).
Notify Current User
No
If checked, the Salesforce User specified on the Main tab of CopyStorm/Restore will be notified in addition to the specified recipients (Send Email To).
Email Host
Yes
The SMTP host used by your organization (used to send email). If you do not know this information ask your email administrator.
Email From
Yes


The email address that will appear in the “From” field in sent notifications. Note that many email servers allow this value to be a fake email address (e.g. “noreply@capstorm.com”).
Windows:
CopyStormRestore.bat -run myConfig.copyStormRestore
Linux / Mac:
sh CopyStormRestore.sh -run myConfig.copyStormRestore
When running in command line mode CopyStorm/Restore will write progress and any errors encountered to stdout, in addition to the Tracker Database.
Often when CopyStorm/Restore is run in batch mode any history about past restores stored in the Tracker Database should be forgotten. The script that launches CopyStorm could delete the existing Tracker Database — and if so, Copystorm/Restore will automatically recreate it. However, a simpler solution is to use the -restart command-line switch. When the -restart switch is present, Copystorm/Restore will reset the Tracker Database before the restore begins. For example,
Windows
CopyStormRestore.bat -restart -run myConfig.copyStormRestore
Linux / Mac:
sh CopyStormRestore.sh -restart -run myConfig.copyStormRestore
-restart
Reset the CopyStorm/Restore tracker database before starting the restore.
This will delete all historical data in CopyStorm/Restore. Ids restored in previous jobs will no longer be available.
-scan
Populating Lookups: If the article has lookup fields to other records, this setting allows those other records to be restored first and correctly linked to the draft. If the article were published immediately, there is no option to go back and update the lookup fields if they were initially blank.
By keeping the article in a Draft state, this setting ensures all related data can be restored and linked correctly, preserving data integrity.
This setting is a checkbox located in the Restore Set Editor under the Migration Setup tab when __kav table is selected.
These two settings work together to fix articles that may have been left in a Draft state from a previous, incomplete restore job.
This setting is a cleanup tool. Before the main restore begins, it searches the Salesforce org for any Knowledge articles that are still Drafts but should be Online or Archived (according to the backup) and attempts to publish them.
Use with Caution: Before using this option, it’s a good practice to investigate why the previous job failed. If the failure happened before the article’s content was updated, using this option might publish an incomplete draft or a draft that is a duplicate of the previous version.
This setting gives stricter control over the cleanup process and is only available when “Publish Drafts Before Restore” is checked.
What it does: If this box is checked and CapStorm encounters any error while trying to publish the old drafts, the entire restore job will stop immediately.
Why it’s important: If the cleanup process fails and the job continues, the new restore might overwrite the failed draft with the next version’s content. This could cause a version to be skipped, leading to an incomplete and incorrect article history. This setting prevents that from happening.
The CopyStorm/Restore Record Lineage feature is specifically designed to maintain data record lineage. It keeps recovery information between different incarnations of the same data within the CopyStorm database, ensuring that the relationship between data at different points in its lifecycle is preserved.
CopyStorm/Restore Record Lineage assists with:
Ensuring data accuracy. Providing the history of data over its lifetime, you can verify its accuracy and identify potential discrepancies.
Improving auditability and compliance. Maintaining a record of different versions of data allows you to trace changes made to the data through its full lifecycle.
Streamlining recovery. Keeping track of all versions of data, even when data recoveries may have changed its unique ID many times, means that you can ensure that data recoveries will not introduce duplicate data.
Record Lineage refers to the existence of a logical record across one or more physical forms. For example, an ACME Account can exist in both Salesforce Production 1 and Salesforce Production 2. These are logically the same Account, but are represented by two distinct physical records in separate environments.
Lineage is the mechanism by which CopyStorm/Restore tracks and links these physical records back to their single logical identity, enabling comparison & synchronization across systems.
Lineage plays a role in several key stages of the CopyStorm/Restore application:
Record Insertion
Record Matching
Candidate Scanning
Lineage is created when Lineage Creation is enabled and a record is INSERTED to Salesforce.
Example:
Lineage Creation is enabled.
ACME Account is inserted into Salesforce
CopyStorm/Restore records a new lineage entry for ACME by creating a new row in the CopyForceRecordLineage database table.
The newly inserted ACME Account will have a new Salesforce ID, and is now considered the authoritative (HEAD) revision of the ACME lineage.
There is no limit to the number of records that can exist within a single lineage.
By default, CopyStorm/Restore uses an . However, when considering lineage during restoration, this approach can fall short—because a single logical record may exist in multiple environments with different Salesforce IDs.
To address this, CopyStorm/Restore examines the lineage of the target record to identify the best match in Salesforce.
The general rule of thumb for Lineage-based matching is:
The closest valid lineage match in Salesforce will be used as the record match.
Note: When using Multi-Column or External ID matching policies, those methods will take priority. Lineage-based matching will only be used as a fallback if no matches are found through the primary matching policy.
The user wants to UPDATE the “Phone” field for HEAD ACME in Salesforce with the “Phone” value from an older ACME record.
CopyStorm/Restore identifies a legacy (non-HEAD) lineage ACME Account for restoration.
The legacy record has a different Salesforce ID than the current HEAD revision.
CopyStorm/Restore will:
Retrieve all Lineage information for the legacy ACME record.
Search Salesforce for existing lineage entries, starting from the HEAD.
Identify the most recent matching record in Salesforce.
In this case, the HEAD exists in Salesforce, so HEAD will be identified as the match.
There are three major components to the candidate scanning process:
Top Level Candidate Scan
Find all records matching the
Reference Candidate Scan
Find all parent records that are referenced by the results of the top level candidate scan.
CopyStorm/Restore provides configuration options to enable/disable Lineage consideration during all phases of the candidate scanning process:
Enable Record Lineage Candidate Scanning
Enables Lineage consideration when scanning top-level candidates.
Related Lists Scan Options
Controls how Lineage is considered when scanning child records.
When restoring records with lineage enabled, users must specify Point-In-Time configuration parameters to define which version of the record should be restored.
This configuration is determined by the Point-In-Time Strategy selected in the “Recover” drop-down menu.
Most Recent: Recover the HEAD of lineage.
A Point In Time: Recover the version of selected records closest to the selected date / time.
A Single Date: Recover records that were modified on a given date.
Between Two Times: Recover records modified between to dates / times.
CopyStorm/Restore will apply record selector filters & consider Point-In-Time Configuration to determine which lineage entries are top-level candidates
When restoring records, users can control how parent or reference records are evaluated as candidates using the following Reference Candidate Scan options:
Parent Records will not be added as candidates unless they are HEAD or the referenced record has no lineage.
This option ensures that restored reference relationships remain consistent with HEAD lineage entries in Salesforce.
Parent records are only added as candidates if they belong to a lineage and the HEAD of that lineage exists in Salesforce.
In these cases, the reference ID in the top-level record will be replaced with the HEAD ID from the lineage.
If a reference record has no lineage, the original reference ID is left unchanged.
Parent records will be added as candidates regardless of whether they are the HEAD of their lineage or whether they establish a consistent relationship. All lineage versions are treated as valid candidates.
When restoring records, users can control how child records (typically related lists) are evaluated as candidates using the following Related Lists Candidate Scan options:
Only HEAD lineage records are considered valid child candidates.
Child records will not be added as candidates unless they are the HEAD of their lineage.
Ensures that restored child relationships remain consistent with HEAD lineage entries in Salesforce. Child records are only added as candidates if they belong to a lineage and the HEAD of that lineage exists in Salesforce.
In these cases, the relationship will point to the HEAD record.
If a child record has no lineage, it will be used as-is.
Child records will be added as candidates regardless of whether they are the HEAD of their lineage or whether they establish a consistent relationship.
All lineage versions are treated as valid candidates.
Record Lineage data is stored in the CopyStorm Database in a table called CopyForceRecordLineage.
Parameters that determine the underlying database CopyStorm/Restore will use as its Tracker Database. This database allows CopyStorm/Restore to continue a restore if interrupted, and allows .
Configure Rich Text Fields for pre-processing before Sending to Salesforce. Options:
Patch RT Images
Replaces all Servlet/RTA Image references with their Base64 encoded image data.
Note: Upon record insert/update, Salesforce will re-convert the Base64 body to an RTA Image.
“{file}” will be replaced by the base name of the CopyStorm/Restore configuration file used by the job.
For example, the configuration file “C:\capstorm\config\myCopyStormRestoreConfig.copyStormRestore” will be replaced with “myCopyStormRestoreConfig.copyStormRestore”.
Run a candidate scan before starting the restore.
This will search the CopyStorm database for any new records matching the Restore Set prior to starting the restore.
-resetSkippedReasons
Clear record skipped reasons before starting the restore.
This will delete all historical record skip reasons from the CopyStorm/Restore tracker database prior to starting the restore.
-deleteExceptions
Clear historical exceptions before starting the restore.
This will delete all historical job exceptions from the CopyStorm/Restore tracker database prior to starting the restore.
-scanonly
Run a candidate scan and do not start the restore.
This will search the CopyStorm database for any new records matching the Restore Set and add them to the CopyStorm/Restore tracker database, but will not restore to Salesforce.
-run
Specifies the configuration file used to drive the restore.
-restoreType
Specifies the type restore to perform. Recognized values include:
data (default)
metadata
tracker
data: Restore records to Salesforce, optionally scanning for new records to restore or removing Restore history prior to restoring.
metadata: Restore metadata to Salesforce.
tracker: Do not restore records to Salesforce. Only perform operations which impact the CopyStorm/Restore tracker database without uploading data to Salesforce.
-sftype
The type of Salesforce instance. Recognized values include:
Production
Sandbox
DatabaseDotCom
-sfuser
Salesforce username.
Note that this option can be used to override the Salesforce user name for both the classic and SFDX Username credentials type.
-sfpassword
Salesforce password.
-sftoken
Salesforce security token, if required by your organization.
-sfhost
Salesforce host
If you use a custom domain like capstorm.my.salesforce.com specific it here. For scratch orgs a Salesforce host must always be specified.
-dbuser
CopyStorm database username.
-dbpassword
CopyStorm database password.
-dbconnection
CopyStorm database connection string.
-dbschema
Schema Name
Override (or set) the database schema value in the configuration file.
-proxyHost
Host Name
Override the proxy server in the configuration file. Example: proxy.capstorm.com
-proxyPort
Port Number
Override the port number used by the proxy server.
-proxyUser
Username
Override the username used to authenticate with the proxy server.
-proxyPassword
Password
-apiTraceFile
File Name
Log all communication with Salesforce to a file.


Use that record (HEAD) as the target for the update.
Related Lists Candidate Scan
Find all child records that reference records in the results of the top level candidate scan.
Reference Field Scan Options
Controls how Lineage is considered when scanning parent records.
SalesforceOrgID
VARCHAR2 NOT NULL
Uniquely identifies the Salesforce organization (Org) in which this lineage occurred. Useful in cross-org contexts.
ChildAuthorityStart
TIMESTAMP(3) NOT NULL
Timestamp when the child record became the authoritative or active version (e.g., copied and began to be used).
IsValid
NUMBER(1) NOT NULL
Boolean-style flag (0 or 1) that indicates if the lineage relationship is currently valid. Helps track deprecated or overridden relationships.
CreatedDate
TIMESTAMP(3) NOT NULL
Timestamp when this lineage record was first created in the system.
ModifiedDate
TIMESTAMP(3) NOT NULL
Timestamp when this lineage record was last updated, which may reflect status changes like updates to validity.
ParentID
CHAR(18) NOT NULL
Represents the ID of the source or parent Salesforce record (likely the original record). Salesforce record IDs are 18-character case-safe strings.
ChildID
CHAR(18) NOT NULL
Represents the ID of the child or copied Salesforce record that was derived from the parent. Also an 18-character Salesforce ID.
Snowflake
SQL Server
Oracle
Tracker Database Name
By default CopyStorm/Restore will pick a tracker name unique to the current configuration file, but it can be explicitly set using this global parameter. Note: CopyStorm/Restore tracking databases are, by default, kept in the directory “$HOME/.capstorm/copyStormRestoreSets”.
Use H2 in Server Mode
When checked, allows the H2 Tracker Database to operate in server mode, enabling support for multiple simultaneous connections.
Parameter
Description
Connection String
A PostgreSQL connection string for connecting to the tracker database.
Connection String Builder
Clicking on this button launches a dialog menu that helps create a valid connection string.
Username
Parameter
Description
Connection String
A MySQL connection string for connecting to the tracker database.
Connection String Builder
Clicking on this button launches a dialog that helps create a valid connection string.
Username
Parameter
Description
Connection String
A Snowflake connection string for connecting to the tracker database.
Connection String Builder
Clicking on this button launches a dialog that helps create a valid connection string. More information on the Snowflake Connection String Builder can be found on the .
Username
Parameter
Description
Connection String
A SQL Server connection string for connecting to the tracker database.
Connection String Builder
Clicking on this button launches a dialog menu that helps create a valid connection string.
Username
Parameter
Description
Connection String
An Oracle connection string for connecting to the tracker database.
Connection String Builder
Clicking on this button launches a dialog menu that helps create a valid connection string.
Username
H2 (Default)
PostgreSQL
MySQL
Patch RT URIs
Finds and updates Salesforce record IDs embedded in RTA fields. When a record is restored or reinserted with a new ID, this option rewrites hardcoded references to reflect the correct restored record IDs
Supported Formats:
/001XXXXXXXXXXXXXXX
%2Fr%2FObject__c%2F001XXXXXXXXXXXXXXX%2Fview
NOTE: Only IDs that can be mapped using the Restore’s ID Map or Tracker Database will be replaced. Others remain unchanged. For more information on these functions, see Restore’s ID Map Documentation, and Tracker Database Documentation.
Salesforce records can hold many different formats of images in URLs. Making use of this configuration file allows for the addition of different Regex strings to allow support for new image URL formats in the field.
Setup
Navigate to “CopyStormRestore/Config” directory
Create an xml file and save it as “SFDCRecordIdTextReplaceUtilConfig.xml” inside of the “CopyStormRestore/config” directory.
The xml file consists of two tags:
The config file opening/closing tag.
Regex Entry tags. Each Regex entry tag has two components, a unique name or “type” that is a unique identifier for the entry, as well as a Regex string used to match against URL patterns. The capture group of these Regex strings needs to be the Salesforce ID of the image resource for pre-processing to be successful.
See below for the default configuration file:

<SFDCRecordImageUtilConfig>
<!--
The different types of SFDC image URL formats and their associated REGEXs to
strip out the target image information.
SFDC records can hold many different formats of images in URLs. This configuration
file allows for the addition of different REGEX strings to allow support for new
image URL formats in the field.
NOTE: The "<" and ">" characters are reserved in XML and cannot be a part of the "regex"
parameter. Replace those characters or other XML reserved characters with the following:
- "<" -> "<"
- ">" -> ">"
- (") -> """
-->
<!--
-> REGEX String:
-> (?:/r/[a-zA-Z0-9_]+/)([a-zA-Z0-9]{18}|[a-zA-Z0-9]{15})(?=/|$)
-> REGEX String Details:
-> Pattern: (?:/r/[a-zA-Z0-9_]+/)([a-zA-Z0-9]{18})(?=/|$)
-> (?: ... ): Non-capturing group, meaning it groups the enclosed pattern but does not store the matched value.
-> /r/: Matches the literal string /r/.
-> [a-zA-Z0-9_]+: Matches one or more (+) alphanumeric characterse and the underscore. This is used to match
to the Salesforce object name in the URL.
-> /: Matches the literal forward slash (/) after the Salesforce object name in the URL.
-> ([a-zA-Z0-9]{18}|[a-zA-Z0-9]{15}): Capture group, meaning this is the matched content that is stored. Matches exactly 15 or 18 alphanumeric
characters for the Salesforce record ID.
-> (?=/|$): Ensures that the match is only valid if the capture group is following by a '/', or it is the end of the string
Parses URLs in the formats:
-> https://exampleorg.lightning.force.com/lightning/r/Knowledge__kav/001Ec00000L3Pz4IAF/view
-> https://exampleorg.lightning.force.com/lightning/r/ContentDocument/0696Q00000CTZ9mQAH/view
-->
<SFDCImageFormat type="urlIdNoReference" regex="(?:/r/[a-zA-Z0-9_]+/)([a-zA-Z0-9]{18}|[a-zA-Z0-9]{15})(?=/|$)"></SFDCImageFormat>
<!--
-> REGEX String:
-> (?:%2Fr%2F[a-zA-Z0-9_]+%2F)([a-zA-Z0-9]{18}|[a-zA-Z0-9]{15})(?=%2F|$)
-> Pattern: (?:%2Fr%2F[a-zA-Z0-9_]+%2F)([a-zA-Z0-9]{18})(?=/|$)
-> (?: ... ): Non-capturing group, meaning it groups the enclosed pattern but does not store the matched value.
-> %2Fr%2F: Matches the URL encoding for the literal String (/r/)
-> [a-zA-Z0-9_]+: Matches one or more (+) alphanumeric characterse and the underscore. This is used to match
to the Salesforce object name in the URL.
-> %2F: Matches the URL encoding for the literal string forward slash (/).
-> ([a-zA-Z0-9]{18}|[a-zA-Z0-9]{15}): Capture group, meaning this is the matched content that is stored. Matches exactly 15 or 18 alphanumeric
characters for the Salesforce record ID.
-> (?=%2F|$): Ensures that the match is only valid if the capture group is following by a '/', or it is the end of the string
-> Parses URLs in the formats (Gets the second ID in the URL):
-> https://exampleorg.lightning.force.com/lightning/r/Knowledge__kav/001Ec00000L3Q00IAF/view?ws=%2Flightning%2Fr%2FKnowledge__kav%2F001Ec00000L3Q01IAF%2Fview
-->
<SFDCImageFormat type="urlIdSingleReference" regex="(?:%2Fr%2F[a-zA-Z0-9_]+%2F)([a-zA-Z0-9]{18}|[a-zA-Z0-9]{15})(?=%2F|$)"></SFDCImageFormat>
<!--
-> REGEX String:
-> (?:sfdc://)([a-zA-Z0-9]{18}|[a-zA-Z0-9]{15})
-> REGEX String Details:
-> (?:sfdc://)
-> Non-capturing group to find "sfdc://" right before the capture group
-> ([a-zA-Z0-9]{18}|[a-zA-Z0-9]{15})
-> Capture group matching alphanumerics 18 characters in length and if not, 15 characters in length.
-> Parses rich text in the format:
-> <p>this is test html<img src="sfdc://001ZZrecord7890123" alt="first tag"/>with two image tags<img src="sfdc://001ZZrecord7890123" alt="second tag"></img></p>
-->
<SFDCImageFormat type="sfdcTag" regex="(?:sfdc://)([a-zA-Z0-9]{18}|[a-zA-Z0-9]{15})"></SFDCImageFormat>
<!--
-> REGEX String: https://[^/"]*/([a-zA-Z0-9]{15,18})(?=(?:/)?")
-> REGEX String Details:
-> https://
-> Matches the HTTPS protocol
-> [^/"]*
-> Non-capture group to match everything after the domain name but stop at the next slash or quote, effectively skipping the host portion
-> /([a-zA-Z0-9]{18}|[a-zA-Z0-9]{15})
-> Captures the Salesforce ID after a slash (/) in the 18 or 15 character format
-> (?=(?:/)?")
-> Positive look ahead to make sure that after the pattern for the ID is either a quote (") or a slash and quote (/") for termination of the match
-> Parses rich text in the format:
-> <p><a href="https://example-data-12345-dev-ed.scratch.my.salesforce.com/kA0Ov000000S6IbKAK" target="_blank">Parent Article</a></p>
-->
<SFDCImageFormat type="urlIdNoObjectName" regex="https://[^/"]*/([a-zA-Z0-9]{18}|[a-zA-Z0-9]{15})(?=(?:/)?")"/>
</SFDCRecordImageUtilConfig>Database username.
Password
Database password.
Schema (optional)
The Database Schema where CopyStorm will house the Tracker data. If left blank, defaults to “PUBLIC”
Database username.
Password
Database password.
Database username.
Password
Database password.
Schema (optional)
The Database Schema where CopyStorm will house the Tracker data. If left blank, defaults to “PUBLIC”.
Database username.
Password
Database password.
Database username.
Password
Database password.
Schema (optional)
The Database Schema where CopyStorm will house the Tracker data. If left blank, defaults to “PUBLIC”.



The “Select Records” tab on the “Restore Set Editor” determines which records will be restored to Salesforce. The “Select Records” tab is divided into two major sections:
The top section is common to all techniques available for finding records to restore.
The bottom section contains parameters unique to a specific record finding approach.
The following image illustrates the primary elements in this tab.
The “Which Records” option provides a large number of techniques for determining what records to restore. The techniques include:
The “Restore Type” options determines what kinds of operations are allowed when writing to Salesforce.
Updates only
Inserts only
Both Inserts and Updates
By default both inserts and updates are allowed unless a required field is excluded. When a required field is excluded then Inserts are automatically disallowed.
The “Record Match Policy” options determines how CopyStorm/Restore decides whether to update an existing record or and insert a new record when writing to Salesforce. The follow policies are supported:
(Note: for all polices a CopyStorm->Salesforce Id match check will be attempted if the base policy fails to find a match).
The following two images illustrate the “External Id” and “Multi-Column” record matching policies
Other parameters in the top section are less common to be set by a user. They include:
The “All” option will restore all records in the CopyStorm backup to the Salesforce instance:
The “Filter” option will restore records that match a drag-and-drop set of criteria in the CopyStorm backup to the Salesforce database. To use a record filter to select records in CopyStorm, please see the page here: .
The “Id File” option will read “ids” from a file and restore all records which match the supplied ids.
The field to treat as the “id” is selected from the pull down menu. Of course, a 15 or 18 character Salesforce Id will always work (and is the default).
However, all Salesforce Id and text fields can be used. It is OK for the Id to match multiple records. For example you could:
Use BillingState as the “id” and select all accounts in Florida and Alabama (the Ids values would be Florida and Alabama).
The “Id List” option will restore Salesforce records based on record Ids copied into a text box. Ids should be delimited using a space or a comma.
There is no practical limit to the number of Ids that can be pasted into the box.
Any Salesforce Id type column or text column may be chosen to use as the “id” field.
Note: For real Salesforce Ids use a 15 or 18 character id.
The “Random” option will restore a random number of Salesforce records, optionally limited to a set of Ids provided based on a SQL statement or record filter.
If a value is provided for the “Seed” parameter the same records will be restored each time.
This can be useful for restoring a development sandbox to exactly the same state every time.
The “Seed” parameter can be any positive non-zero number from 1 to 9 digits in length.
To restrict records using a record filter, select “Filter” from the “Constraint Type” dropdown and:
Click on “Click Here To Edit”.
See this page for more information on configuring a record filter in CopyStorm/Restore: .
To restrict records using a SQL statement, select “SQL” from the “Constraint Type” dropdown and:
Example 1: Limit the selection to accounts with a shipping country of “Elbonia”:
SELECT id FROM Account WHERE ShippingCountry='Elbonia'
Example 2: Limit accounts to those with Opportunities having a value greater than $1,000,000:
The “Referenced” option will only restore a record if it is referenced by another Salesforce record being restored. This option is selected automatically as a side-effect of including a related list for another table.
For example, if a user selects random Account records to restore and selects the Opportunity related list, a rule to restore referenced Opportunities will automatically be created.
When creating test data in a sandbox restoring referenced records may cause more data than desired to be restored. For example, if restoring all Cases referenced by restored Accounts, much more data than needed may be restored.
There are three parameters which can control the number of referenced records to be restored:
The “Max # Per Parent” is the maximum number of child records that should be restored for each parent.
For example, if this number is 5 for restoring Cases, then no more than 5 Cases will be restored for each unique Account.
The “Max # Total” is the maximum number of child records that should be restored for all parents.
Note that the actual number of referenced records restored may be slightly larger than the specified constraint. This is because records are also restored because of a reference field constraint, but the number of additional records restored is typically small.
The “SQL” option will restore all records whose id matches the value returned by a user supplied SQL statement.
For example,
To select Contacts in Ohio:
SELECT id FROM Contact WHERE MailingState='OH'
To select Contacts with open support cases:
The “SOQL” option will restore all records whose id matches the value returned by a user supplied SOQL statement.
For example,
To select a Contact record by name:
SELECT id FROM Contact WHERE Name='Michael Jordan'
To select Contacts with closed support cases:
The main CopyStorm/Restore tab is used to manage credentials for Salesforce and the source CopyStorm database.
Paste in a list of Ids listing the records to restore. The “ids” can be any Salesforce “Id” or “String” type column.
Restore a random number of records, optionally using a filter to control which records can be selected.
Only restore records which are referenced by another table.
Write SQL against the CopyStorm database to determine which records to restore. This technique is for advanced developer types.
Write SOQL against the target Salesforce instance to determine which records to restore. This technique is for advanced developer types.
None
No records will be restored. This can be useful to suppress restores to a table when pending records are already in the tracker database.
Skip Original Id Check
When enabled, CopyStorm/Restore will avoid the check to see if a record has already been restored to the target Salesforce by checking the “Original Id” column. Note that when “Skip Original Id Check” and “Skip Record Id Check” are both enabled, all operations will be Inserts. Note that this option will only be displayed if the “Original Record Id” Migration feature is enabled.
SELECT DISTINCT accountId FROM Opportunity WHERE amount > 1000000The “Constraint Type” allows the restored records to be limited to referenced records that match a specific set of criteria.
Select “Filter” to edit a drag-and-drop record filter that will be used to limit the related objects being restored.
For documentation on using a record filter with CopyStorm/Restore, see the page: Limiting Records To Restore With a Record Filter.
Select “SQL” to provide a SQL fragment that will be added to the WHERE cause of the SQL used to look for related objects.
For example, if this is set to “closeDate >= ‘2015-01-01′” for Opportunity then only Opportunities closed in 2015 or later will be selected.
Any column in the CopyStorm backup database can be used to form this constraint.
The only restriction for this parameter is that it must be valid SQL when appended to a statement like:
SELECT id FROM Opportunity WHERE (...) AND (<>)
SELECT contactId FROM Case2 WHERE isClosed=0SELECT contactId FROM Case2 WHERE isClosed=1Restore all records from the CopyStorm backup.
Use a rich GUI to create a filter limiting which records are restored.
Provide a file of Ids listing the records to restore. The “ids” can be any Salesforce “Id” or “String” type column.
Salesforce Id
If the record Id in CopyStorm matches an existing Id in the target Salesforce then an update operation is performed. Otherwise an insert operations is performed.
External Id
If a specific External Id column in CopyStorm matches the same column in Salesforce then an update operation is performed. Otherwise an insert operations is performed.
Multi-Column
Max # Per Update
Maximum number of records to be sent to Salesforce in a single batch. By default use the parameter from the Global Parameters tab. Never set this value unless something like an ApexTrigger or Workflow is limiting the number of records that can be written in a batch. This condition typically occurs as a result of poorly written Apex code.
# Salesforce Writers
Maximum number of concurrent write request to Salesforce. It is rare to set this value because CopyStorm/Restore dynamically selects a value which gives optimal performance as part of its runtime Salesforce analysis.
Skip Record Id Check











If one or more specified columns matches the same columns in Salesforce then an update operation is performed. Otherwise an insert operations is performed.
When enabled, CopyStorm/Restore will avoid the check to see if a record is already in the target Salesforce. Note that when “Skip Record Id Check” and “Skip Original Id Check” are both enabled, all operations will be Inserts.
Password
The password for the Salesforce user.
Security Token
Optional security token supplied by Salesforce.
Alternate Host
If your connection to Salesforce does not use one of the standard endpoint (login.salesforce.com or test.salesforce.com) then you must specify your endpoint as an alternate host. If an Alternate Host is not provided, the standard endpoint for the “Instance Type” that is selected will be used.
Example:
capstorm.my.salesforce.com
Advanced Parameters
Use the Advanced Parameters dialog to set proxy information , timeout limits, and other communication details.
Parameter
Description
Connection String
JDBC connection string required to use a CopyStorm database.
Connection String Builder
Clicking on this button launches a dialog that helps create a valid connection string.
Username
Parameter
Description
Credential Type
This indicates how Salesforce credentials are managed. Built-in options include:
Username And Password (default).
One-Time Password Authenticator
Salesforce Batch Size
Maximum number of records to read from Salesforce in a single API call. The default, 2000, should rarely be changed.
Max Timeout
After entering parameters for a connection, a “Test Connection” button will become enabled and can be used to validate the credentials.
Parameter
Description
Instance Type
Type of Salesforce instance being copied.
Production
Sandbox
Database.com
This is required when the “Alternate Host” is empty.
Username
A Salesforce user. This user must have API privileges. All data visible to this user will be copied to the CapStorm database.
Changing this parameter will cause the GUI for the Salesforce credentials to adapt.
CopyStorm database username.
Password
CopyStorm database password.
Schema
Default schema to use. Note that this parameter is not supported by all databases.
Maximum number of seconds to wait for a response from Salesforce. This should rarely be changed.
Describe Batch Size
Number of table definitions to read from Salesforce in a single batch. This should rarely be changed.
Apache/HttpClient
If checked then Apache’s HttpClient will be used to communicate with Salesforce rather than the default client built into the library. This option should not be checked when the standard library works.
Use Describe Cache
If checked then Salesforce table definitions will be kept in a disk cache rather than in memory. This should rarely be checked.
Proxy Host
Optional name or IP address of a proxy host. Leave this blank if a proxy is not being used.
Proxy Port
Optional port on which a proxy server is listening.
Proxy User
Optional username when required by a proxy server.
Proxy Password
Optional password when required by a proxy server.


Default settings that globally impact data operations when uploading data or configuring CopyStorm/Restore.
Default Salesforce User
The Salesforce User to use as the record owner if the owner in the CopyStorm database is not active or does not exist in Salesforce. A value of “Default” will cause the Salesforce user running CopyStorm/Restore to be used. The pull-down menu contains all active users in the Salesforce instance.
Default Restore Type
When a table is added to the restore, default behavior will be to use this type of restore:
Insert
Update
Full Metadata Object Restore by Default
If unchecked, the default procedure for restoring a complex metadata object is to support partial definition restoration rather than the entire definition.
Include Overflow Snapshot
If checked, CopyStorm/Restore database queries will include records in the Default Record Overflow snapshot. This snapshot contains records that cannot be written to the primary CopyStorm database due to row size constraints.

Record Lineage specific parameters. Record Lineage maps a logical record to one or more physical forms over time, tracking how the record evolves within the same system or across different systems.
Create Record Lineage
If checked, CopyStorm/Restore will create a lineage entry when a record is inserted. If unchecked, no lineage entry will be created on insert.
Enable Record Lineage Candidate Scanning
If checked, CopyStorm/Restore will consider record lineage when performing a candidate scan. If unchecked, CopyStorm/Restore will not consider record lineage during Candidate Scans. Refer to this article for details on how lineage affects Candidate Scanning.
Related Lists Scan Option
Configures how CopyStorm/Restore manages related list relationships when determining record lineage during the restoration process. Available values are:
Do Not Scan Old Lineage – When performing a candidate scan, only the related lists of the HEAD lineage are scanned.
Require Consistent Relationships – When performing a candidate scan, child records are scanned only if they maintain a consistent relationship with the parent’s HEAD.
Scan Old Lineage – When performing a candidate scan, lineage is ignored, and all child records are considered..
Reference Field Scan Option
Configures how CopyStorm/Restore manages reference field relationships when determining record lineage during the restoration process.
Do Not Scan Old Lineage – When performing a candidate scan, only the referenced records of the HEAD lineage are scanned.
Require Consistent Relationships – When performing a candidate scan, referenced records are scanned only if they maintain a consistent relationship with the parent’s HEAD.
Scan Old Lineage – When performing a candidate scan, lineage is ignored, and all referenced records are considered..

The Delete Records tool deletes records from the Tracker Database. The most common use case is:
The candidate scan found too many records. I want the application to forget about previously found records.
Using the Delete Records dialog requires making two decisions:
Which records should be deleted.
Which record statuses should be affected.
Default parameters delete all visible skipped and pending records.
Records to Delete
“Visible”: Delete all records currently shown in the Tracker table, taking filters into account.
“Table”: Delete all records in the Tracker table, not taking filters into account.
“All”: Delete all records from all Tracker tables.
Selected Record Status
Only delete records with the selected statuses.
Limit Delete To
Records that have been deleted from the target Salesforce.
Only delete records that were previously restored and no longer present in the target Salesforce.
Records that are missing in the CopyStorm database.
Only delete records that were previously found in the CopyStorm database but no longer present.
Other Tracker Data to Delete
Exceptions: Delete all Exception logging history from the tracker.
Skipped Record Reasons: Delete all record skip logging history from the tracker.
Restore History: Delete all Restore job logging history from the tracker.
The Restore Set Editor tab is used to select which tables and fields will be restored to Salesforce. The editor is divided into two major sections:
The Table Selector
The Table Editor
The section on the left, the Table Selector, indicates which table(s) have been selected for the restore.
Tables that have been selected to be restored will always be displayed.
Tables that have not been selected will appear only if their name matches the filter criteria under the “Select” drop-down located in the top of the selector.
If a table name is followed by a red (ref), only records referenced by other tables in the list will be restored.
If a table is selected but no longer in Salesforce its name will be followed by a red [Not in Salesforce].
The section on the right, the Table Editor, is used to control the restore parameters for the selected table on the left. In the following screen shot a table has not yet been selected. Click on a table name to display its Restore Rule.
The Table Editor on the right-hand side of the Restore Set Editor tab controls restore parameters for individual tables. It is divided into 4 or 5 tabs.
The “Select Records” tab controls:
Which specific records will be restored to Salesforce.
Whether Inserting, Updating, or both operations should be allowed.
The “Reference Fields” tab controls what should happen when a table’s reference fields are pointing to records not in the target Salesforce and not part of the restore. For example, when restoring an Account with a Parent Account should the Parent Account be automatically restored.
By default, CopyStorm/Restore tracker databases are stored in $HOME/.capstorm/copyStormRestoreSets as H2 databases. Documentation on the database schema and how to access it can be found here. You will also need the answer to the question:
What Username and Password do I need to access a tracker database?
The answer is:
Username: root
Password: capstorm
Before spending a lot of time accessing the Tracker Database directly, look at the tab in the CopyStorm/Restore GUI.
Available options include “Restore Referenced Record” and “Skip Record”.
The “Fields” tab supports fine control over which fields will be restored AND field level masking and obfuscation. By default all fields are restored.
The “Related Lists” tab supports including records in child tables, grandchildren, great-grand children, etc. (to any depth) in the set of records to restore. Example: With a couple of mouse clicks CopyStorm/Restore can be told to restore all child, grandchild, etc. tables for selected Accounts.

