# How to Compare Metadata From Two Backups

Since CopyStorm keeps a copy of Salesforce metadata in local database tables it is a fairly trivial task to compare metadata from multiple CopyStorm backups.

## Problem 1: Compare Table and Field definitions from Two Backups

The key CopyStorm tables required to perform table and field comparisons are *CopyForceTable* and *CopyForceTableField*. These are the tables CopyStorm uses to keep the CopyStorm database structure in sync with Salesforce. Rather than bore you with details, download the following SQL script for an example of how to exhaustively search for table and field differences.

* [Search for Table and Field Differences Script](http://download.capstorm.com/learn/CopyStorm/FindTableAndFieldDifferences.sql).

## Problem: Compare Salesforce Metadata Objects from Two Backups

This solution compares elements like Apex Classes, Page Layouts, Settings, etc. from two difference CopyStorm backups. The key table in CopyStorm is *SFMetaFileProperties* since this table contains the most recently backed version of each metadata type. Note that the companion table, *SFMetaFilePropertiesHistory*, contains historical values for each metadata type. Download the following script for an example of how to exhaustively compare metadata.

* [Exhaustively Compare Metadata Objects Script.](http://download.capstorm.com/learn/CopyStorm/FindMetadataDifferences.sql)

## For Additional Help

* [Where Does CopyStorm Store Salesforce Metadata?](/frequently-asked-questions/how-does-copystorm-work/where-does-copystorm-keep-salesforce-metadata.md)
* [Does CopyStorm Backup Metadata?](/frequently-asked-questions/how-does-copystorm-work/does-copystorm-backup-meta-data.md)
* [Where Does CopyStorm Keep Past Revisions of Metadata?](/frequently-asked-questions/how-does-copystorm-work/where-does-copystorm-keep-past-revisions-of-salesforce-metadata.md)


---

# Agent Instructions: Querying This Documentation

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

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

```
GET https://learn.capstorm.com/frequently-asked-questions/how-does-copystorm-work/how-to-compare-metadata-from-two-backups.md?ask=<question>
```

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

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