with-lock.rst.inc 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. .. code-block:: none
  6. borg [common options] with-lock [options] REPOSITORY COMMAND ARGS
  7. .. only:: html
  8. .. class:: borg-options-table
  9. +-------------------------------------------------------+----------------+--------------------+
  10. | **positional arguments** |
  11. +-------------------------------------------------------+----------------+--------------------+
  12. | | ``REPOSITORY`` | repository to lock |
  13. +-------------------------------------------------------+----------------+--------------------+
  14. | | ``COMMAND`` | command to run |
  15. +-------------------------------------------------------+----------------+--------------------+
  16. | | ``ARGS`` | command arguments |
  17. +-------------------------------------------------------+----------------+--------------------+
  18. | **optional arguments** |
  19. +-------------------------------------------------------+----------------+--------------------+
  20. | .. class:: borg-common-opt-ref |
  21. | |
  22. | :ref:`common_options` |
  23. +-------------------------------------------------------+----------------+--------------------+
  24. .. raw:: html
  25. <script type='text/javascript'>
  26. $(window).load(function () {
  27. $('.borg-options-table colgroup').remove();
  28. })
  29. </script>
  30. .. only:: latex
  31. REPOSITORY
  32. repository to lock
  33. COMMAND
  34. command to run
  35. ARGS
  36. command arguments
  37. :ref:`common_options`
  38. |
  39. Description
  40. ~~~~~~~~~~~
  41. This command runs a user-specified command while the repository lock is held.
  42. It will first try to acquire the lock (make sure that no other operation is
  43. running in the repo), then execute the given command as a subprocess and wait
  44. for its termination, release the lock and return the user command's return
  45. code as borg's return code.
  46. Note: if you copy a repository with the lock held, the lock will be present in
  47. the copy, obviously. Thus, before using borg on the copy, you need to
  48. use "borg break-lock" on it.