---
name: "bupstash-exec-with-locks"
section: "1"
platform: "linux"
package: "bupstash"
version: "0.12.0-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/bupstash-exec-with-locks"
---

# bupstash-exec-with-locks(1)

## SYNOPSIS

Execute a command with exclusive locks on the repository.

**bupstash init -r REPO COMMAND...**

## DESCRIPTION

**bupstash exec-with-locks** executes a command with exclusive locks held on the bupstash repository, preventing concurrent modification to the repository for the duration of the command.

## OPTIONS

- \-r, --repository REPO

  Repository to lock. Defaults to BUPSTASH\_REPOSITORY if not set. Unlike other commands, does not support remote repository access.

## ENVIRONMENT

- BUPSTASH\_REPOSITORY

  Repository to lock.

## EXAMPLES

```
$ bupstash exec-with-locks -r ./repo -- cp -r ./repo ./repo-backup
```

## SEE ALSO

[bupstash(1)](/bupstash/1.md), [bupstash-repository(7)](/bupstash-repository/7.md)
