delete.rst.inc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_delete:
  3. borg delete
  4. -----------
  5. .. code-block:: none
  6. borg [common options] delete [options] [REPOSITORY_OR_ARCHIVE] [ARCHIVE...]
  7. .. only:: html
  8. .. class:: borg-options-table
  9. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  10. | **positional arguments** |
  11. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  12. | | ``REPOSITORY_OR_ARCHIVE`` | repository or archive to delete |
  13. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  14. | | ``ARCHIVE`` | archives to delete |
  15. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | **optional arguments** |
  17. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | | ``-n``, ``--dry-run`` | do not change repository |
  19. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | | ``-s``, ``--stats`` | print statistics for the deleted archive |
  21. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | | ``--cache-only`` | delete only the local cache for the given repository |
  23. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | | ``--force`` | force deletion of corrupted archives, use ``--force --force`` in case ``--force`` does not work. |
  25. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | | ``--keep-security-info`` | keep the local security info when deleting a repository |
  27. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | | ``--save-space`` | work slower, but using less space |
  29. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | .. class:: borg-common-opt-ref |
  31. | |
  32. | :ref:`common_options` |
  33. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | **Archive filters** — Archive filters can be applied to repository targets. |
  35. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | | ``-P PREFIX``, ``--prefix PREFIX`` | only consider archive names starting with this prefix. |
  37. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | | ``-a GLOB``, ``--glob-archives GLOB`` | only consider archive names matching the glob. sh: rules apply, see "borg help patterns". ``--prefix`` and ``--glob-archives`` are mutually exclusive. |
  39. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | | ``--sort-by KEYS`` | Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp |
  41. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | | ``--first N`` | consider first N archives after other filters were applied |
  43. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | | ``--last N`` | consider last N archives after other filters were applied |
  45. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. .. raw:: html
  47. <script type='text/javascript'>
  48. $(document).ready(function () {
  49. $('.borg-options-table colgroup').remove();
  50. })
  51. </script>
  52. .. only:: latex
  53. REPOSITORY_OR_ARCHIVE
  54. repository or archive to delete
  55. ARCHIVE
  56. archives to delete
  57. optional arguments
  58. -n, --dry-run do not change repository
  59. -s, --stats print statistics for the deleted archive
  60. --cache-only delete only the local cache for the given repository
  61. --force force deletion of corrupted archives, use ``--force --force`` in case ``--force`` does not work.
  62. --keep-security-info keep the local security info when deleting a repository
  63. --save-space work slower, but using less space
  64. :ref:`common_options`
  65. |
  66. Archive filters
  67. -P PREFIX, --prefix PREFIX only consider archive names starting with this prefix.
  68. -a GLOB, --glob-archives GLOB only consider archive names matching the glob. sh: rules apply, see "borg help patterns". ``--prefix`` and ``--glob-archives`` are mutually exclusive.
  69. --sort-by KEYS Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  70. --first N consider first N archives after other filters were applied
  71. --last N consider last N archives after other filters were applied
  72. Description
  73. ~~~~~~~~~~~
  74. This command deletes an archive from the repository or the complete repository.
  75. Important: When deleting archives, repository disk space is **not** freed until
  76. you run ``borg compact``.
  77. When you delete a complete repository, the security info and local cache for it
  78. (if any) are also deleted. Alternatively, you can delete just the local cache
  79. with the ``--cache-only`` option, or keep the security info with the
  80. ``--keep-security-info`` option.
  81. When using ``--stats``, you will get some statistics about how much data was
  82. deleted - the "Deleted data" deduplicated size there is most interesting as
  83. that is how much your repository will shrink.
  84. Please note that the "All archives" stats refer to the state after deletion.
  85. You can delete multiple archives by specifying their common prefix, if they
  86. have one, using the ``--prefix PREFIX`` option. You can also specify a shell
  87. pattern to match multiple archives using the ``--glob-archives GLOB`` option
  88. (for more info on these patterns, see ``borg help patterns``). Note that these
  89. two options are mutually exclusive.
  90. To avoid accidentally deleting archives, especially when using glob patterns,
  91. it might be helpful to use the ``--dry-run`` to test out the command without
  92. actually making any changes to the repository.