faq.rst 6.9 KB

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