borgbackup / borgweb

Web UI for Borg Backup
https://borgweb.readthedocs.io/en/latest/
Other
351 stars 40 forks source link

borg mount for easy restores #103

Open ThomasWaldmann opened 7 years ago

ThomasWaldmann commented 7 years ago

not a daily task, but it may happen if the admin is away and it would be nice if users could help themselves: restore some files they lost / they want to restore to an earlier version.

borg mount offers quite easy access for users who can access it and deal with a file manager or other tools to locate the data they want.

access / permissions need to be carefully dealt with - likely a user should not get access to files they usually would not be able to access.

same-system borg mount - uid/gid/permissions apply (but ACLs are not implemented via FUSE).

different-system borg mount - difficult, uid/gid often does not match.

so, guess the easiest thing that could work is an optional mount/unmount button that just executes a pre-configured mount / unmount command.

Note: borg mount locks the repo, so it can't be mounted permanently.

perguth commented 7 years ago

Maybe look into this in rl?

perguth commented 7 years ago

Ok, we do in version 1:

henfri commented 6 years ago

Hello, in the sense of "timemachine" it would be very useful to have a slider in the GUI with "Time" on the axis. If the slider is moved, the date of the mounted backup is changed.

Greetings, Hendrik

ThomasWaldmann commented 6 years ago

@henfri this is somehow "pie in the sky", especially if there is no idea how to in fact implement that (and also considering the limited developer resources we have for this).

henfri commented 6 years ago

Maybe I do overlook the complexity, but I thought of: -List the Backup-Sets -Generate Timeline from min to max -Add ticks where a Backup exists -Unmount and Remount a specific set, when the slider is moved

ThomasWaldmann commented 6 years ago

mount is potentially expensive (when mounting a single archive or with versions view), so not quite as quick as one would expect for a slider dragged by mouse.

also, what's the use case? if you search for a specific version of a file, the versions view is better and you don't need a slider then anyway.

henfri commented 6 years ago

This shows the usecase quite well: https://www.youtube.com/watch?v=h3osFFNulAQ I know that mount takes a while. But all options we have today are slower, I would say.

I am open for other suggestions. But browsing an archive for the version of the file that was 'still ok' without knowing when it went bad today is not very nice.

ThomasWaldmann commented 6 years ago

borg 1.1 mount's versions view is best to find a specific version of a file, without umounting / mounting all the time.

ghost commented 6 years ago

I liked a lot this approach on bup, would be easy to do that (serve files in plain http)?

https://github.com/bup/bup/blob/master/Documentation/bup-web.md

ThomasWaldmann commented 6 years ago

@pedro-nonfree not sure I like that:

Exposing a "borg mount" via samba seems more appropriate, but even there we still have an ACL issue (besides the usual uid/gid mapping issues).

ghost commented 6 years ago

running network server processes opens up a whole category of potential security issues.

by default localhost:8080, but putting 0.0.0.0:8080 is dangerous yes, as it says: https://github.com/bup/bup/blob/master/Documentation/bup-web.md

(but you can listening on a particular interface where only for a particular restricted LAN, VLAN, VPN)

I didn't try borgweb yet, if it has auth, less problems on exposing stuff

also, http is not very nice for dealing with more than single/few files. how to deal with permissions / ACLs?

I see it handy for a quick browsing experience (to see what's the path for the recovery for example, what snapshots I have, what files I stored), or to just download one or two files (and/or do a fast preview of file). In that cases content is more important than ACL stuff

tried borg mount on /mnt and yes, it does same way as bup web but as a filesystem (two snapshots Test1 and Test2):

root@host:/mnt# ls -la
total 4
drwxr-xr-x  1 root root    0 Dec 11 20:03 .
drwxr-xr-x 23 root root 4096 Oct 19 18:10 ..
drwxr-xr-x  1 root root    0 Dec 11 20:03 Test1
drwxr-xr-x  1 root root    0 Dec 11 20:03 Test2

so meanwhile/right now, after mounting burp backup I can do: python -m SimpleHTTPServer to expose through the web

I'm just sharing what is useful for me.