with-lock.rst.inc 902 B

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