file-systems.rst.inc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. File systems
  2. ~~~~~~~~~~~~
  3. We recommend using a reliable, scalable journaling filesystem for the
  4. repository, e.g. zfs, btrfs, ext4, apfs.
  5. Borg now uses the ``borgstore`` package to implement the key/value store it
  6. uses for the repository.
  7. It currently uses the ``file:`` Store (posixfs backend) either with a local
  8. directory or via ssh and a remote ``borg serve`` agent using borgstore on the
  9. remote side.
  10. This means that it will store each chunk into a separate filesystem file
  11. (for more details, see the ``borgstore`` project).
  12. This has some pros and cons (compared to legacy borg 1.x's segment files):
  13. Pros:
  14. - Simplicity and better maintainability of the borg code.
  15. - Sometimes faster, less I/O, better scalability: e.g. borg compact can just
  16. remove unused chunks by deleting a single file and does not need to read
  17. and re-write segment files to free space.
  18. - In future, easier to adapt to other kinds of storage:
  19. borgstore's backends are quite simple to implement.
  20. A ``sftp:`` backend already exists, cloud storage might be easy to add.
  21. - Parallel repository access with less locking is easier to implement.
  22. Cons:
  23. - The repository filesystem will have to deal with a big amount of files (there
  24. are provisions in borgstore against having too many files in a single directory
  25. by using a nested directory structure).
  26. - Bigger fs space usage overhead (will depend on allocation block size - modern
  27. filesystems like zfs are rather clever here using a variable block size).
  28. - Sometimes slower, due to less sequential / more random access operations.