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
Mount backups as real folders #3081
Comments
If you use the local database, each directory listing is just a database lookup, so it should be reasonably fast. Reading file contents is another problem, because you will only get one file request at a time, and Duplicati's format expects you to do a batch |
If its as slow as the folder listing when restoring a backup, it is going to be slow (But I still don't care). Your idea of using the local database looks promising, at least for browsing the files. In the worst case, is it possible to do a batch and then discard the information not needed? We could then add caching afterwards. |
There was a big improvement after the beta, so if you have not upgraded to the latest canary build, you can try that. Otherwise, it should be possible to make a faster folder listing, and I hope to get working on a restructure of the paths in the database, which would make it really fast. |
At the moment, I see the following possibilities:
I like Python for the simplicity of the fusepy API, but I kind of dislike the code duplication between C# and Python. I didn't have a look at the code yet, but here are a few questions:
|
Fuse on Windows is not working that great, but I tried this a few years ago: I am not sure what can be done in terms of cross-os FUSE if that is your target. I have used the Python-fuse library (beware there are two incompatible version of libfuse), and it works great and is really simple to use. I try to write as much as possible in C# as it find that it is slightly slower to write (compared to Python) but performs better and is much easier to maintain later on (static types FTW). One nice thing about Python is that it is simple to integrate with external stuff, so maybe the solution is to write a fuse-layer in Python and then have a C# Mono is generally a bit slow to start, and on Windows process spawning is slow, so you would want something that you can start, and then feed commands (.e.g. use stdin/stdout).
There is a server, but that requires a process that is running somewhere. It could be done this way, but I prefer a new client that exposes the functionality needed for fuse.
Either download the |
I'm targetting Linux only for the moment, porting will come later (eventually). I really like the
Here's all the functionality the module must implement:
This might be done by the command-line application too, but is optional. I'd like to know which of those can actually be made through the local database and which SQL queries do this. |
I think this helps in understanding the database layout: The "fileset" table contents are essentially a snapshots. There is no file-data in the database, only metadata, so you cannot read files directly. |
Is there any progress on this topic? |
Borg Documentation provides some high-level description. Below that, internals are probably too different from Duplicati.
Filesystem in Userspace (Wikipedia) gives general concept.
https://github.com/libfuse/libfuse
So if you start at the original post then read down, the challenge has been supporting all the systems Duplicati supports.
Open File from History/See File Content is a feature request similar to this that sounds more portable (uses the browser). |
@ts678 Well, RClone mount is cross-platform. Uses FUSE, too and for Windows it uses WinFsp, works great! |
Thanks for the revised suggestion and the personal testimonial about its reliability. There is still a portability issue on the Linux side which a developer would need to look into. Duplicati is almost entirely portable because C# code is interpreted by .NET Framework (Windows) or mono (Linux, FreeBSD, Mac, maybe more). The rclone Downloads come in seven processor architectural build flavors. Duplicati does not currently build processor specific flavors. It does package that code or a subset of it in different package formats. There was one recent portability exception that is already producing complaints: Tardigrade: Support ARM architectures [$5] #4342. The future of Duplicati (subject, as always, to developer availability) is with new flavors of .NET which replace existing tools. This may cause Duplicati to similarly ship in multiple architectures, because the idea of self-contained executables has appeal, aside from that. Possibly when/if Duplicati is a self-contained executable built for different architectures, one can either get to a preinstalled system FUSE shared library or link in a static one, but this is too hazy for me to comment on. Perhaps an appropriate expert will stop by... See Net 5 migration #3124 which seems to be slowing. Developer time is scarce. Without volunteers, things tend not to happen... |
At the current point, there is no good way to have a look at the backups made. My idea is to change this by writing a FUSE module for the backup format. Here's how using it could look like:
Obviously, this will be read-only and very (very) slow. But if you want to do a manual partial restore or just run a script or make a diff to the original, this will come in very handy.
The text was updated successfully, but these errors were encountered: