Git Product home page Git Product logo

restic-browser's Introduction

drawing drawing


A simple, cross-platform restic backup GUI for browsing and restoring restic repositories.

Built with Tauri, based on leaanthony's Restoric PoC.

Older versions of the restic browser were built using Wails2. The latest release based on Wails is v0.2.6.

Download

Prebuilt binaries can be downloaded from the GitHub releases page.

Features

This is not a fullblown restic backup GUI - it only allows you to browse existing repositories!

  • Displays contents (snapshots, files) from local and remote restic repositories.
  • Dumps selected files or folders (as a zip archive) to a desired location.
  • Restores selected files or folders to a desired location.
  • Opens selected files by moving them to TEMP, then opens them with your operating system's default programs.

Screenshot

Keyboard Navigation

The UI is navigatable via keyboard shortcuts. To change the focus area, hit Tab + Shift-Tab keys.

Global Shortcuts:

  • Control/CMD + O: Open new repository

Snapshot-List

  • Arrow keys, Page Up/Down, Home/End: Change selected snapshot

File-List

  • Arrow keys, Page Up/Down, Home/End: Change selected file
  • o or Enter or Space: Open selected file or folder
  • d: Dump selected file or folder as zip file
  • r: Restore selected file or folder

Arguments

Usage

Restic-Browser [OPTIONS]

Options

-h, --help
    Print help information

--insecure-tls
    skip TLS certificate verification when connecting to the repo (insecure)

--password <password>
    password for the repository - NOT RECOMMENDED - USE password-file/command instead. (default: $RESTIC_PASSWORD)

--password-command <password-command>
    shell command to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)
  
--password-file <password-file>
    file to read the repository password from (default: $RESTIC_PASSWORD_FILE)

-r, --repo <repo>
    repository to show or restore from (default: $RESTIC_REPOSITORY)

--rclone <rclone>
    ABS path to the rclone executable that should be used for rclone locations. (default: 'rclone')

--repository-file <repository-file>
    file to read the repository location from (default: $RESTIC_REPOSITORY_FILE)

--restic <restic>
    ABS path to the restic executable that should be used. (default: find in $PATH)

-V, --version
    Print version information

System Requirements

All platforms

  • Install restic and make sure it is included in your $PATH.
    On MacOS, where setting the PATH for desktop applications is a really hard thing to do, the restic executable will also be found if it's in one of the following folders: /usr/local/bin, /opt/local/bin, /opt/homebrew/bin, ~/bin.

Windows:

MacOS:

  • macOS 10.13 or later

Linux:

  • Linux with GLIBC_2.31 or later (e.g. Ubuntu 20.04 or later)
  • WebKit2 (install via apt install libwebkit2gtk-4.0 on Ubuntu)

Development

Dependencies

  • Follow the Tauri Prerequisites Docs to install a C/C++ toolchain and Rust for your platform.
  • Make sure npm Node v18 LTS is installed.
  • Install restic and make sure it is included in your $PATH.

Note: installing the tauri CLI via cargo is not necessary. Tauri can be launched through npm (see below).

Front-end and App Development

To work in live development mode with automatic hot-reloading, run npm run tauri dev in the root directory.

Rust Backend Debugging

To debug the Tauri Rust application code, you can use the included startup tasks of vscode. If you press "F5" in vscode, the application will be built in debug mode and then started.

Building Production Packages

To build a redistributable package in production mode, run npm run tauri build in the root directory.

License

MIT license. See LICENSE for the full text.

Contribute

Patches are welcome! Please fork the latest git repository and create a feature branch.

restic-browser's People

Contributors

crash5 avatar emuell avatar jsbergbau avatar leaanthony avatar nettnikl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

restic-browser's Issues

Repository selection

Hi,

i'm using multiple restic repositories for different devices and users. Being able to use multiple repositories with different configs without having to reenter the non-secret informations would be helpful.
I would for example consider a drag down menu where currently the path is displayed, or a menu similar to the one from Lens (K8s management software).
Do you think that would help? Do you see security risks or UX issues?

Show hashsums of restorable files

Hi,

i'm sometimes interested in checking the content of a file before starting a lengthy extraction/download process. Is there a way to show hashsums of restorable files in the list similar to Mtime, Atime,...? I'm not sure, but i though the metadata of restic contains some kind of standard hashsum for each file anyways.

Ubuntu 20.04 LTS GLIBC_2.34 GLIBC_2.32 not found

Hi @emuell

This looks like an exciting project. Thanks for sharing your work.

Just reporting that when I try to run Restic-Browser on Ubuntu 20.04.4 (amd64), I get the error:

$ ./Restic-Browser
./Restic-Browser: /lib/x86_64-linux/gnu/libc.so.6: version 'GLIBC_2.34' not found (required by ./Restic-Browser)
./Restic-Browser: /lib/x86_64-linux/gnu/libc.so.6: version 'GLIBC_2.32' not found (required by ./Restic-Browser)

The version of libc.so.6 on my install is symlinked to libc-2.31.so. 😞

I suspect this will be related to wails2, so not sure how you might overcome this one. But 20.04 is a very common install base, and is supported by Canonical for another 3 years.

Damo.

rclone path on macos

I installed restic and rclone with homebrew and try to connect to a repository in onedrive.

restic-browser complains that rclone binary wasn't found in $PATH.

echo $PATH
/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/TeX/texbin:/Users/chris/.local/bin:/Users/chris/bin:/opt/homebrew/sbin:/opt/homebrew/bin

which rclone
/opt/homebrew/bin/rclone

Allow searching for files or folders in the selected snapshot

Hi @emuell

Last idea/suggestion. :)

Search functionality would be really useful for restic-browser. Initially perhaps on the path and tags, although date/time ranges could be used too. With the introduction of #29 you could use that same text box with search syntax.

Just sharing these ideas after using restic-browser for a little while now. But they are only suggestions. I fully recognise that you are likely sharing your work in case it is useful for someone else, just scratching an itch, or having some fun hacking some code. In other words, I have no expectations, and simply appreciate an opportunity to provide feedback that may help make a good idea even better.

In any case, thank-you Eduard for sharing your work. :)

Damo.

Using restore arrow does not work, but dumping file button works to restore

First thank you for the great work. Restic Browser really helps a lot when you are on windows, since there is currently no possibility to mount.

I've tried to restore a file via the back arrow. This didn't work. It outputs sucessfully restored after selecting the original folder and confirming to overwrite the file, but the file contents are still the same

grafik

grafik

Using the button dump file/folder contents, it works
grafik

Show snapshot diffs in files list

There could be a new "diff" mode, where two snapshots can be selected and the file list then shows the changes files with removed, added, changed tags.

Ideally the diff file list also should be a browsable tree and not a flat list like output of "restic diff". Unfortunately the restic diff command does not support path filtering, so the entire change list first must be queried before the changes can be shown.

Refresh repo button

Hi,

when first testing the software i opened an empty repository. The software correctly showed me an error that there was no content. Then i created a snapshot and wanted to refresh - however i had to click on open repository and "okay" again.

However, i think it would be good for the UX to allow a user to retry/refresh the repo data. No big deal, but if there is no "auto reload" on changes (which could also be considered for local repos), a refresh button would reduce 2 clicks to 1 in a situation where there is space in the UI and the expectation that the user would just want to retry.

This would also benefit the main view, where you might also want to see brand new snapshots.

Make Rustic Version

Request for a version of Restic-browser that works with Rustic.

Rustic has several features (restore --delete for example) that restic should have but doesn't for some reason.
Rustic also does not have a GUI restore just like Restic so it would be nice if there could be a "Rustic-Browser".

"failed to restore file: unknown shorthand flag 'a' in -a"

Hi! Thank you for putting together this terrific tool. It's easy to install, and robust browsing a large restic archive. I'm running Restic-Browser-v0.2.2-beta-linux, on a restic archive on Backblaze B2.

I've browsed to a directory five levels deep, backed up three years ago, and now I'm attempting to either 'view' (eye icon) or 'download' (down to disk icon) a file in that folder.

On clicking either of those icons, a red toast pops up, with the text "Failed to restore file: unknown shorthand flag 'a' in -a".

On attempting to download a file, a zero-byte file with the name of the desired file is created locally.

Is there a flag I can start the binary with, to enable logging?

Clean build artifacts

Hi,

i see that the build artifacts of the current release (https://github.com/emuell/restic-browser/releases/download/v0.2.5/Restic-Browser-v0.2.5-linux.tar.gz) do contain .DS_Store files. These do not contain any useful information. You might want to remove those from the releases.

Also, could you explain, how it gets there anyways? I see that the github actions created artifact (https://github.com/emuell/restic-browser/suites/12710716642/artifacts/697299798) does not have this issue. I cannot see the original artifact (https://github.com/emuell/restic-browser/actions/runs/3504122259/workflow), so i cannot verify if a new release would behave the same. Do you manually repack the artifacts? If so, is there a reason not to automate that?

Br!

[Request] Allow To Save/Store Repo Credentials

I'm not sure if this has been brought up before, but I'd love to not have to input my repo details every time I wanna view snapshots= contents.

Would there be a way to cache/save/store this info anywhere, and just have the repo kind of saved onto the client? If that's out of scope, then perhaps read from a file for all inputs, not just password?

I personally use Backblaze, so it's a lot of copy pasting every time.

Thanks!

Edit: Ideally you'd allow credentials to be saved for all types of repositories (local, S3, Backblaze), and allow for multiple repos to be saved too.

Small improvements

Thanks for the effort. I just run it to see how it works and have few small suggestions:

  • Panic in gui apps, generally no-go. If the restic is not in path, exiting a bit gracefully would be better. Sorry if this issue was specific to my env.
  • There is a small typo while opening repository: "respository"
  • Looks like it doesn't auto-catch the existing environment variables. This could be a nice option.

Wrong tag for release 2.6

The release 0.2.6 has been tagged as v0.26. This can be a problem for package managers, because they cannot automatically update to this new release.

[Guide] [HOWTO] [Windows] start Restic-browser with selected repository

Create batch file (*.bat)
Change path to yours restic-browser.exe

@echo off
set RESTIC_REPOSITORY=rest:http://example.repository/repo
set RESTIC_PASSWORD=PasswordToRespoitory
start "" d:\Restic-Browser.exe (Path to Restic-Browser.exe)

This batch file will start Restic Browser and connect to selected restic repository.

[Improvement] cmd argument for path to restic.exe

It would be great, if the restic-browser would look for restic.exe in its own base directory before opening the dialog to chose restic.exe manually.

Beside that, I would like to have an commandline option to start restic-browser with the path to the restic.exe like "restic-browser.exe -r.restic c:\mypersonalresticfolder\restic.exe".

Multiple selection of files

Currently it is not possible to select multiple files via pressing CTRL key and/or Shift-Key. Would be great if this can be supported.

Thank you

Thank you for 3.0 release. It is nice improvement over previous version!

Cannot connect to remote Rclone repository over SSH

I'm not able to access a repository running via Rclone on a remote server over SSH. If I select the RCLONE method, and enter the "rclone:remote-storage:bucket_name" for the Bucket, I get:

Failed to open repository: Fatal: unable to open repo at rclone:remote-storage:bucket_name: cmd.Start: exec: "rclone": executable file not found in $PATH

Normally I run it like this:

  • /usr/bin/restic --option rclone.program="ssh [email protected] rclone" --option rclone.args="serve restic --stdio --b2-hard-delete --drive-use-trash=false --verbose" --repo rclone:remote-storage:bucket_name --password-file /etc/restic/password --verbose ${@}

Maybe there's no allowance for starting the REST server over SSH and running Rclone through the tunnel? Is this the problem?

The Restic documentation for this is at Other Services via rclone.

Restic 0.15.0 support?

Hi, I tried setting up a new repository using latest restic version and when trying to browse it, I'm getting: Failed to open repository: Fatal: Fatal: config cannot be loaded: unsupported repository version.

An option (even default) for restores to extract files directly including directory structure rather than download a zip file

Hi @emuell

I had a need to restore from a backup recently. Restic-browser to the rescue. :)

But I noticed that the restore function in restic-browser drops a zip file, rather than extracting the files directly. On windows, zip files might be useful, but in a Linux environment, it is less than desirable, as I was unsure of filesystem metadata being restored properly, such as ownerships and file permissions from with the zip file. And having the intermediary zip file was also largely unnecessary for my use case. So ultimately, I resorted to the restic command line tool to do my restore.

Would you consider changing the defaults for Restic from dumping out a zip during restore to restoring the files directly?

Many thanks.

Damo.

Cloak sensitive repository path strings

Some repository paths, such as REST servers with HTTP login details, contain passwords. Currently these are displayed in the "Path" of the "Open Repository" pane and the text box at the top of the main Restic Browser window. These strings should be cloaked in the same way the "Repository Password" field is.

Does restic browser cache contents?

Ok, I have to first lay out my set up.

  • I use Windows.
  • I backup entire drives.
  • Because of point 2 all snapshots root directories are a single directory named a single char -the drive partition letter- (ie. \N\ or \E\).
  • I backup using rclone to the cloud.

I'm asking this because it takes a really long time to load a snapshot only to load the root folder, in this example lets say the directory N, and then when I double click that folder N it takes another long time to load again the contents, then if I enter another directory another wait, and in the status bar it says "Fetching Files" so all in all it seems it is not caching anything, I thought it exported the whole snapshot content to json, parsed it and then showed it, is this a bug? It's been happening forever

Add tab competition when changing root paths in file list

When navigating with restic-browser, you traverse the paths of the backup by clicking through the UI on each directory at a time. Yet, when you know exactly where you need to go, or at least a pretty good idea at the start, this makes it slow and cumbersome. This is especially true because restic-browser needs to query the repo for each directory listing along the path.

To mitigate this issue, restic-browser could include a type of url bar, or a text box in which the path can be typed, thus allowing direct navigation to a known location in the backup. For example, if you needed to restore a file located in /usr/local/bin, instead of clicking on each of those directories, and waiting for the next listing to load, you would just type: /usr/local/bin and enter.

As an extension of this suggestion, restic-browser could also include tab-completion functionality for this text entry box, so when you get to a path depth, where you are no longer confident about the next directory, you can double-tab and have restic-browser look up the deepest level typed so far, and then return a drop down list (or some other UI element) so you can choose just the next level. Think just how UNIX shells work with tab completion.

With the inclusion of these two features, you can be far more productive in navigating around a backup using restic-browser.

Again, just a suggestion for consideration.

Damien.

"Failed to fetch files" when switching between snapshots

Restic-browser version: 0.2.5, Kubuntu.
To reproduce:
Open a repo with at least two snapshots of different paths
Select a snapshot and navigate into a subdirectory
Select a different snapshot
"Failed to fetch files: no files in path /"

Only a minor issue as one can easily navigate down to a valid path, but perhaps the snapshot path drop-down menu should reset to / when switching between snapshots.

Thank you for Restic-browser, it looks like a really useful accompaniment to restic.

Caching

Something else to consider is for restic-browser to cache results when you explore the backup directory tree structure to view files. At the moment, if you return to directories you have visited already (even going back up to parent directory), the reload of the files is just as slow as the first. The delay is not trivial - at least for me and I'm working with a restic repo that is on a local disk.

It might need to be an option to enable or not, as some users may not want to cache the file listings and directory structure on disk where they are using your tool, for security/privacy reasons. They would have to endure the lag when navigating to different directories.

I do love that switching between snapshots keeps the directory view on the same directory. This is great when you need to restore a file from a particular directory, but not sure which snapshot to pull it from. Very nice! This is something that backintime does. It is a great GUI backup/restore tool to take some inspiration from.

Damo.

On ARM Mac - program cant open

Runs on Montery without any glitches, but on ARM CPU " program cant open". I wonder why this happens since normally Rosetta2 should able to handle that. Any suggestions.This isn't a security issue.

Possible redesign for navigation of snapshots and paths

If it is given, that restic-browser is focused entirely on restoration functions, then adding features that leverage the visual interface (as compared to restic command line) to make restoring easier should perhaps be prioritised.

At present, restic-browser is mimicking some of the command-line features of restic. When restic-browser could truly augment the command line tools is to make it even easier to locate the files you need to restore. To do this, I suggest a fundamental change to how restic-browser currently traverse a repository.

The current model of operation for restic-browser is that you select a snapshot, and then you navigate the directory structure of that snapshot to locate files.

This is great when you know which snapshot you need to restore from (e.g. the latest snapshot). But there will be times when you need to restore a known path, but its unclear from whence (which snapshot).

I am just highlighting that there are two dimensions to locating the files you wish to restore. When they were backed up (snapshot & tags), and where they are located (path), but restic-browser only currently supports navigating by one.

Instead, I would suggest that you can also navigate directory structures and files first, and in response, restic-browser then filters down the matching snapshots. Or more ideally, restic-browser should support mutating both inputs without resetting the other. You change either the snapshot, or the path, and the other input remains the same, thus helping you to triangulate on both dimensions to locate the files/directory to restore.

Just a suggestion for consideration. :)

D.

MacOS - Apple Silicon Build

Hey @emuell !
Thanks a lot for this project!
I suggest to build the next release as an Universal Binary or at least to add a binary compiled for Apple Silicon.
Thanks again!!

Add commandline support

Could add command line support?
To start restic-browser with repository address, password from batch file.

cancel restore

There does not appear to be a way inside restic-browser to cancel a restore once it has started?
That would be nice to have.

Performance / Speed improvement

I've got the impression, that restic-browser is quite slow in opening folders and sub-folders. Not sure how kopia or npbackup are doing this, but they are much faster.

Can something be done on the performance side?

Mistake parsing `$RESTIC_REPOSITORY` if it starts with `s3:`

When I run RESTIC_REPOSITORY=s3:s3.us-east-005.backblazeb2.com/... open -a Restic-Browser on Mac OS, restic-browser gets confused by the URL. It considers s3: to be part of the URL and fails to open it. See the screenshot (I used a fake URL for the screenshot, but a real one results in the same thing):

Screenshot 2023-12-27 at 11 38 15 PM

Fortunately, this is reasonably quick to fix if I click the "Open Repository" button and fix the URL each time.

Issue with $PATH on OSX

Thanks for this tool. I'm having an issue that I don't know how to solve (sorry if this is a basic question).

I have both restic and rclone (for the repository) in my $PATH, but when I run restic-browser it does not detect restic and asks me to manually set the path to the executable. Then, when I do that, and try to browse my rclone repository, I get an error saying rclone is not in the $PATH.

How do I fix this? I'm running MacOS Ventura btw and using zsh ($PATH is defined in the ~/.zshrc file).

Some passwords with special characters do not work

I could not connect to my repo until I changed its password to one without any special characters.

I am not sure which character causes issues as some other passwords with special characters work.

Here you are example of the password which does not work with restic browser.

a7zL4rpf3%xpmh%vsw4zw$c6oT#LfUo308uOtfxu@

It works perfectly fine with restic command line though.

Allow connecting to rclone locations

It should be possible to use "rclone" connections:
Can be implemented by adding a new "rclone" type to the "Open Repository" dialog. Doesn't need any other credentials.

wamp interference, port 80

I do web development with wamp always running, could you use an alternative port for your app?
Restic-Browser loads up localhost on the frontend and does not work when I have wamp services running.

Command Line arguments?

Is it possible to preconfigure restic-browser to open a backup repo via a command line argument? I would be nice to be able to create a shortcut that opens the application and prompts the user for a password.

Support other s3 compatible servers.

It would be great to be able to use other amazon s3 compatible providers such as OpenStack instances.
Adding a field to specify the server URL should be enough to provide this functionality.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.