file-metadata.rst.inc 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. Support for file metadata
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~
  3. Besides regular file and directory structures, Borg can preserve
  4. * symlinks (stored as symlink, the symlink is not followed)
  5. * special files:
  6. * character and block device files (restored via mknod)
  7. * FIFOs ("named pipes")
  8. * special file *contents* can be backed up in ``--read-special`` mode.
  9. By default the metadata to create them with mknod(2), mkfifo(2) etc. is stored.
  10. * hardlinked regular files, devices, FIFOs (considering all items in the same archive)
  11. * timestamps in nanosecond precision: mtime, atime, ctime
  12. * other timestamps: birthtime (on platforms supporting it)
  13. * permissions:
  14. * IDs of owning user and owning group
  15. * names of owning user and owning group (if the IDs can be resolved)
  16. * Unix Mode/Permissions (u/g/o permissions, suid, sgid, sticky)
  17. On some platforms additional features are supported:
  18. .. Yes/No's are grouped by reason/mechanism/reference.
  19. +-------------------------+----------+-----------+------------+
  20. | Platform | ACLs | xattr | Flags |
  21. | | [#acls]_ | [#xattr]_ | [#flags]_ |
  22. +=========================+==========+===========+============+
  23. | Linux | Yes | Yes | Yes [1]_ |
  24. +-------------------------+----------+-----------+------------+
  25. | Mac OS X | Yes | Yes | Yes (all) |
  26. +-------------------------+----------+-----------+------------+
  27. | FreeBSD | Yes | Yes | Yes (all) |
  28. +-------------------------+----------+-----------+------------+
  29. | OpenBSD | n/a | n/a | Yes (all) |
  30. +-------------------------+----------+-----------+------------+
  31. | NetBSD | n/a | No [2]_ | Yes (all) |
  32. +-------------------------+----------+-----------+------------+
  33. | Solaris and derivatives | No [3]_ | No [3]_ | n/a |
  34. +-------------------------+----------+-----------+------------+
  35. | Windows (cygwin) | No [4]_ | No | No |
  36. +-------------------------+----------+-----------+------------+
  37. Other Unix-like operating systems may work as well, but have not been tested at all.
  38. Note that most of the platform-dependent features also depend on the file system.
  39. For example, ntfs-3g on Linux isn't able to convey NTFS ACLs.
  40. .. [1] Only "nodump", "immutable", "compressed" and "append" are supported.
  41. Feature request :issue:`618` for more flags.
  42. .. [2] Feature request :issue:`1332`
  43. .. [3] Feature request :issue:`1337`
  44. .. [4] Cygwin tries to map NTFS ACLs to permissions with varying degrees of success.
  45. .. [#acls] The native access control list mechanism of the OS. This normally limits access to
  46. non-native ACLs. For example, NTFS ACLs aren't completely accessible on Linux with ntfs-3g.
  47. .. [#xattr] extended attributes; key-value pairs attached to a file, mainly used by the OS.
  48. This includes resource forks on Mac OS X.
  49. .. [#flags] aka *BSD flags*. The Linux set of flags [1]_ is portable across platforms.
  50. The BSDs define additional flags.