faq.rst 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. .. _faq:
  2. .. include:: global.rst.inc
  3. Frequently asked questions
  4. ==========================
  5. Can I backup VM disk images?
  6. Yes, the :ref:`deduplication <deduplication_def>` technique used by
  7. |project_name| makes sure only the modified parts of the file are stored.
  8. Also, we have optional simple sparse file support for extract.
  9. Can I backup from multiple servers into a single repository?
  10. Yes, but in order for the deduplication used by |project_name| to work, it
  11. needs to keep a local cache containing checksums of all file
  12. chunks already stored in the repository. This cache is stored in
  13. ``~/.cache/borg/``. If |project_name| detects that a repository has been
  14. modified since the local cache was updated it will need to rebuild
  15. the cache. This rebuild can be quite time consuming.
  16. So, yes it's possible. But it will be most efficient if a single
  17. repository is only modified from one place. Also keep in mind that
  18. |project_name| will keep an exclusive lock on the repository while creating
  19. or deleting archives, which may make *simultaneous* backups fail.
  20. Which file types, attributes, etc. are preserved?
  21. * Directories
  22. * Regular files
  23. * Hardlinks (considering all files in the same archive)
  24. * Symlinks (stored as symlink, the symlink is not followed)
  25. * Character and block device files
  26. * FIFOs ("named pipes")
  27. * Name
  28. * Contents
  29. * Time of last modification (nanosecond precision with Python >= 3.3)
  30. * User ID of owner
  31. * Group ID of owner
  32. * Unix Mode/Permissions (u/g/o permissions, suid, sgid, sticky)
  33. * Extended Attributes (xattrs) on Linux, OS X and FreeBSD
  34. * Access Control Lists (ACL_) on Linux, OS X and FreeBSD
  35. * BSD flags on OS X and FreeBSD
  36. Which file types, attributes, etc. are *not* preserved?
  37. * UNIX domain sockets (because it does not make sense - they are
  38. meaningless without the running process that created them and the process
  39. needs to recreate them in any case). So, don't panic if your backup
  40. misses a UDS!
  41. * The precise on-disk representation of the holes in a sparse file.
  42. Archive creation has no special support for sparse files, holes are
  43. backed up as (deduplicated and compressed) runs of zero bytes.
  44. Archive extraction has optional support to extract all-zero chunks as
  45. holes in a sparse file.
  46. Why is my backup bigger than with attic?
  47. Why doesn't |project_name| do compression by default?
  48. * attic was rather unflexible when it comes to compression, it always
  49. compressed using zlib level 6 (no way to switch compression off or
  50. adjust the level or algorithm)
  51. * |project_name| offers a lot of different compression algorithms and
  52. levels. Which of them is the best for you pretty much depends on your use
  53. case, your data, your hardware - so you need to do an informed decision
  54. about whether you want to use compression, which algorithm and which
  55. level you want to use. This is why compression defaults to none.
  56. How can I specify the encryption passphrase programmatically?
  57. The encryption passphrase can be specified programmatically using the
  58. `BORG_PASSPHRASE` environment variable. This is convenient when setting up
  59. automated encrypted backups. Another option is to use
  60. key file based encryption with a blank passphrase. See
  61. :ref:`encrypted_repos` for more details.
  62. When backing up to remote encrypted repos, is encryption done locally?
  63. Yes, file and directory metadata and data is locally encrypted, before
  64. leaving the local machine. We do not mean the transport layer encryption
  65. by that, but the data/metadata itself. Transport layer encryption (e.g.
  66. when ssh is used as a transport) applies additionally.
  67. When backing up to remote servers, do I have to trust the remote server?
  68. Yes and No.
  69. No, as far as data confidentiality is concerned - if you use encryption,
  70. all your files/dirs data and metadata are stored in their encrypted form
  71. into the repository.
  72. Yes, as an attacker with access to the remote server could delete (or
  73. otherwise make unavailable) all your backups.
  74. If a backup stops mid-way, does the already-backed-up data stay there?
  75. Yes, |project_name| supports resuming backups.
  76. During a backup a special checkpoint archive named ``<archive-name>.checkpoint``
  77. is saved every checkpoint interval (the default value for this is 5
  78. minutes) containing all the data backed-up until that point. This means
  79. that at most <checkpoint interval> worth of data needs to be retransmitted
  80. if a backup needs to be restarted.
  81. Once your backup has finished successfully, you can delete all ``*.checkpoint``
  82. archives.
  83. If it crashes with a UnicodeError, what can I do?
  84. Check if your encoding is set correctly. For most POSIX-like systems, try::
  85. export LANG=en_US.UTF-8 # or similar, important is correct charset
  86. I can't extract non-ascii filenames by giving them on the commandline!?
  87. This might be due to different ways to represent some characters in unicode
  88. or due to other non-ascii encoding issues.
  89. If you run into that, try this:
  90. - avoid the non-ascii characters on the commandline by e.g. extracting
  91. the parent directory (or even everything)
  92. - mount the repo using FUSE and use some file manager
  93. Can |project_name| add redundancy to the backup data to deal with hardware malfunction?
  94. No, it can't. While that at first sounds like a good idea to defend against
  95. some defect HDD sectors or SSD flash blocks, dealing with this in a
  96. reliable way needs a lot of low-level storage layout information and
  97. control which we do not have (and also can't get, even if we wanted).
  98. So, if you need that, consider RAID or a filesystem that offers redundant
  99. storage or just make backups to different locations / different hardware.
  100. See also `ticket 225 <https://github.com/borgbackup/borg/issues/225>`_.
  101. Can |project_name| verify data integrity of a backup archive?
  102. Yes, if you want to detect accidental data damage (like bit rot), use the
  103. ``check`` operation. It will notice corruption using CRCs and hashes.
  104. If you want to be able to detect malicious tampering also, use a encrypted
  105. repo. It will then be able to check using CRCs and HMACs.
  106. Why was Borg forked from Attic?
  107. Borg was created in May 2015 in response to the difficulty of getting new
  108. code or larger changes incorporated into Attic and establishing a bigger
  109. developer community / more open development.
  110. More details can be found in `ticket 217
  111. <https://github.com/jborg/attic/issues/217>`_ that led to the fork.
  112. Borg intends to be:
  113. * simple:
  114. * as simple as possible, but no simpler
  115. * do the right thing by default, but offer options
  116. * open:
  117. * welcome feature requests
  118. * accept pull requests of good quality and coding style
  119. * give feedback on PRs that can't be accepted "as is"
  120. * discuss openly, don't work in the dark
  121. * changing:
  122. * Borg is not compatible with Attic
  123. * do not break compatibility accidentally, without a good reason
  124. or without warning. allow compatibility breaking for other cases.
  125. * if major version number changes, it may have incompatible changes