| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
- .. _borg_analyze:
- borg analyze
- ------------
- .. code-block:: none
- borg [common options] analyze [options]
- .. only:: html
- .. class:: borg-options-table
- +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
- | .. class:: borg-common-opt-ref |
- | |
- | :ref:`common_options` |
- +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
- | **Archive filters** — Archive filters can be applied to repository targets. |
- +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
- | | ``-a PATTERN``, ``--match-archives PATTERN`` | only consider archives matching all patterns. See "borg help match-archives". |
- +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
- | | ``--sort-by KEYS`` | Comma-separated list of sorting keys; valid keys are: timestamp, archive, name, id, tags, host, user; default is: timestamp |
- +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
- | | ``--first N`` | consider the first N archives after other filters are applied |
- +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
- | | ``--last N`` | consider the last N archives after other filters are applied |
- +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
- | | ``--oldest TIMESPAN`` | consider archives between the oldest archive's timestamp and (oldest + TIMESPAN), e.g., 7d or 12m. |
- +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
- | | ``--newest TIMESPAN`` | consider archives between the newest archive's timestamp and (newest - TIMESPAN), e.g., 7d or 12m. |
- +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
- | | ``--older TIMESPAN`` | consider archives older than (now - TIMESPAN), e.g., 7d or 12m. |
- +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
- | | ``--newer TIMESPAN`` | consider archives newer than (now - TIMESPAN), e.g., 7d or 12m. |
- +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
- .. raw:: html
- <script type='text/javascript'>
- $(document).ready(function () {
- $('.borg-options-table colgroup').remove();
- })
- </script>
- .. only:: latex
- :ref:`common_options`
- |
- Archive filters
- -a PATTERN, --match-archives PATTERN only consider archives matching all patterns. See "borg help match-archives".
- --sort-by KEYS Comma-separated list of sorting keys; valid keys are: timestamp, archive, name, id, tags, host, user; default is: timestamp
- --first N consider the first N archives after other filters are applied
- --last N consider the last N archives after other filters are applied
- --oldest TIMESPAN consider archives between the oldest archive's timestamp and (oldest + TIMESPAN), e.g., 7d or 12m.
- --newest TIMESPAN consider archives between the newest archive's timestamp and (newest - TIMESPAN), e.g., 7d or 12m.
- --older TIMESPAN consider archives older than (now - TIMESPAN), e.g., 7d or 12m.
- --newer TIMESPAN consider archives newer than (now - TIMESPAN), e.g., 7d or 12m.
- Description
- ~~~~~~~~~~~
- Analyze archives to find "hot spots".
- ``borg analyze`` relies on the usual archive matching options to select the
- archives that should be considered for analysis (e.g. ``-a series_name``).
- Then it iterates over all matching archives, over all contained files, and
- collects information about chunks stored in all directories it encounters.
- It considers chunk IDs and their plaintext sizes (we do not have the compressed
- size in the repository easily available) and adds up the sizes of added and removed
- chunks per direct parent directory, and outputs a list of "directory: size".
- You can use that list to find directories with a lot of "activity" — maybe
- some of these are temporary or cache directories you forgot to exclude.
- To avoid including these unwanted directories in your backups, you can carefully
- exclude them in ``borg create`` (for future backups) or use ``borg recreate``
- to recreate existing archives without them.
|