Commit Graph

41 Commits

Author SHA1 Message Date
greatroar 58719e1f47 Replace mount's per-file cache by a global LRU cache 2020-07-12 18:27:16 +02:00
nunoperalta 2c3360db98
Fix #2774 - make unable to umount message clearer 2020-06-07 15:57:39 +01:00
greatroar 649cbec6c5 Simplify build tags for restic mount
This command can only be built on Darwin, FreeBSD and Linux
(and if we upgrade bazil.org/fuse, only FreeBSD and Linux:
https://github.com/bazil/fuse/issues/224).

Listing the few supported operating systems explicitly here makes
porting restic to new platforms easier.
2020-05-12 11:30:41 +02:00
greatroar 18fee4806f Remove broken --allow-root from restic mount 2020-03-17 23:35:06 +01:00
rawtaz 58bd165253
Merge pull request #2581 from aawsome/multiple-hostnames
Allow multiple hostnames tags
2020-02-27 08:35:23 +01:00
Alexander Weiss 9a9101d144 Support specifying multiple host flags for various commands
The `dump`, `find`, `forget`, `ls`, `mount`, `restore`, `snapshots`,
`stats` and `tag` commands will now take into account multiple
`--host` and `-H` flags.
2020-02-26 22:17:59 +01:00
Erik Rigtorp 94f4f13388 Add documentation on exit status codes to man pages
This is step one to start defining useful exit codes for all the commands.
2020-02-12 23:09:26 +01:00
Daniel M. Drucker 29a5bd5b30 more accurate umount help message, for #815 2019-01-28 16:53:35 -05:00
Alexander Neumann 830511460a mount: Turn on DefaultPermissions for --allow-other`
This commit changes the logic slightly: checking the permissions in the
fuse mount when nobody else besides the current user can access the fuse
mount does not sense. The current user has access to the repo files in
addition to the password, so they can access all data regardless of what
the fuse mount does.

Enabling `--allow-root` allows the root user to access the files in the
fuse mount, for this user no permission checks will be done anyway.

The code now enables `DefaultPermissions` automatically when
`--allow-other` is set, it can be disabled with
`--no-default-permissions` to restore the old behavior.
2019-01-06 20:55:49 +01:00
Kyle Lacy cf0883e16c mount: Add "no-default-permissions" option
This option restores the previous behavior of `mount` by disabling the "DefaultPermissions" FUSE option. This allows any user that can access the mountpoint to read any file from the snapshot. Normal FUSE rules apply, so `allow-root` or `allow-other` can be used to allow users besides the mounting user to access these files.
2018-11-26 21:16:01 -08:00
Kyle Lacy a35a24b8b4 mount: Enable "DefaultPermissions" FUSE option by default
This enforces the Unix permissions of the snapshot files within the mounted filesystem, which will only allow users to access snapshot files if they had access to the file outside of the snapshot.
2018-11-26 21:16:01 -08:00
Iku Iwasa f080142137 Support NetBSD without fuse 2018-06-16 15:55:04 +09:00
Jasper Lievisse Adriaanse 96311d1a2b Add support for illumos/Solaris
This does come without xattr/fuse support at this point.

NB: not hooking up the integration tests as restic won't compile without
    cgo with Go < 1.10.
2018-03-04 20:11:29 +00:00
Alexander Neumann 97565d68a2 fuse/mount: Add option for snapshot template 2018-01-15 14:47:17 +01:00
George Armhold 1695c8ed55 use global context for check, debug, dump, find, forget, init, key,
list, mount, tag, unlock commands

gh-1434
2017-12-06 07:02:55 -05:00
Tobias Klein 02200acad0 fuse: mount and backup in parallel (#1330) 2017-10-07 11:48:48 +02:00
Shayne Holmes 9eb39cef05 Capitalize short help commands
Unify existing Cobra help command, and git-help's style.
2017-09-11 09:32:44 -07:00
Alexander Neumann 6bc43a4198 manpage: Remove auto gen tag from man page 2017-08-06 21:31:01 +02:00
Alexander Neumann 23c903074c Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
Alexander Neumann 6caeff2408 Run goimports 2017-07-23 14:21:03 +02:00
Alexander Neumann 83d1a46526 Moves files 2017-07-23 14:19:13 +02:00
Alexander Neumann b63399d606 Move things around for gb
This moves all restic source files to src/, and all vendored
dependencies to vendor/src.
2016-02-20 17:31:20 +01:00
Klaus Post fb3778abb6 Disable mount command on Windows.
FUSE does not support Windows, so we disable it on Windows.
2015-08-14 15:33:11 +02:00
Alexander Neumann dde0fd8421 Add option to use root as owner of files/dirs 2015-07-26 20:56:27 +02:00
Alexander Neumann d1629e1e4e fuse: move to top level 2015-07-26 17:20:26 +02:00
Matthieu Rakotojaona 3767eb2675 Unmount and remove directory for mount in tests 2015-07-19 23:04:18 +02:00
Matthieu Rakotojaona e44716381c Unmount when closing application from cli 2015-07-19 23:04:18 +02:00
Matthieu Rakotojaona b1426826cc Extract fuse structs 2015-07-19 23:03:33 +02:00
Matthieu Rakotojaona 0606b9884e Make file.Read more intelligible 2015-07-19 23:03:33 +02:00
Matthieu Rakotojaona 3731a94367 Use functions to create names 2015-07-19 23:03:32 +02:00
Matthieu Rakotojaona a016f82051 Fix coding style 2015-07-19 23:03:32 +02:00
Matthieu Rakotojaona e654a9659c Protect the snapshots cache with a RWMutex 2015-07-19 23:03:32 +02:00
Matthieu Rakotojaona 0e7c1668d5 Make mountpoint readable by owner only 2015-07-19 23:03:32 +02:00
Matthieu Rakotojaona 9ff98d34ef Add build and test instructions
* Don't build on openbsd
* Don't test fuse on travis
2015-07-19 23:03:32 +02:00
Matthieu Rakotojaona 1f79a19293 Comment the go trick about static verification of a struct implementing an interface 2015-07-19 23:03:32 +02:00
Matthieu Rakotojaona a8cd74ba7e Cache known snapshots instead of re-traversing the repository every time 2015-07-19 23:03:32 +02:00
Matthieu Rakotojaona c9b3eebc09 Check that mountpoints are created 2015-07-19 23:03:32 +02:00
Matthieu Rakotojaona 414ade5b3f Signal readiness of mount to potential callers 2015-07-19 23:03:32 +02:00
Matthieu Rakotojaona a6ce7d9845 Use more restic-y idioms 2015-07-19 23:03:32 +02:00
Matthieu Rakotojaona 3a82612244 Update bazil.org/fuse version 2015-07-19 23:03:32 +02:00
Matthieu Rakotojaona 32a321e51e Add simple mount command 2015-07-19 23:03:32 +02:00