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] Snapshots

Featured Replies

  • Author
20 hours ago, aim60 said:

That would be great.  Thanks

Added option in 2022,08..05

  • 3 weeks later...
  • Replies 275
  • Views 54.9k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • primeval_god
    primeval_god

    Snapshots are not "based on a previous snap" they are a Copy on Write copy of a subvolume. For the purpose of restoration there are no dependencies between them, (all of the data sharing stuff is hand

  • Best way to restore (so that you can keep doing the incremental backups) is to send/receive the backup to the destination where you do the original snapshots on that volume, then create a new read/wri

  • In any case I would still recommend creating shares as subvolumes, to make things cleaner, and for the plugin to work.

Posted Images

Hi - I'm quite tech savvy but please could I get a retards explanation of how this works?

 

Does it only take snapshots of a specific share not the whole drive or is the sub-volume just the place it stores the snapshots of that drive?

 

I've created 3x subfolders on each drive & run a snapshot but if I browse the share manually there's nothing in it other than empty folders?

 

Thanks

Edited by dopeytree

1 hour ago, dopeytree said:

Hi - I'm quite tech savvy but please could I get a retards explanation of how this works?

 

Can you expand on what you mean (what the "this" part is)? How the plugin works, or snapshots? Or maybe the filesystem itself and how snapshots work within that filesystem? Not sure.

 

If you're unfamiliar specifically with advanced filesystems, or just havent worked with them previously, the first post in the zfs plugin support page has some handy reference links towards the bottom that should help as a primer.

  • Author
5 hours ago, dopeytree said:

Hi - I'm quite tech savvy but please could I get a retards explanation of how this works?

 

Does it only take snapshots of a specific share not the whole drive or is the sub-volume just the place it stores the snapshots of that drive?

 

I've created 3x subfolders on each drive & run a snapshot but if I browse the share manually there's nothing in it other than empty folders?

 

Thanks

This only works with BTRFS subvolumes or drives that are formatted to BTRFS. You create as many subvols(Dir) as you want, each can have a snapshot schedule set, but creates on the same disk. Send function can be used to transfer to another disk/pool or another machine and supports incrementals.

 

 

  • 1 month later...

Thanks for this great plugin :D

 

In order to create snapshots I'm converting some of my "Cache: prefer" shares to subvolumes in the cache pool (which is btrfs, my array is XFS), but now I wonder if this may interfere with Mover.

 

I don't _think_ it'll be an issue, but am interested in hearing if my reasoning is correct.

 

When the cache fills up, Mover will eventually move data from the cached shares to the array. These files will (obviously) not be snapshotted anymore, but this won't be an issue because my whole goal with snapshotting is for backing up those shares to the array anyway.

 

The only issue I can foresee is Mover somehow having an issue with subvolumes in general that I'm not aware of?

20 minutes ago, robertklep said:

Cache: prefer

These are not moved to the array. 

 

22 minutes ago, robertklep said:

subvolumes in the cache pool

Unclear, do you mean other shares? They would need to be cache:yes to get moved 

12 minutes ago, trurl said:

These are not moved to the array. 

 

Hmm perhaps I misunderstood how "Cache: prefer" works (only installed Unraid a few days ago), but I thought that if the cache pool fills up, eventually files gets moved to the array?
 

12 minutes ago, trurl said:

Unclear, do you mean other shares? They would need to be cache:yes to get moved 


No, I meant subvolumes. I would think that those look like regular directories to Mover and hence won't be problematic.

To give a bit more background: I have an `appdata` share which is set to "Cache: prefer". On my cache pool mountpoint (`/mnt/nvme-cache/`) I converted it from a regular directory to a subvolume so I can snapshot it.

Just now, robertklep said:

I thought that if the cache pool fills up, eventually files gets moved to the array?

Not quite.   If the cache pool fills up then NEW files overflow to the array (and are later moved to the cache if space becomes available).  Files already on the cache are left there.

Just now, robertklep said:

perhaps I misunderstood how "Cache: prefer" works

You did. Prefer means prefer to keep the files on cache, and if any are on the array, move them to cache.

 

1 minute ago, robertklep said:

I meant subvolumes

Still don't know what you mean. If you mean subfolders, any folder at the top level of array or pool is automatically a user share.

6 minutes ago, trurl said:

You did. Prefer means prefer to keep the files on cache, and if any are on the array, move them to cache.

 

Ah thanks for the explanation! (you too, @itimpi)

Which makes my whole question moot, so I won't bother you with any more details :)

  • Author
1 hour ago, robertklep said:

 

Ah thanks for the explanation! (you too, @itimpi)

Which makes my whole question moot, so I won't bother you with any more details :)

Dont forget to check the shares after you re create as subvol as you may need to set as cache prefer after you recreate

1 minute ago, SimonF said:

Dont forget to check the shares after you re create as subvol as you may need to set as cache prefer after you recreate

 

Good to know (although in my case the correct cache settings were kept) 👍🏻

 

One other question: there's no option to run a script after a scheduled snapshot has been created, is there? Ideally I'd like to create a symlink that points to the latest snapshot.

  • Author
1 minute ago, robertklep said:

 

Good to know (although in my case the correct cache settings were kept) 👍🏻

 

One other question: there's no option to run a script after a scheduled snapshot has been created, is there? Ideally I'd like to create a symlink that points to the latest snapshot.

No not at present.

Just now, SimonF said:

No not at present.

 

No problem, I can run a user script for that 😊

  • 3 weeks later...

Hey guys, i noticed, that my automatic snapshots arent working anymore. I get the following error in the logs
 

snapshots: btrfs subvolume snapshot -r '/mnt/cache/lxc/AMP' ' /mnt/cache/snaps/AMP-20221028170521' Error  ERROR: not a btrfs filesystem:  /mnt/cache/snaps

/mnt/cache/snaps is the folder i use for the snapshots to store. That directory was working once, but now it doesnt anymore. It is on my cache, which is 100% a btrfs filesystem, and even if it where on my array, thats btrfs aswell, so shouldnt matter.
I already tried to recreate the share normally and also created it as a subvolume. Both times i can see it in my cache, but it still doesnt work.

That's very strange, and the snaps folder doesn't need to be a snapshot, please post the output of :

btrsf sub list /mnt/cache

If it's very large you can attach it as a txt file.

33 minutes ago, JorgeB said:

That's very strange, and the snaps folder doesn't need to be a snapshot, please post the output of :

btrsf sub list /mnt/cache

If it's very large you can attach it as a txt file.

You have a typo in your command and i had to filter out docker subvolumes, but here is the output

grafik.png

That looks normal, sorry, no idea what it could be, never seen a similar issue before.

Try a snapshot from /mnt/cache/lxc/AMP to another folder or snapshot another subvolume do the snaps folder to see if they all give the same error.

54 minutes ago, Joly0 said:

Hey guys, i noticed, that my automatic snapshots arent working anymore. I get the following error in the logs

snapshots: btrfs subvolume snapshot -r '/mnt/cache/lxc/AMP' ' /mnt/cache/snaps/AMP-20221028170521' Error  ERROR: not a btrfs filesystem:  /mnt/cache/snaps

You have a leading space in the path to `/mnt/cache/snaps` 😅

Edited by robertklep

4 minutes ago, robertklep said:

You have a leading space in the path to `/mnt/cache/snaps` 😅

Wait. Wat??.... You are right... How on earth did this happen???
Thats quite awkward, i am certain i havent changed anything regarding the path, as i havent changed it since setting this up half a year ago.

Well, thx

This plugin is super useful but man do I wish someone would make a video describing the ins and outs, benefits and pitfalls.

Is there any way to smoothly migrate from this script?

 

I already have hourly snapshots since March 2021 so it's a lot of.

Wow, just found this plugin and I just want to say that it looks AMAZING!

 

Gonna turn off my plugin script and try this plugin out!

 

A few things as a first time user and a prior user of the script method that stand out to me, just in the order I am finding them while exploring.

 

1: The ability to convert a folder to a subvolume in the GUI would be very nice

 

2: Easy button to delete all snapshots from a drive / everything with 1 button, for example when needing to free up space on a share/drive you have to remove all snapshots with the deleted data to get the space back. Manually clicking hundreds of snapshots is not really an easy option lol.

 

The easiest option for this would be an extra checkbox at the "root snapshots folder" where it is blank now.

 

3: Along the same lines as above, easy button to take snapshot of everything at once on demand would be fantastic

 

4: while trying to setup everything from scratch I desperately could use a way to apply settings to multiple volumes at once. Maybe like the way it is done in the shares section of unraid? Or at least some "global" options that could use some generic relative options like {SUBVOLUMENAME} in the path that could use the same relative paths for all the snapshots.

 

For example I find I prefer my snapshots in the root dir under the same snapshot dir ordered by date.

 

EG

/mnt/cache/.snapshots/Snap-{D-m-d-Y}/temp

/mnt/cache/.snapshots/Snap-{D-m-d-Y}/data

/mnt/cache/.snapshots/Snap-{D-m-d-Y}/pictures

 

and the same structure for all drives.

 

5: Ability to save all subvolumes of a particular drive under the same snapshot folder like the script did. easier to sort through a bunch of dated folders to find the snapshot you want and then drill down then having to see all the subvolumes listed for each snapshot. Means a ton of folders to sort through.

 

6: How does the send snapshot work? I am guessing this is for backup purposes to send the updated data to another drive / server? I knew this was possible but never looked into it. It would be super cool if the plugin could be expanded to include a backup section that would make backups a simple process of connecting an unassigned drive, mounting it and then sending over the snapshots, verifying they are correct etc. This would save a ton of time and make backups way smoother.

 

Gonna keep using the script for the time being I think, kinda daunting to go individually edit all the hundreds of subvolumes manually to set everything up.

 

Keep up the good work, this was the biggest shock to me when moving to unraid, the lack of any kind of snapshot system!

  • Author
59 minutes ago, TexasUnraid said:

Wow, just found this plugin and I just want to say that it looks AMAZING!

 

Gonna turn off my plugin script and try this plugin out!

 

A few things as a first time user and a prior user of the script method that stand out to me, just in the order I am finding them while exploring.

 

1: The ability to convert a folder to a subvolume in the GUI would be very nice

 

2: Easy button to delete all snapshots from a drive / everything with 1 button, for example when needing to free up space on a share/drive you have to remove all snapshots with the deleted data to get the space back. Manually clicking hundreds of snapshots is not really an easy option lol.

 

The easiest option for this would be an extra checkbox at the "root snapshots folder" where it is blank now.

 

3: Along the same lines as above, easy button to take snapshot of everything at once on demand would be fantastic

 

4: while trying to setup everything from scratch I desperately could use a way to apply settings to multiple volumes at once. Maybe like the way it is done in the shares section of unraid? Or at least some "global" options that could use some generic relative options like {SUBVOLUMENAME} in the path that could use the same relative paths for all the snapshots.

 

For example I find I prefer my snapshots in the root dir under the same snapshot dir ordered by date.

 

EG

/mnt/cache/.snapshots/Snap-{D-m-d-Y}/temp

/mnt/cache/.snapshots/Snap-{D-m-d-Y}/data

/mnt/cache/.snapshots/Snap-{D-m-d-Y}/pictures

 

and the same structure for all drives.

 

5: Ability to save all subvolumes of a particular drive under the same snapshot folder like the script did. easier to sort through a bunch of dated folders to find the snapshot you want and then drill down then having to see all the subvolumes listed for each snapshot. Means a ton of folders to sort through.

 

6: How does the send snapshot work? I am guessing this is for backup purposes to send the updated data to another drive / server? I knew this was possible but never looked into it. It would be super cool if the plugin could be expanded to include a backup section that would make backups a simple process of connecting an unassigned drive, mounting it and then sending over the snapshots, verifying they are correct etc. This would save a ton of time and make backups way smoother.

 

Gonna keep using the script for the time being I think, kinda daunting to go individually edit all the hundreds of subvolumes manually to set everything up.

 

Keep up the good work, this was the biggest shock to me when moving to unraid, the lack of any kind of snapshot system!

Thanks for the feedback will look over weekend

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.