faq.rst 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. How can I specify the encryption passphrase programmatically?
  47. The encryption passphrase can be specified programmatically using the
  48. `BORG_PASSPHRASE` environment variable. This is convenient when setting up
  49. automated encrypted backups. Another option is to use
  50. key file based encryption with a blank passphrase. See
  51. :ref:`encrypted_repos` for more details.
  52. When backing up to remote encrypted repos, is encryption done locally?
  53. Yes, file and directory metadata and data is locally encrypted, before
  54. leaving the local machine. We do not mean the transport layer encryption
  55. by that, but the data/metadata itself. Transport layer encryption (e.g.
  56. when ssh is used as a transport) applies additionally.
  57. When backing up to remote servers, do I have to trust the remote server?
  58. Yes and No.
  59. No, as far as data confidentiality is concerned - if you use encryption,
  60. all your files/dirs data and metadata are stored in their encrypted form
  61. into the repository.
  62. Yes, as an attacker with access to the remote server could delete (or
  63. otherwise make unavailable) all your backups.
  64. If a backup stops mid-way, does the already-backed-up data stay there?
  65. Yes, |project_name| supports resuming backups.
  66. During a backup a special checkpoint archive named ``<archive-name>.checkpoint``
  67. is saved every checkpoint interval (the default value for this is 5
  68. minutes) containing all the data backed-up until that point. This means
  69. that at most <checkpoint interval> worth of data needs to be retransmitted
  70. if a backup needs to be restarted.
  71. Once your backup has finished successfully, you can delete all ``*.checkpoint``
  72. archives.
  73. If it crashes with a UnicodeError, what can I do?
  74. Check if your encoding is set correctly. For most POSIX-like systems, try::
  75. export LANG=en_US.UTF-8 # or similar, important is correct charset
  76. I can't extract non-ascii filenames by giving them on the commandline!?
  77. This might be due to different ways to represent some characters in unicode
  78. or due to other non-ascii encoding issues.
  79. If you run into that, try this:
  80. - avoid the non-ascii characters on the commandline by e.g. extracting
  81. the parent directory (or even everything)
  82. - mount the repo using FUSE and use some file manager
  83. Can |project_name| add redundancy to the backup data to deal with hardware malfunction?
  84. No, it can't. While that at first sounds like a good idea to defend against
  85. some defect HDD sectors or SSD flash blocks, dealing with this in a
  86. reliable way needs a lot of low-level storage layout information and
  87. control which we do not have (and also can't get, even if we wanted).
  88. So, if you need that, consider RAID or a filesystem that offers redundant
  89. storage or just make backups to different locations / different hardware.
  90. See also `ticket 225 <https://github.com/borgbackup/borg/issues/225>`_.
  91. Can |project_name| verify data integrity of a backup archive?
  92. Yes, if you want to detect accidental data damage (like bit rot), use the
  93. ``check`` operation. It will notice corruption using CRCs and hashes.
  94. If you want to be able to detect malicious tampering also, use a encrypted
  95. repo. It will then be able to check using CRCs and HMACs.
  96. Why was Borg forked from Attic?
  97. Borg was created in May 2015 in response to the difficulty of getting new
  98. code or larger changes incorporated into Attic and establishing a bigger
  99. developer community / more open development.
  100. More details can be found in `ticket 217
  101. <https://github.com/jborg/attic/issues/217>`_ that led to the fork.
  102. Borg intends to be:
  103. * simple:
  104. * as simple as possible, but no simpler
  105. * do the right thing by default, but offer options
  106. * open:
  107. * welcome feature requests
  108. * accept pull requests of good quality and coding style
  109. * give feedback on PRs that can't be accepted "as is"
  110. * discuss openly, don't work in the dark
  111. * changing:
  112. * Borg is not compatible with Attic
  113. * do not break compatibility accidentally, without a good reason
  114. or without warning. allow compatibility breaking for other cases.
  115. * if major version number changes, it may have incompatible changes