Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The CopyStorm Snapshot tab is the launch point for creating, editing, using, and exploring CopyStorm snapshot data sources. A CopyStorm Snapshot is a database store containing tamper-proof snapshots of records from any Salesforce table where the snap-shots are taken based upon rules specified by a user.
CopyStorm Snapshots can be used to store many types of data.
A Snapshot can be used to create a unlimited duration recycle bin or a recycle bin where data retention policies vary by table.
A Snapshot can be used to permanently save a copy of Salesforce records on demand.
A Snapshot can be used to track all versions of critical Salesforce records.
Each CopyStorm Snapshot has policies which determine which table and which records should be snapshot. Like the core CopyStorm backup process, Snapshot policies can be applied automatically as a regular part of a backup or can be applied on demand.
The CopyStorm Snapshot tab lists all currently defined snapshots, can be used to create a new snapshot, and is the launch point for most Snapshot operations including:

To get started with CopyStorm Snapshots, please review the following:
Once you have the basics down try one of these tutorials:
Finally, jump to any of the following reference articles:
Though every Snapshot Policy has a default record retention rule, it is often convenient to have a custom retention rule for specific tables. Example:
By default, retain records in a snapshot for 90 days.
Retain Account, Contact, and Opportunity records for 365 days.
Retain Case records for 2 years.
Do not retain EmailMessage records.
The following two screens illustrate how to set up this policy.

Clicking on the Advanced button launches an editor to override the default record retention rule. The following example sets up the scenario described at the top of this page.

Though it is possible to delete a Snapshot Policy, usually a site will simply want to make the policy inactive. When a Snapshot Policy is deleted both the policy definition and all data snapshot by the policy are deleted from the CopyStorm database.
The Snapshot policy deletion tool is launched using right-click context menu on the CopyStorm Snapshot tab.


The Run Snapshot Policy Retention Rules feature is used to force a snapshot to look for records that should be deleted from the Snapshot based on its retention rules and then delete the records. This happens automatically for active Snapshot Policies as part of the regular CopyStorm backup process, so this feature is most useful for inactive Snapshot Policies.
The Run Snapshot Policy Retention Rules feature is accessed from the right-click context menu on the CopyStorm Snapshot tab.

There are only two parameter options when running retention rules.
Search Batch Size — number of records that will be searched at once for potential deletion.
Deletion Batch Size — number of records that will be deleted in a single database transaction.

CopyStorm Snapshots support an unlimited number of Snapshot Policies with each Policy defined by the Snapshot Policy Editor. The following image lays out the primary sections of the Snapshot Policy Editor.

There are several tabs on the Snapshot Policy Editor.
The Main tab contains properties common to all snapshots and is where the Filter Rule Type for the snapshot is indicated.
The Filter Rule Parameters tab contains filter specific data. For example:
Most filter types support selecting which tables to include in a snapshot.
The Column Expression filter type supports rich user supplied expressions to limit which records are snapshot.
The Advanced tab contains parameters rarely modified by a customer.
The following subsections describe each tab in details.
Each Snapshot Policy requires a unique name. There are no restrictions on what characters can appear in a name but the name itself must be unique for each snapshot policy.
A Snapshot Policy is always in either an Active or Inactive state.
A policy in an Active state will be be used by CopyStorm as part of a normal backup. For example, the Default Recycle Bin policy will usually be set to an Active state so the backup will automatically snapshot records as they are deleted from Salesforce.
A policy in an Inactive state can be ran by hand but will not be automatically processed as part of a CopyStorm backup. Inactive policies are useful for one-off compliance needs and snapshot policies that do not need to be part of a scheduled process.
The Apply Policy section controls when CopyStorm will check a record in the database against the policy filter. There are three options:
After Insert — check a record against the policy immediately after it is inserted into the CopyStorm database.
Before Update — check a record against the policy immediately before it is updated with changes from Salesforce.
After Update — check a record against the policy immediately after it has been updated in the CopyStorm database.
One or all of the option can be selected concurrently. In all cases, CopyStorm will not add a record to a snapshot if an identical copy of the record is already in the snapshot.
To reduce the amount of database space required to snapshot a record, certain non-essential fields can be excluded. Common exclusion choices are:
Empty Fields — when empty fields are excluded a savings of the “length of the field name” plus 3 bytes is saved for each of the record’s empty fields.
Formula Fields — excluding a formula field can often save a lot of space in a record. Formulas are computed, so there is no data loss.
The # Days to Retain parameter controls how many days records are kept in a snapshot before they are deleted.
Blank means to keep snapshot records forever.
90 means to delete snapshot records after 90 days.
In addition to the global # Days to Retain parameter, the policy for individual tables in a snapshot can be set explicitly by creating an override rule using the Advanced.. button. Clicking on the Advanced… button launches the Advanced Retention Rules Editor.
The Filter Rule Type specifies specific properties that a record must have to be considered by the snapshot policy. Example Filter Rule Types include:
Deleted Records — a record passes the filter if it has been deleted in Salesforce.
Column Expression — a record passes the filter if the data in its columns matches a user defined expression.
All Changes — a record always passes the filter.
For further details for each filter rule type, see the article on Policy Filter Rules.
The content of the Filter Rule Parameters tab depends on the Filter Rule Type selected on the Main tab.
For example, the following screen shot is for a Column Expression filter rule.
This filter says to only snapshot a record if it is a Contact or Account and is named CapStorm.
Like most filters, the tables to be processed by the rule can be specified as a White List, Black List, or both.
For further details for each filter rule type, see the article on Policy Filter Rules.
To boost performance of record relationship traversal, CopyStorm Snapshots maintain a high speed database index. This section supports excluding reference fields from the high speed index to save space in the database. The reference fields selected by default are rarely needed for relationship traversal, occur on nearly every record, and thus can take up significant space in the CopyStorm Snapshot index.


A SQL Predicate Filter Rul e is useful when other filtering techniques are insufficient and it is possible to write a database SQL fragment to identify records that match a snapshot policy. It is rare to need this filter rule because filtering can typically be accomplished using the graphical Column Expression Filter Rule.
A SQL Predicate Filter Rule has a single configuration parameter: a fragment of database specific SQL will be added to the WHERE clause of a SQL statement generated by CopyStorm. Example:
SELECT Id FROM Account WHERE Id IN (…) AND (configuration parameter from SQL Predicate Filter)
If the argument to a SQL Predicate Filter Rule was “RecordAge__c>46 OR alwaysSnapshot__c=1” then SQL statements generated by CopyStorm would look like:
SELECT Id FROM Account WHERE Id IN (…) AND (RecordAge__c>46 OR alwaysSnapshot__c=1)
A SQL Predicate Filter Rule also includes a rule for which tables to include in the snapshot.

A Column Expression Filter Rule is a rich graphical tool for specifying the conditions under which a record should be added to a CopyStorm snapshot. The interface is patterned after the Salesforce Report Writer expression builder and should feel familiar to most users.
The first step, after selecting the Column Expression option from the Filter Rule Type pull-down, is to launch the column expression filter editor.

Clicking on the Edit Column Expression Filter button will launch the editor.

The following example creates a filter that finds records where:
the Name field contains “Louis”
The screen image shows the dialog after the Refresh Preview button has been clicked. Notice that the searched database has multiple accounts with the similar names that matched the filter.

After saving changes and returning to the policy editor, a summary of the filter will be shown. To change the filter simply click on the Edit Column Expression Rule again.

The list of available columns is determined as the intersection of all columns from table names matched by the policy’s Include Tables list. If you see a single column named Id then the policy is including all tables in Salesforce and the only common column name is Id. To increase the number of available columns return to the policy editor page and adjust the list of included tables.
This issue only occurs when there are no matching records in the CopyStorm database in any of the selected tables. The solution is to modify the query.
The Run Snapshot Policy feature is used to run a snapshot policy against existing data in a CopyStorm snapshot on demand. This process is useful in a number of circumstances.
Suppose a new snapshot for all Cases older than 2 years was just defined. Before activating the snapshot policy (so it will run automatically when a backup happens) you may want to snapshot all existing cases in the CopyStorm database that are older than 2 years.
Your compliance department has told you to snapshot all records related to ACME, Inc. because they have filed a breach lawsuit against the company. In this case the snapshot policy that you define may run just once — on demand — and never be scheduled to run automatically.
The Run Snapshot Policy feature is accessed from the right-click context menu on the CopyStorm Snapshot tab.

There are just a few options to run a Snapshot Policy by hand.
Scan Records From sets a start date from which records will be searched. By default the start date will be the date of the earliest record in the corresponding CopyStorm table.
Scan Records Thru sets the last date on which records will be searched. By default the end data will be the most recent date in the CopyStorm database.
# Concurrent Searches limits the number of tables that will be processed concurrently. You can set it to a large value (like 200) but be aware that a large number will consume considerable database resources.
# Searches Per Batch limits the number of records that will be evaluated by the snapshot policy concurrently (on a per table basis). A larger number will increase performance slightly at the cost of making the user interface a bit less responsive.
# Snapshot Per Batch limits the number of records that will be written to a snapshot in a single database transaction.

While a Snapshot Policy is running the screen will continuously update with progress information. At any point in time you can cancel the snapshot process and only records snapshot so far will be preserved in the database.
The following screenshot illustrates how the dialog will appear after a snapshot policy has run to completion. Note that are several reasons that a record may be processed but not snapshot.
If a record fails to match the filter associated with the snapshot policy then it will be skipped.
If a record matches the filter associated with the snapshot policy but is already in the snapshot with exactly the same data then it will be skipped.

The Deleted Records Filter Rule indicates that a CopyStorm record should be snapshot only when its IsDeleted flag is set to true. The primary use of the filter is to manage the records added to a recycle bin.
Though CopyStorm is initialized with a policy, Default Recycle Bin, that uses this filter rule, a user can added additional snapshot policies based on a Deleted Records Filter Rule if a non-standard recycle bin is desired.
The only configuration for a Deleted Records Filter Rule is which tables to include in the snapshot.

Like most database systems, the CopyStorm Snapshot system will operate most efficiently when its has statistics about what is stored in snapshots. Example:
If CopyStorm knows what tables have been snapshot by a policy then it can limit searches to just these tables.
If CopyStorm knows how may records are in a snapshot it can generated more efficient SQL queries.
For the most part, CopyStorm Snapshot updates statistics without any user intervention. This page, however, describes how to force CopyStorm Snapshot to update statistics if the most accurate statistics possible are desired or if the statistics have been corrupted. Note: it is unlikely that you will ever need this feature.
The Update Statistic s feature is accessed from the right-click context menu on the CopyStorm Snapshot tab.

In the Refresh Statistics dialog there is the option to refresh statistics for a single snapshot or for all snapshots in the system. The following image illustrates what the screen may look like after refreshing statistics for a single snapshot.

A Snapshot Policy Filter Rule contains the logic which determines if a database record should be processed by the snapshot policy. There are several types of policy filters built into CopyStorm Snapshot.
All Changes — this filter always indicates that a record should be processed. Use it when all changes to records should be snapshot.
Column Expression — with this filter a rich expression based on columns in a record can be used to determine if a record should be snapshot.
Deleted Records — this filter only matches records that have been deleted in Salesforce. This filter is used to build recycle bin type policies.
SQL Predicate — this advanced filter supports injecting user specific SQL fragments into a query that determines if a record should be snapshot.
The Filter Rule for a Snapshot Policy is specified on the Main Tab of the snapshot editor.
Parameters specific to the selected Filter Rule Type can be set on the Filter Rule Parameters tab.
Nearly all Filter Rule Types support the concept of a White and/or Black list for selecting the tables to be processed by the policy.
A White List indicates tables to include in the snapshot.
A Black List indicates tables to exclude from the snapshot. All tables not on the black list will be included.
Typically the technique used for selecting tables for a snapshot is either by White List or Black List. However, if you are brave (and using regular expressions) both a White and Black list may be useful.
The following example (from the All Changes filter rule type) illustrate the components of the White/Black list editor.
The pull-down menu indicates whether tables should be selected by White list, Black list, or both.
The dialog for selecting tables is nearly the same for a White or Black list. The following example is for a White list.
The Snapshot Explorer is a tool for viewing and exporting data from a CopyStorm Snapshot. The tool is launched from the CopyStorm Snapshot tab.

The Snapshot Explorer has four stages, indicated by the navigation bar at the top of the dialog.
Start — Select the snapshot to explore.
Select Table — Select a table from the Snapshot to explore.
Preview — Build a query and preview the selected data from the Snapshot.
Export — Export the data from the snapshot in a variety of formats.
In the Select Table stage, select the table you wish to explore and optionally select the columns in the table to view. Note that you can always return to this stage in order to update the selected columns.
In the Preview Stage, optionally create a filter that limits the records to view or export. The filter is created by dragging and dropping elements from the left hand side of the screen to the big white box on the right.
In the example screen shot a filter for finding records with a capstorm email domain has been specified and then the Refresh Preview button was clicked.
In the Export Stage:
Review and update the list of columns to export.
Click on the Start Snapshot Export button and the system will display a typical Save As dialog.
By default, only the most recent version of a record will be written in the export. To override this behavior and write ALL VERSIONS of a record to the export check the box to Include All Snapshot Record Versions of a Salesforce Record. Of course, even if this option is checked, a record still has to pass the filter criteria from the Preview stage.
The Save As dialog which appears after clicking on Start Snapshot Export will look like your system’s default dialog with the addition of a file format selection section.
When the result of an export is loaded into your favorite spreadsheet it will look like:
This page provides details into the command line options for running snapshot policies for CopyStorm in headless mode. This feature was introduced as part of the 10.65.1 GA release of CopyStorm. For more information regarding running snapshot policies, see here.
The command line functionality mirrors the same options and functionality as seen in the CopyStorm application using the "Run Snapshot Rules Now" option including:
Start and end date ranges for records to snapshot
Number of concurrent searches (number of objects snapshot in parallel)
Search batch size
Snapshot per batch
This example is for Windows installations of CopyStorm. For Linux/Mac installations, change CopyStorm.bat to CopyStorm.sh
The All Changes Filter Rul e always indicates that a record should be snapshot for a change to any field. Basically, if a caller asks if a record should be snapshot then the All Changes Filter Rule will always respond with “Yes.”
This rule is useful for any table where all changes should be included in the snapshot.
Since the All Changes Filter Rule always says “Yes, this record should be snapshot”, naturally its only configuration parameter is which tables to include in the snapshot.











snapshot
The name of the snapshot to run
Yes
N/A
snapshotThreads
The number of objects to snapshot in parallel
No
10
./CopyStorm.bat -snapshot "Default Point In Time" "/path/to/config.copyStorm" -snapshotThreads 5 -snapshotSearchBatchSize 5000 -snapshotWriteBatchSize 5000 -snapshotScanRecordsFrom "2020-01-01" -snapshotScanRecordsThru "2025-01-01"snapshotSearchBatchSize
The read batch size from the database for candidate records
No
1000
snapshotWriteBatchSize
The write batch size to the database for found candidate records
No
1000
snapshotScanRecordsFrom
The date to start scanning records from (i.e. 2020-01-01)
No
Empty
snapshotScanRecordsThru
The date to end scanning records from (i.e. 2025-01-01)
No
Empty