Hi everyone!

I’ve recently set up a NAS running TrueNAS Scale and learning about ZFS and associated machinery. ZFS has a pretty cool feature called snapshots, which allow for a kind of version control, but for the whole file system. I set up Tiered Snapshots, which seem to be working great!

To my surprise, there didn’t seem to be an easy way to actually browse these snapshots. Yes, you can use “Previous Versions” on Windows, but I’m running Fedora at the moment, so that doesn’t help. You can also access .zfs/snapshot/ at the root of the dataset, which is fine if you know exactly which snapshot you want, otherwise it seems a bit clunky. There is also httm, which is a “CLI Time Machine” I’ve yet to learn more about, but I was looking for something a bit more graphical / browser-based.

Thus, with much hacking and vibing, the proof-of-concept Timeship was born! It has a thousand limitations and compromises for now, so I’m mostly reaching out to see if there is any interest from others on this.

If you use tiered snapshots which happen to be named similar to mine, you can try it out like this:

docker run -p 8080:8080 -v /mnt/tank/your/dataset:/mnt/:ro ghcr.io/smilyorg/timeship

For now, it has a very simple file browser, it detects and shows snapshots via the aforementioned .zfs/snapshot/ directories, allows you to preview the file system and text files at different points in time, and allows you to download a file at any snapshot.

Of course, extending it to support different ways to see the history would be nice, image preview, diffs, downloading archives of multiple files or directories, supporting histories beyond ZFS (e.g. git or borg backups), the list could go on and on. I can’t claim I’ll have the time to implement any or all of those, but you gotta start somewhere :)

What do you think? Any ideas & comments very welcome!

  • Localhorst86@feddit.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    3 days ago

    I bookmarked this post a few days ago, but only just had the time to set it up today. Installing it as a custom app on TrueNAS was very easy, if only I had known it would just be a 3 minute job :D

    I am running TrueNAS as well, and I keep snapshots for about a week. When I set up snapshots, I noticed the same issue as you: On a Linux client there seems to be no convenient way to browse these snapshots using the file manager (like “previous versions” on windows), and the only way I was able to browse snapshots was using ssh into the TrueNAS system.

    While inconvenient, I figured that’s good enough for me, I don’t really tend to accidentally delete files off my system and on the rare occasion that I do, I can just use the command line. So far, I didn’t have the need to access an earlier snapshot.

    But having a convenient way to browse the snapshots using a webUI is great, Thank you for creating this application, so far it works great as a custom application on TrueNAS, I was able to successfully browse and download files from previous snapshots :)

    Some things that can be useful, although I don’t know how easily they can be implemented:

    • When viewing a snapshot, highlight files (and possibly folders) that differ from the current state (deleted files in red, modified files in yellow, for example)
    • Downloading entire folders, that would probably require timeship to zip them up beforehand, though.
    • mlunar@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 days ago

      Hi! Thanks a lot for trying it out!

      I manage all my apps via docker compose, so I’m actually less familiar with TrueNAS apps, so I’m happy that setup was quick :) Would you be interested in contributing a short guide on the setup?

      When viewing a snapshot, highlight files (and possibly folders) that differ from the current state (deleted files in red, modified files in yellow, for example)

      Yeah, I was thinking something along those lines as well. Maybe being able to “diff” between two snapshots as well, for example to see what was changed in a snapshot compared to its predecessor. Would be cool to have file diffs as well :)

      Downloading entire folders, that would probably require timeship to zip them up beforehand, though.

      Yeah, that would be nice too. I think archiving / zipping multiple files or folders on the fly is fairly straightforward in Go, it’s just the matter of putting in the time to make it happen.

      If you have any other ideas, let me know! Or open an issue directly :)

      Some of the other things I was thinking of are just in the README roadmap, but I’ll move them to issues soon enough I guess

      • Localhorst86@feddit.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 days ago

        Would you be interested in contributing a short guide on the setup?

        I am not confident enough in my knowledge of TrueNAS apps myself to judge if my setup process is how you’re supposed to do custom apps, tbh, so i’d rather not try to contribute a guide that could potentially have other users run into trouble 😅