delete.rst.inc 14 KB

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