> 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/backendtool.md).

# BackendTool

This page describes the backend tool in Duplicati

The BackendTool is intended to provide commandline access to the remote destination. This can be used to create remote folders, locate remote files, and fetch remote files.

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

The basic usage for the tool is:

```
duplicati-backend-tool <command> <remote url> [filename] [lock-duration]
```

There are 7 supported commands: GET, PUT, DELETE, LIST, CREATEFOLDER, GET-LOCK, and SET-LOCK.

The GET, PUT, and DELETE commands will download, upload, and delete a file, respectively. The filename parameter refers to the remote filename and will be matched to a local filename. It is not possible to have different filenames on the remote and local system with this operation. Note that any change to the remote storage will likely require a recreate of the [local database](/database-and-storage/the-local-database.md).

The LIST command will simply list all files found on the remote location and has no side-effects. The CREATEFOLDER command can be used to create folders in preparation for making a backup or moving files.

The GET-LOCK and SET-LOCK commands work with [remote file locking](/security-and-secrets/using-remote-file-locking.md) on destinations that support it. GET-LOCK prints the lock expiration of a remote file in ISO 8601 UTC, or `null` if the file has no lock. SET-LOCK locks a remote file for the given duration:

```
duplicati-backend-tool GET-LOCK <remote url> <filename>
duplicati-backend-tool SET-LOCK <remote url> <filename> 30D
```


---

# 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/backendtool.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.
