internals.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. .. include:: global.rst.inc
  2. .. _internals:
  3. Internals
  4. =========
  5. The internals chapter describes and analyses most of the inner workings
  6. of Borg.
  7. Borg uses a low-level, key-value store, the :ref:`repository`, and
  8. implements a more complex data structure on top of it, which is made
  9. up of the :ref:`manifest <manifest>`, :ref:`archives <archive>`,
  10. :ref:`items <item>` and data :ref:`chunks`.
  11. Each repository can hold multiple :ref:`archives <archive>`, which
  12. represent individual backups that contain a full archive of the files
  13. specified when the backup was performed.
  14. Deduplication is performed globally across all data in the repository
  15. (multiple backups and even multiple hosts), both on data and file
  16. metadata, using :ref:`chunks` created by the chunker using the
  17. Buzhash_ algorithm.
  18. To actually perform the repository-wide deduplication, a hash of each
  19. chunk is checked against the :ref:`chunks cache <cache>`, which is a
  20. hash-table of all chunks that already exist.
  21. .. figure:: internals/structure.png
  22. :figwidth: 100%
  23. :width: 100%
  24. Layers in Borg. On the very top commands are implemented, using
  25. a data access layer provided by the Archive and Item classes.
  26. The "key" object provides both compression and authenticated
  27. encryption used by the data access layer. The "key" object represents
  28. the sole trust boundary in Borg.
  29. The lowest layer is the repository, either accessed directly
  30. (Repository) or remotely (RemoteRepository).
  31. .. toctree::
  32. :caption: Internals contents
  33. internals/security
  34. internals/data-structures
  35. internals/frontends