> For the complete documentation index, see [llms.txt](https://learn.capstorm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.capstorm.com/reference/archive-tab/run-snapshot-policy-from-command-line.md).

# Run Snapshot Policy from Command Line

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](/reference/archive-tab/run-archive-policy.md).

#### Overview

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

#### Command Line Switches

<table><thead><tr><th width="242">Command Line Switch</th><th width="298">Explanation</th><th>Required</th><th>Default</th></tr></thead><tbody><tr><td>snapshot</td><td>The name of the snapshot to run</td><td>Yes</td><td>N/A</td></tr><tr><td>snapshotThreads</td><td>The number of objects to snapshot in parallel</td><td>No</td><td>10</td></tr><tr><td>snapshotSearchBatchSize</td><td>The read batch size from the database for candidate records</td><td>No</td><td>1000</td></tr><tr><td>snapshotWriteBatchSize</td><td>The write batch size to the database for found candidate records</td><td>No</td><td>1000</td></tr><tr><td>snapshotScanRecordsFrom</td><td>The date to start scanning records from (i.e. 2020-01-01)</td><td>No</td><td>Empty</td></tr><tr><td>snapshotScanRecordsThru</td><td>The date to end scanning records from (i.e. 2025-01-01)</td><td>No</td><td>Empty</td></tr></tbody></table>

#### Example Usage

This example is for Windows installations of CopyStorm. For Linux/Mac installations, change *CopyStorm.bat* to *CopyStorm.sh*

```
./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"
```
