File: mount.rst

package info (click to toggle)
borgbackup 1.1.9-2%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 11,956 kB
  • sloc: ansic: 39,466; python: 21,922; pascal: 2,269; sh: 137; makefile: 128
file content (64 lines) | stat: -rw-r--r-- 2,264 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.. include:: mount.rst.inc

.. include:: umount.rst.inc

Examples
~~~~~~~~

::

    # Mounting the repository shows all archives.
    # Archives are loaded lazily, expect some delay when navigating to an archive
    # for the first time.
    $ borg mount /path/to/repo /tmp/mymountpoint
    $ ls /tmp/mymountpoint
    root-2016-02-14 root-2016-02-15
    $ borg umount /tmp/mymountpoint

    # Mounting a specific archive is possible as well.
    $ borg mount /path/to/repo::root-2016-02-15 /tmp/mymountpoint
    $ ls /tmp/mymountpoint
    bin  boot  etc	home  lib  lib64  lost+found  media  mnt  opt
    root  sbin  srv  tmp  usr  var
    $ borg umount /tmp/mymountpoint

    # The experimental "versions view" merges all archives in the repository
    # and provides a versioned view on files.
    $ borg mount -o versions /path/to/repo /tmp/mymountpoint
    $ ls -l /tmp/mymountpoint/home/user/doc.txt/
    total 24
    -rw-rw-r-- 1 user group 12357 Aug 26 21:19 doc.cda00bc9.txt
    -rw-rw-r-- 1 user group 12204 Aug 26 21:04 doc.fa760f28.txt
    $ borg umount /tmp/mymountpoint

    # Archive filters are supported.
    # These are especially handy for the "versions view",
    # which does not support lazy processing of archives.
    $ borg mount -o versions --glob-archives '*-my-home' --last 10 /path/to/repo /tmp/mymountpoint

    # Exclusion options are supported.
    # These can speed up mounting and lower memory needs significantly.
    $ borg mount /path/to/repo /tmp/mymountpoint only/that/path
    $ borg mount --exclude '...' /path/to/repo /tmp/mymountpoint


borgfs
++++++

::

    $ echo '/mnt/backup /tmp/myrepo fuse.borgfs defaults,noauto 0 0' >> /etc/fstab
    $ echo '/mnt/backup::root-2016-02-15 /tmp/myarchive fuse.borgfs defaults,noauto 0 0' >> /etc/fstab
    $ mount /tmp/myrepo
    $ mount /tmp/myarchive
    $ ls /tmp/myrepo
    root-2016-02-01 root-2016-02-2015
    $ ls /tmp/myarchive
    bin  boot  etc	home  lib  lib64  lost+found  media  mnt  opt  root  sbin  srv  tmp  usr  var

.. Note::

    ``borgfs`` will be automatically provided if you used a distribution
    package, ``pip`` or ``setup.py`` to install Borg. Users of the
    standalone binary will have to manually create a symlink (see
    :ref:`pyinstaller-binary`).