# Snapshots

The Snapshots tool is intended to test the system snapshot capability, and will invoke the same system calls as Duplicati to set up and tear down a system snapshot.

The Snapshots tool is called `Duplicati.CommandLine.Snapshots.exe` on Windows and `duplicati-snapshots` on Linux and MacOS.

To run the tool, invoke it with a folder to use for testing. To work correctly the folder should be on the filesystem/disk/volume/etc that will be part of the snapshot:

```
duplicati-snapshots <path to test folder>
```

The tool will do the following:

1. Create the folder if it does not exist
2. Place a file named `testfile.bin` inside the folder
3. Lock the file
4. Verify that the file is locked
5. Create a snapshot containing the folder
6. Check that the file can be read from the snapshot
7. Tear down the snapshot

On **Windows**, this will use VSS to create snapshots, which require elevated privileges, usually Administrator.

On **Linux**, this will use LVM and a set of shell scripts to obtain the `vgroup` and manipulate it. These scripts are located in the source folder `lvmscripts` and are named:

* `find-volume.sh`: Locates the volume where the given folder path is in.
* `create-lvm-snapshot.sh`: Creates the LVM snapshot and returns the path to it.
* `remove-lvm-snapshot.sh`: Removes a created snapshot

Usually, the operations require elevated privileges, for example root permissions.

For **MacOS**, the snapshots are not currently supported.


---

# 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://docs.duplicati.com/duplicati-programs/command-line-interface-cli-1/snapshots.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.
