How Do I Validate a CopyStorm Backup?

Since,in nearly all cases,  Salesforce is a live system that is always changing, it can be difficult to prove that a CopyStorm backup is complete. There are, however, techniques that can be used to gain confidence that a backup is “complete.”

One common approach sites take is to compare record counts reported by Salesforce with record counts in the CopyStorm backup. This approach works pretty well as long as the following facts are understood.

  • Salesforce does not include archived or deleted records in reported record counts. CopyStorm backs up both of these record types and may report more records than indicated by Salesforce.
  • By default, CopyStorm will not back up a record until it is unchanged for approximately 2 minutes. There is a good reason for this default behavior and it is because of the “Salesforce believes in time travel” feature. This means that Salesforce may report slightly more records than CopyStorm

In the end, you will want to be comfortable that CopyStorm is backing up all of your data and Capstorm provides several tools in CopyStorm’s companion product, CopyStorm/Medic to help you.

  • The CopyStorm/Medic Scan Timestamps tool will do an exhaustive comparison between records in Saleforce and the CopyStorm database and report both on records that do not match, records that will be made to match in a future backup, and records that will be inserted in a future backup.
  • The CopyStorm/Medic Count Records tool will count records both in Salesforce and CopyStorm and compare the results. This technique works until a Salesforce table becomes too large to count records (e.g. a SELECT COUNT() always times out).

Common Issues

The ABC Table is Missing Column XYZ from Salesforce

When the backup is missing a column the problem is nearly always because the Salesforce credentials given to  CopyStorm do not have permission to see the column. It is common for a person so assume that a Salesforce Admin user can see everything — unfortunately this assumption is commonly wrong.

The ABC Table is Missing in the Backup

When the backup is missing a table then it either has been explicitly excluded in CopyStorm or the Salesforce credentials given to CopyStorm do not have permission to see the table. Include the table and/or change permissions  then then table will  appear in the backup.

Data in Column XYZ Is Not Being Updated

This root cause to this problem is almost always one of two issues:

The XYZ column is a formula. Formula columns are not updated on a record unless a non-formula column changes because CopyStorm relies on record timestamps to efficiently perform incremental backups and timestamps do not change when a formula value changes. If you want specific formula columns to always match Salesforce then use the CopyStorm/Medic Refresh Columns tool periodically to update formula columns.

The permissions on column XYZ were changed to make it visible. When CopyStorm first sees a column it assumes that it is a brand new column and creates a corresponding column in the backup database. As a new column, any values for the column are then picked up an incremental backup.  If column XYZ is not really a new column but rather a column newly made visible then older records containing XYZ will have a null value until the timestamp on the containing record changes. The solution is to force an update on the problem column using the CopyStorm/Medic Refresh Columns tool.