Skip to content

Commit

Permalink
improve docs for borg with-lock (#8024)
Browse files Browse the repository at this point in the history
docs: add example for borg with-lock
  • Loading branch information
kmille committed Jan 3, 2024
1 parent 2803c73 commit 865de9f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/borg/archiver/lock_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ def build_parser_locks(self, subparsers, common_parser, mid_common_parser):

with_lock_epilog = process_epilog(
"""
This command runs a user-specified command while the repository lock is held.
This command runs a user-specified command while locking the repository. For example:
::
$ BORG_REPO=/mnt/borgrepo borg with-lock rsync -av /mnt/borgrepo /somewhere/else/borgrepo
It will first try to acquire the lock (make sure that no other operation is
running in the repo), then execute the given command as a subprocess and wait
Expand Down

0 comments on commit 865de9f

Please sign in to comment.