Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WebDAV server as alternative for fuse #485

Open
askeron opened this issue Mar 13, 2016 · 21 comments
Open

Add WebDAV server as alternative for fuse #485

askeron opened this issue Mar 13, 2016 · 21 comments
Labels
category: mount help: wanted type: discussion undecided topics needing supplementary input type: feature suggestion suggesting a new feature

Comments

@askeron
Copy link

askeron commented Mar 13, 2016

Original issue title: Add WebDAV server as alternative for fuse

Important: This is not about an WebDAV Backend.

I think the idea of using fuse to examine the backuped snapshots is great, but as some OS do not support fuse and somebody might not have enough rights to use fuse, it would be great to have an alternative.
My idea was to add a command to restic that instead of mounting the snapshots via fuse opens a local WebDAV server. As all major OS have a options to mount a WebDAV server, everybody would be able to mount the snapshots.

As I guess that it is easy to find a WebDAV serverlib for Go and you would use the same directory structure the fuse mount, it should not be too complicated to add this feature.

@fd0
Copy link
Member

fd0 commented Mar 14, 2016

Good idea, thanks for bringing it up. Before implementing this, we should investigate if it's really necessary to implement WebDAV (a rather complicated protocol), as opposed to e.g. ftp or plain HTTP.

@askeron
Copy link
Author

askeron commented Mar 16, 2016

Thanks. I also thought about HTTP and FTP, but the advantage of WebDAV would be, that you can mount it easily.

@fd0
Copy link
Member

fd0 commented Mar 16, 2016

You can easily mount an ftp server on a recent Windows: http://www.thewindowsclub.com/map-an-ftp-drive-windows

@askeron
Copy link
Author

askeron commented Mar 16, 2016

Oh cool, I did not know that. Then a FTP server is the better solution.

@askeron askeron changed the title Add WebDAV server as alternative for fuse Add FTP server as alternative for fuse Mar 16, 2016
@TobiX
Copy link

TobiX commented Mar 28, 2016

Just my humble €0.02: Please don't use FTP. It's not a simple protocol. It's an old, legacy protocol that needs to die. Even if this is only for localhost connections - FTP doesn't even define how directory listings should look. And look, there is a nice WebDAV server library for Go right here: https://godoc.org/golang.org/x/net/webdav - Using WebDAV instead of plain HTTP gives instant integration into most file managers: Windows Explorer, Apple Finder, KDE, GNOME.

@fd0
Copy link
Member

fd0 commented Mar 28, 2016

interesting, thanks for the comment

@fd0 fd0 closed this as completed Mar 28, 2016
@fd0
Copy link
Member

fd0 commented Mar 28, 2016

argh, wrong button, sorry.

@fd0 fd0 reopened this Mar 28, 2016
@stv0g
Copy link

stv0g commented Apr 3, 2016

I don't get the point.
Which major OS doesn't support FUSE?

BSDs, OS X, Linux, Windows... all of them have a FUSE driver..

(Windows for example https://github.com/dokan-dev/dokany)

@fd0
Copy link
Member

fd0 commented Apr 3, 2016

Dokan is not the same as FUSE, it's a compatibility layer around libfuse (which we do not use), I've explained it here: #361 (comment)

@wrouesnel
Copy link

wrouesnel commented Jul 30, 2016

WebDAV on Windows is finicky but it does work (in a way which is compatible with everyone else too). More important is that WebDAV gives a super-easy way to allow users to restore single files from snapshots with low setup overhead (i.e. restic web --port :8080 and then collect the repository password per-session on a local network).

@fd0 fd0 changed the title Add FTP server as alternative for fuse Add WebDAV server as alternative for fuse Sep 29, 2017
@rawtaz rawtaz added type: discussion undecided topics needing supplementary input type: feature suggestion suggesting a new feature and removed feature help: wanted labels Nov 21, 2019
@filippobottega
Copy link
Contributor

A way to mount restic backups on Windows is to use WSL2 that now is released with Windows 2004.
You can create a mount point /mnt/restic using Ubuntu for example, and see it under \wsl$\Ubuntu\mnt\restic. Then you can browse all snapshots.
This is an example:
image

@aliron19
Copy link

aliron19 commented May 29, 2020

Please, take into account that WSL2 requires Hyper-V to work, but it cannot coexist with any other hypervisor software the user may already be using (like VirtualBox, etc). So, if someone is already using VirtualBox (or any another hypervisor), they will not be able to use WSL2.

In summary, I think that WSL2 should not be taken for granted for every Windows user.

@hi2u
Copy link

hi2u commented Oct 21, 2020

It might be worth looking at how Kopia does its mounting on Windows. Looks like it does use webdav.

@PrplHaz4
Copy link

Please, take into account that WSL2 requires Hyper-V to work, but it cannot coexist with any other hypervisor software the user may already be using (like VirtualBox, etc). So, if someone is already using VirtualBox (or any another hypervisor), they will not be able to use WSL2.

In summary, I think that WSL2 should not be taken for granted for every Windows user.

To add to this, Hyper-V is not available on Home editions of Windows 10, only Windows 10 Enterprise, Pro, or Education.

@fd0
Copy link
Member

fd0 commented Nov 5, 2020

Having a second way to access the contents of the repo in a way similar to a file system becomes more important as the source code for osxfuse is not available any more and the library we're using for fuse dropped support for macOS entirely.

@technicalguy
Copy link

I'm super keen for this – is there a way I can contribute monetarily and/or might someone be able to give me some mentoring for me to attempt adding this feature? 😄

@lucasew
Copy link

lucasew commented Jan 9, 2023

Well. Fuse works but in Windows it requires winfsp, that requires admin to install. Also there is the MacOS question that the library dropped support and the limitations of using WSL2 to workaround this.

Just for viewing stuff, WebDAV, or even plain HTTP, can solve this issue for people that are using Windows or MacOS. Maybe a route in the restic server?

@askeron
Copy link
Author

askeron commented Jan 10, 2023

I'd would really, really like to get this feature. It should rather be simple to somebody who knows Go, as there are webdav-server-implementation as libraries and there is already the mount command. It should nearly as simple as connecting these two code parts and write a command for it. I even tried to learn go to build this myself, but I did not get used to it.

Here are some things I could offer to give an incentive to somebody to write this feature: I would be willing to give 100 EUR to someone who builds this feature, or instead as I am a senior developer in Java and Kotlin and my NodeJS and Docker skills are also not bad, I would offer an developer exchange, so in exchange I would work twice the time you needed for this issue on your project, or the project of your choise.

@wrouesnel
Copy link

I've banged together and locally tested another prototype of adding WebDAV support to the restic (as restic serve) as a fun exercise today. There's already another PR up which takes a similar approach but it looks like it hasn't made any progress for a while: https://github.com/wrouesnel/restic/tree/wrouesnel/add_support_for_webdav

@ducalex
Copy link
Contributor

ducalex commented Apr 2, 2024

https://github.com/wrouesnel/restic/tree/wrouesnel/add_support_for_webdav

I found a very old PR from you but none for this new prototype, is there any reason why you (seemingly) abandoned it? Because your new code seems straightforward and more importantly self-contained, so it has a decent chance of being accepted.

I have a pull request open (#4276) that allows to browse repositories in a web browser but there hasn't been much interest from maintainers. So I'd be interested in maybe finishing your work because perhaps WebDAV would gather more interest!

@wrouesnel
Copy link

@ducalex It's open source so go for it! My use-case for WebDAV. I ran the build locally for a while but the system I was using it with no longer exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: mount help: wanted type: discussion undecided topics needing supplementary input type: feature suggestion suggesting a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.