1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-04 06:21:46 +00:00

improve docs for borg with-lock (#8024)

docs: add example for borg with-lock
This commit is contained in:
kmille 2024-01-03 23:42:29 +01:00 committed by GitHub
parent 2803c7358b
commit 865de9fcee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,7 +73,11 @@ def build_parser_locks(self, subparsers, common_parser, mid_common_parser):
with_lock_epilog = process_epilog( 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 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 running in the repo), then execute the given command as a subprocess and wait