mount.rst 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. borgfs
  36. ++++++
  37. ::
  38. $ echo '/mnt/backup /tmp/myrepo fuse.borgfs defaults,noauto 0 0' >> /etc/fstab
  39. $ echo '/mnt/backup::root-2016-02-15 /tmp/myarchive fuse.borgfs defaults,noauto 0 0' >> /etc/fstab
  40. $ mount /tmp/myrepo
  41. $ mount /tmp/myarchive
  42. $ ls /tmp/myrepo
  43. root-2016-02-01 root-2016-02-2015
  44. $ ls /tmp/myarchive
  45. bin boot etc home lib lib64 lost+found media mnt opt root sbin srv tmp usr var
  46. .. Note::
  47. ``borgfs`` will be automatically provided if you used a distribution
  48. package, ``pip`` or ``setup.py`` to install Borg. Users of the
  49. standalone binary will have to manually create a symlink (see
  50. :ref:`pyinstaller-binary`).