Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Plugin] ZFS Auto Snapshot

Featured Replies

This plugin is a very simple to use automatic snapshot management plugin for unraid. It should work on any version since 6.12.0

instructions for use, install and go to settings and find the zfs auto snapshot plugin near bottom of the page. From there pick the datasets you'd like to automatically manage snapshots for and set a minimum amount of free space. It defaults to 100G. if the free space drops below this amount, the next time the plugin runs it'll prune old snapshots to try and get it back above this limit, so try to pick an amount and a schedule that makes it unlikely you'll run out of space before the next scheduled time to take snapshots.

Next is prefix name. The plugin will always create snapshots with this prefix, and will only ever delete snapshots with the same prefix. This prevents the plugin from deleting any manual snapshots you may have. Beware that due to how snapshots work, manual snapshots can still consume all free space and trick plugin into removing all your existing snapshots it's created. In a future version I'll try to implement some logic so that it won't delete a snapshot to free space if it'll have no effect, not counting snapshots with zero changes.

Next set a retention policy, the defaults are already prefilled and generally work good for my use case, but you can adjust them to your liking. Please note, it's highly possible you never reach your retention settings if your free space doesn't stay above your set threshold so don't be alarmed if it never reaches your retention policy. The point behind the policy is just to keep excessive numbers of snapshots from accumulating.

At this point I'd suggest enabling dry run and running a single manual run by clicking run now button. review logs for any problems.

Finally, choose your schedule! it'll convert your choice to an appropriate cron expression and update cron for you when you save it.

Note, I'm in the process of designing a snapshot manager for the next release. For now, I suggest using zfs master to manage snapshots. I'll update this message when that feature is ready.

https://github.com/bstone108/zfsautosnapshot-unraid

if you have any issues or suggestions please open an issue at https://github.com/bstone108/zfsautosnapshot-unraid/issues

install links


New features/changes, testing build. Please help me test these and report bugs found;

insured testing version always works, might be buggy, but should work.

improved snapshot handling logic. it should prune from datasets on a smarter behavior. only pruning an old snapshot if doing so would free space for the dataset with low space.

Added some logic to auto prune all snapshots with 0 changes as they serve no purpose whatsoever other than to clutter up the metadata on the drive. So if you see gaps in snapshots, that's because the gap had no changes so snapshot was pruned to keep metadata from growing and slowing down mount speed, and for readability sake when browsing snapshots.

Edited by bstone108
added new features for testing build

Tried to install this plugin and get only this:

image.png

Unraid version: 7.2.4

Clicking where the shortcut should be yields nothing...

Thoughts?

  • Author

I need a little more information from you to figure out what’s going on. What shortcut? If you’re trying to get into settings, I don’t have a shortcut set up to link straight to it from the plug-ins page yet. Once the plug-in is installed, go to your settings page and scroll down to the bottom to get into the plug-in. You will see the ZFS auto snapshot plug-in.

  • Author

In the process of cleaning up the code a bit in both release and testing. Tracking down a few minor security concerns and removing some macos leftovers. I'll publish an update shortly. there are a few security concerns but they require direct access to be exploitable. if anyone spots more issues like that please let me know. that being said I'm releasing an update right now to both branches that fixes what I've found so far. main branch doesn't have all the fixes because I don't want to break plugin for those using it, testing will have all fixes applied but it's a testing version, no idea if it works yet.

Also I've gotten a couple complaints from people that this was ai written. I want to tell you the following.. You're not entirely wrong. My original script this plugin was based on was entirely written by me. And as I'm not familiar with writing plugins and never remember to write changelog comments, i'm using ai to help guide me with the plugin writing, and dealing with those pesky comments I always forget to write. Sometimes the code is ai, sometimes it's me. I review it all and test but as I'm not a skilled programmer I do miss stuff. I learn daily, skills improve. I didn't write this plugin because I had skills or wanted something to brag about. I wrote it because there's no easy to use plugins in unraid that does the same, what we do have are over complicated for just a simple automatic snapshot tool and I needed something simple for a friend.

Contributors with more skill than me [of which that would be most] are greatly welcome aboard if they want to help improve this project. it's a work in progress.

1 hour ago, bstone108 said:

I need a little more information from you to figure out what’s going on. What shortcut? If you’re trying to get into settings, I don’t have a shortcut set up to link straight to it from the plug-ins page yet. Once the plug-in is installed, go to your settings page and scroll down to the bottom to get into the plug-in. You will see the ZFS auto snapshot plug-in.

My sincere apologies. This is entirely on me for not thoroughly reading the clear/simple instructions. I was on auto-pilot and went to \plugins expecting to click the name of the plugin to get to config options. Going to \settings and finding it there works as expected. I will continue setup and testing as time permits. Thank you for developing this plugin. It is sorely needed...

  • Author
Just now, Green Dragon said:

My sincere apologies. This is entirely on me for not thoroughly reading the clear/simple instructions. I was on auto-pilot and went to \plugins expecting to click the name of the plugin to get to config options. Going to \settings and finding it there works as expected. I will continue setup and testing as time permits. Thank you for developing this plugin. It is sorely needed...

no problem! while it's not pretty, it's functional! let me give you a bit of advice though. Set your run frequency and retention policy to something sane. If you keep too many snapshots you'll notice mount time on your zfs pools gets very slow. If you notice this, just dial back the retention policy and give plugin a bit to do cleanup on it's next run. Please note, on a massive cleanup that takes longer than your next scheduled run, it'll skip that snapshot since plugin is still busy. So don't panic if a big policy change causes a few skipped snapshots.

  • Author

one change I'm working on for sanity sake to keep snapshot count from going crazy is to impliment some logic to delete all snapshots that have 0 changes. no point in keeping references to data that never changed anyway.

  • Author
17 hours ago, Green Dragon said:

Tried to install this plugin and get only this:

image.png

Unraid version: 7.2.4

Clicking where the shortcut should be yields nothing...

Thoughts?

this has been fixed! thanks! fix is currently in the testing build. it'll be pushed to main once I'm happy with it.

Edited by bstone108

9 hours ago, bstone108 said:

no problem! while it's not pretty, it's functional! let me give you a bit of advice though. Set your run frequency and retention policy to something sane. If you keep too many snapshots you'll notice mount time on your zfs pools gets very slow. If you notice this, just dial back the retention policy and give plugin a bit to do cleanup on it's next run. Please note, on a massive cleanup that takes longer than your next scheduled run, it'll skip that snapshot since plugin is still busy. So don't panic if a big policy change causes a few skipped snapshots.

Got it installed and configured. Initial look is good! I'll run defaults as they are fine for me. Thanks for the advice and the plugin. Like I said earlier, its long overdue!

8 hours ago, bstone108 said:

one change I'm working on for sanity sake to keep snapshot count from going crazy is to impliment some logic to delete all snapshots that have 0 changes. no point in keeping references to data that never changed anyway.

At least an option to do so! Maybe not even write them to begin with? Great work!

Edited by Green Dragon

  • Author

snapshots always have zero changes when written. It’s the current state of your storage. If nothing new is written to your storage by the time the next snapshot is taken then it will remain at zero. That’s why you can’t prevent them in advance.

Edited by bstone108

  • 4 weeks later...

Unfortunatly the plugin is not working for me at all. Saving settings after selecting datasets shows a blank screen and doesn't save any setting. Also it doesnt support themes properly, see screenshots. Using Unraid 7.2.4

Screenshot 2026-03-27 at 22.35.25.png

Screenshot 2026-03-27 at 22.36.33.png

Edited by The_Kief

  • Author

I will be honest with you, I have absolutely no idea how to support themes. So that update might take me quite a while to figure out.

7 minutes ago, The_Kief said:

Great work on this plugin, but it doesnt support themes properly, see screenshots

Screenshot 2026-03-27 at 22.35.25.png

Screenshot 2026-03-27 at 22.36.33.png

Fast reply, thx!. I was still editing my post since I've noticed Saving settings doesn't work (Tried it on the default white theme, becasue that is readable). After pressing save it shows a blank screen.

Edited by The_Kief

  • Author

that's odd... it should work if you have valid information entered. are you missing a field? please select a dataset, set your retention policy if you don't want the default, and set a schedule and hit save. it shouldn't show a blank screen, it should show success unless your theme editor is sabotoging things, which means this is a much more critical fix lol. what theme editor are you using?

  • Author

please go back into the plugin, see if it actually saved anything, and switch to the debug log and see if anything is displayed there.

  • Author

I'm crawling the code now, I'm betting both the issues are related. So if I can fix the theme issue it'll probably fix the other.

Already did, it did not save anything, debug log is emty. And cannot run it before saving because then it gives a error that no datasets are selected. Also no errors shown in network log of developer tools in browser.

I hope so, because the plugin sounds promising ;)

Edited by The_Kief

  • Author

I think I found problem, I'm building a test copy and will reply here if test is successful. keep eye out for my update. shouldn't take long

  • Author

are you on the testing build or the release build? just wondering which one you installed cause if it's testing I'll push it there first so you can test. if it's release, then I'll just have to be extra careful.

I was on the main build, but i've installed the test build now (same behavior)

Edited by The_Kief

  • Author

ok mostly fixed, but I got a bug with the save button becoming unavailable after used once until you refresh page. fixing that now.

  • Author

evil button, still working on it

haha no problem, take your time, proper testing is also important ;). I will check in tomorrow or later.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.