> For the complete documentation index, see [llms.txt](https://docs.duplicati.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.duplicati.com/duplicati-programs/command-line-interface-cli-1/snapshots.md).

# Snapshots

This page describes how to use the Duplicati Snapshots tool

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 `Duplicati/Library/Snapshots/lvm-scripts` 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.

On **MacOS**, this will use APFS local snapshots created with `tmutil`, driven by a similar set of scripts located in `Duplicati/Library/Snapshots/apfs-scripts` (`find-volume.sh`, `create-apfs-snapshot.sh`, `remove-apfs-snapshot.sh`). Creating and mounting the snapshot also requires elevated privileges. Snapshot support on MacOS was added in Duplicati 2.2.0.104 (stable 2.3.0.0).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.duplicati.com/duplicati-programs/command-line-interface-cli-1/snapshots.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
