mount.rst 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .. include:: mount.rst.inc
  2. .. include:: umount.rst.inc
  3. Examples
  4. ~~~~~~~~
  5. ::
  6. # Mounting the repository shows all archives.
  7. # Archives are loaded lazily, expect some delay when navigating to an archive
  8. # for the first time.
  9. $ borg mount /path/to/repo /tmp/mymountpoint
  10. $ ls /tmp/mymountpoint
  11. root-2016-02-14 root-2016-02-15
  12. $ borg umount /tmp/mymountpoint
  13. # Mounting a specific archive is possible as well.
  14. $ borg mount /path/to/repo::root-2016-02-15 /tmp/mymountpoint
  15. $ ls /tmp/mymountpoint
  16. bin boot etc home lib lib64 lost+found media mnt opt
  17. root sbin srv tmp usr var
  18. $ borg umount /tmp/mymountpoint
  19. # The "versions view" merges all archives in the repository
  20. # and provides a versioned view on files.
  21. $ borg mount -o versions /path/to/repo /tmp/mymountpoint
  22. $ ls -l /tmp/mymountpoint/home/user/doc.txt/
  23. total 24
  24. -rw-rw-r-- 1 user group 12357 Aug 26 21:19 doc.cda00bc9.txt
  25. -rw-rw-r-- 1 user group 12204 Aug 26 21:04 doc.fa760f28.txt
  26. $ borg umount /tmp/mymountpoint
  27. # Archive filters are supported.
  28. # These are especially handy for the "versions view",
  29. # which does not support lazy processing of archives.
  30. $ borg mount -o versions --glob-archives '*-my-home' --last 10 /path/to/repo /tmp/mymountpoint
  31. # Exclusion options are supported.
  32. # These can speed up mounting and lower memory needs significantly.
  33. $ borg mount /path/to/repo /tmp/mymountpoint only/that/path
  34. $ borg mount --exclude '...' /path/to/repo /tmp/mymountpoint
  35. # When using BORG_REPO env var, use :: as positional argument:
  36. export BORG_REPO=/path/to/repo
  37. # Mount the whole repo:
  38. borg mount :: /tmp/mymountpoint
  39. # Mount some specific archive:
  40. borg mount ::root-2016-02-15 /tmp/mymountpoint
  41. borgfs
  42. ++++++
  43. ::
  44. $ echo '/mnt/backup /tmp/myrepo fuse.borgfs defaults,noauto 0 0' >> /etc/fstab
  45. $ echo '/mnt/backup::root-2016-02-15 /tmp/myarchive fuse.borgfs defaults,noauto 0 0' >> /etc/fstab
  46. $ mount /tmp/myrepo
  47. $ mount /tmp/myarchive
  48. $ ls /tmp/myrepo
  49. root-2016-02-01 root-2016-02-2015
  50. $ ls /tmp/myarchive
  51. bin boot etc home lib lib64 lost+found media mnt opt root sbin srv tmp usr var
  52. .. Note::
  53. ``borgfs`` will be automatically provided if you used a distribution
  54. package or ``pip`` to install Borg. Users of the standalone binary will have
  55. to manually create a symlink (see :ref:`pyinstaller-binary`).