|
1 | 1 | # Restore using mount
|
2 | 2 |
|
3 |
| -**NOTE**: `rustic` doesn't support `mount` at this point, please use `restic` to |
4 |
| -invoke this operation for the time being. We are working on a `mount` |
5 |
| -implementation for `rustic`. |
| 3 | +**NOTE**: `rustic` currently only supports `mount` for linux; we are working on |
| 4 | +support for other operation systemss. |
6 | 5 |
|
7 | 6 | Browsing your backup as a regular file system is also very easy. First, create a
|
8 | 7 | mount point such as `/mnt/rustic` and then use the following command to serve
|
9 | 8 | the repository with FUSE:
|
10 | 9 |
|
11 | 10 | ```console
|
12 | 11 | $ mkdir /mnt/rustic
|
13 |
| -$ restic -r /srv/rustic-repo mount /mnt/rustic |
14 |
| -enter password for repository: |
15 |
| -Now serving /srv/rustic-repo at /mnt/rustic |
16 |
| -Use another terminal or tool to browse the contents of this folder. |
17 |
| -When finished, quit with Ctrl-c here or umount the mountpoint. |
| 12 | +$ rustic mount /mnt/rustic |
18 | 13 | ```
|
19 | 14 |
|
| 15 | +Now you can access the backup content like a normal filesystem, i.e. you can |
| 16 | +simply copy files from the respository snapshots. |
| 17 | + |
| 18 | +**NOTE**: Copying files using `mount` may be not as efficient as using `restore` |
| 19 | +as `restore` is highly optimized and knows in the beginning what exactly will be |
| 20 | +restored. |
| 21 | + |
| 22 | +**NOTE** Keep in mind that every file access on the mounted repository may |
| 23 | +involve access to the repository. Especially read access to lots of data may be |
| 24 | +expensive depending on the backend. It is not advised to run compare tools or |
| 25 | +something like `rsync` on the mounted dir if you use a remote backend. Use |
| 26 | +`diff` or `restore` if you want to compare or sync content with your lokal saved |
| 27 | +files. |
| 28 | + |
| 29 | +**NOTE**: When using a hot/cold repositories, file access is only possible if |
| 30 | +the needed data is warmed-up in the cold repository part. By default rustic |
| 31 | +therefore forbids file-access by default, see `--file-access` below. |
| 32 | + |
| 33 | +There are various options which can be used with the `mount` command: |
| 34 | + |
| 35 | +- You can specify the exact snapshot/path to mount, e.g. |
| 36 | + `rustic mount /mnt/rustic latest:/home` |
| 37 | +- If no snapshot/path is given, all snapshots are displayed in a tree, you can |
| 38 | + use `--path-template` and `--time-template` to define the tree structure, e.g. |
| 39 | + first group by hostname and then by snapshot date/time. |
| 40 | +- You can give additional mount options using `--exclusive` or `--option`. |
| 41 | +- `--file-access` allows to restict access to only listing dirs and. |
| 42 | + |
| 43 | +<!-- TODO!: |
20 | 44 | Mounting repositories via FUSE is only possible on Linux, macOS and FreeBSD. On
|
21 | 45 | Linux, the `fuse` kernel module needs to be loaded and the `fusermount` command
|
22 | 46 | needs to be in the `PATH`. On macOS, you need
|
23 | 47 | [FUSE for macOS](https://osxfuse.github.io/). On FreeBSD, you may need to
|
24 | 48 | install FUSE and load the kernel module (`kldload fuse`).
|
25 | 49 |
|
26 |
| -<!-- TODO!: |
27 | 50 | rustic supports storage and preservation of hard links. However, since hard
|
28 | 51 | links exist in the scope of a filesystem by definition, restoring hard links
|
29 | 52 | from a fuse mount should be done by a program that preserves hard links. A
|
|
0 commit comments