with-lock.rst.inc 953 B

123456789101112131415161718192021222324252627282930313233343536
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. borg:command:: borg with-lock
  3. .. _borg_with-lock:
  4. borg with-lock
  5. --------------
  6. ::
  7. borg [common options] with-lock <options> REPOSITORY COMMAND ARGS
  8. positional arguments
  9. REPOSITORY
  10. repository to lock
  11. COMMAND
  12. command to run
  13. ARGS
  14. command arguments
  15. `Common options`_
  16. |
  17. Description
  18. ~~~~~~~~~~~
  19. This command runs a user-specified command while the repository lock is held.
  20. It will first try to acquire the lock (make sure that no other operation is
  21. running in the repo), then execute the given command as a subprocess and wait
  22. for its termination, release the lock and return the user command's return
  23. code as borg's return code.
  24. Note: if you copy a repository with the lock held, the lock will be present in
  25. the copy, obviously. Thus, before using borg on the copy, you need to
  26. use "borg break-lock" on it.