1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-21 23:33:07 +00:00

compact: explain more

This commit is contained in:
Thomas Waldmann 2024-11-05 21:25:24 +01:00
parent 72b1a8ea04
commit 7cd048f53a
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -185,9 +185,23 @@ def build_parser_compact(self, subparsers, common_parser, mid_common_parser):
- interrupted backups (maybe retry the backup first before running compact!)
- backup of source files that had an I/O error in the middle of their contents
and that were skipped due to this.
- corruption of the repository (e.g. the archives directory having lost entries)
Important: after compacting it is not possible anymore to use ``borg undelete``
to recover previously deleted archives.
You usually don't want to run ``borg compact`` after every write operation, but
either regularly (e.g. once a month, possibly together with ``borg check``) or
when disk space needs to be freed.
**Important:**
After compacting it is not possible anymore to use ``borg undelete`` to recover
previously deleted archives.
``borg compact`` might also delete data from archives that were "lost" due to
archives directory corruption. Such archives could potentially be restored with
``borg check --find-lost-archives [--repair]``, which is slow and thus you
maybe usually don't want to do that unless there are signs of lost archives
(e.g. when seeing fatal errors when creating backups or when archives are
missing in ``borg list``).
Differently than borg 1.x, borg2's compact needs the borg key if the repo is
encrypted.