# 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"
```


---

# 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/reference/archive-tab/run-snapshot-policy-from-command-line.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.
