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

@SimonF Feature request:

 

Would it be possible on the send dialogue, after clicking SEND to the right of an existing snapshot, to have an override that allows one to override to a full snap send instead of whatever is defaulted (I believe at original creation time).

 

As the default selection is for snaps to be sent as incremental this would make seeding the initial snap much more intuitive IMO.

 

Thanks!

 

  • 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

Sorry if this has been asked before. I'm pretty new to all this and tried to set this up without really knowing what i was doing/getting into. After i tried to uninstall the plugin though, the backups still remain and even if i reinstall the plugin i can't delete the snapshots i made... Any ideas on how to do so? Even if i ssh into it and try to force delete i just get an error.

 

Thanks!

  • Author
12 hours ago, echoxmakerx said:

Sorry if this has been asked before. I'm pretty new to all this and tried to set this up without really knowing what i was doing/getting into. After i tried to uninstall the plugin though, the backups still remain and even if i reinstall the plugin i can't delete the snapshots i made... Any ideas on how to do so? Even if i ssh into it and try to force delete i just get an error.

 

Thanks!

run btrfs subvolume show pathname and from there you should be able to run 

 

btrfs subvolume delete /mnt/data/@some_dir-snapshot-test

11 hours ago, SimonF said:

run btrfs subvolume show pathname and from there you should be able to run 

 

btrfs subvolume delete /mnt/data/@some_dir-snapshot-test

Took me awhile to figure out that i needed to do btrfs subvolume show /mnt/disk# , but after that i was able to delete it like you said. Much thanks!

  • 2 weeks later...

If you want the verification to be executed every hour from 6 am to 8 pm, how should you write it?
If you modify "/boot/config/plugins/snapshots/subvolsch.cfg" directly
How do I modify and load new settings?
Thanks

  • Author
12 hours ago, volechen said:

If you want the verification to be executed every hour from 6 am to 8 pm, how should you write it?
If you modify "/boot/config/plugins/snapshots/subvolsch.cfg" directly
How do I modify and load new settings?
Thanks

It is not possible to have an exclusion range. 

 

a cron file it built and update_cron is called to enable. This is the code that builds the file in boot/config/plugins/snapshots/

 

    switch ($val["snapSchedule"]) {
        case "0": 
            $val["cron"] = "0 $hour2 * * $rund" ;
            break;
        case "1": 
            $val["cron"] = "$min $hour * * $rund" ;
            break;
        case "2": 
            $val["cron"] = "$min $hour * * $day" ;
            break;    
        case "3": 
            $val["cron"] = "$min $hour $dotm * *" ;
            break;    
        }
    #var_dump($val) ;
    $val['vmselection'] = implode("," , $val['vmselection']) ;
    
    $config[$sn] = $val ;
    #$config_json[$sn] = $val ;
    save_ini_file($config_file, $config);
    #save_json_file($config_file_json, $config_json) ;
    if ($config[$sn]["snapscheduleenabled"] == "yes") {
    $cron = "# Generated snapshot schedule for:$sn\n".$val["cron"]." /usr/local/emhttp/plugins/snapshots/include/snapping.php \"$sn\" > /dev/null 2>&1 \n\n"; }
    else {
    $cron="" ;
    }
    parse_cron_cfg("snapshots", urlencode($sn), $cron);

    return (isset($config[$sn][$var])) ? $config[$sn] : FALSE;
}

10 hours ago, SimonF said:

It is not possible to have an exclusion range. 

 

a cron file it built and update_cron is called to enable. This is the code that builds the file in boot/config/plugins/snapshots/

 

    switch ($val["snapSchedule"]) {
        case "0": 
            $val["cron"] = "0 $hour2 * * $rund" ;
            break;
        case "1": 
            $val["cron"] = "$min $hour * * $rund" ;
            break;
        case "2": 
            $val["cron"] = "$min $hour * * $day" ;
            break;    
        case "3": 
            $val["cron"] = "$min $hour $dotm * *" ;
            break;    
        }
    #var_dump($val) ;
    $val['vmselection'] = implode("," , $val['vmselection']) ;
    
    $config[$sn] = $val ;
    #$config_json[$sn] = $val ;
    save_ini_file($config_file, $config);
    #save_json_file($config_file_json, $config_json) ;
    if ($config[$sn]["snapscheduleenabled"] == "yes") {
    $cron = "# Generated snapshot schedule for:$sn\n".$val["cron"]." /usr/local/emhttp/plugins/snapshots/include/snapping.php \"$sn\" > /dev/null 2>&1 \n\n"; }
    else {
    $cron="" ;
    }
    parse_cron_cfg("snapshots", urlencode($sn), $cron);

    return (isset($config[$sn][$var])) ? $config[$sn] : FALSE;
}

Hello.
1. Have you created "switch.cron" under "boot/config/plugins/snapshots/"?
Have you modified the file content to "
case "0":
$val["cron"] = "0 $hour2 * * $rund" ;
break;
case "1":
$val["cron"] = "$min 6-20 * * $rund" ; // Limited to 6:00-20:00
break;
case "2":
$val["cron"] = "$min 6-20 * * $day" ; // Limited to 6:00-20:00
break;
case "3":
$val["cron"] = "$min 6-20 $dotm * *" ; // Limited to 6:00-20:00
break; "
.
2. How to call "update_cron" to enable?

  • Author
36 minutes ago, volechen said:

Hello.
1. Have you created "switch.cron" under "boot/config/plugins/snapshots/"?
Have you modified the file content to "
case "0":
$val["cron"] = "0 $hour2 * * $rund" ;
break;
case "1":
$val["cron"] = "$min 6-20 * * $rund" ; // Limited to 6:00-20:00
break;
case "2":
$val["cron"] = "$min 6-20 * * $day" ; // Limited to 6:00-20:00
break;
case "3":
$val["cron"] = "$min 6-20 $dotm * *" ; // Limited to 6:00-20:00
break; "
.
2. How to call "update_cron" to enable?

Each schedule has a cron file.

 

root@computenode:/boot/config/plugins/snapshots# cat %2Fmnt%2Fcache%2Fvol%2FnestvolSlot0.cron 
# Generated snapshot schedule for:/mnt/cache/vol/nestvol
0 */1 * * 0,1,2,3,4,5,6, /usr/local/emhttp/plugins/snapshots/include/snapping.php "/mnt/cache/vol/nestvol" "0" > /dev/null 2>&1 

root@computenode:/boot/config/plugins/snapshots# 

 

 

you run update_cron as a cmd

 

root@computenode:/boot/config/plugins/snapshots# ls /usr/local/sbin/update_cron 
/usr/local/sbin/update_cron*
root@computenode:/boot/config/plugins/snapshots# 

 

1 hour ago, SimonF said:

Each schedule has a cron file.

 

root@computenode:/boot/config/plugins/snapshots# cat %2Fmnt%2Fcache%2Fvol%2FnestvolSlot0.cron 
# Generated snapshot schedule for:/mnt/cache/vol/nestvol
0 */1 * * 0,1,2,3,4,5,6, /usr/local/emhttp/plugins/snapshots/include/snapping.php "/mnt/cache/vol/nestvol" "0" > /dev/null 2>&1 

root@computenode:/boot/config/plugins/snapshots# 

 

 

you run update_cron as a cmd

 

root@computenode:/boot/config/plugins/snapshots# ls /usr/local/sbin/update_cron 
/usr/local/sbin/update_cron*
root@computenode:/boot/config/plugins/snapshots# 

 

So I directly modified the content of "%2Fmnt%2Fcache%2FappdataSlot0.cron" as follows,
# Generated snapshot schedule for:/mnt/cache/appdata
0 6-20 * * 1,2,3,4,5, /usr/local/emhttp/plugins/snapshots/include/snapping.php "/mnt/cache/appdata" "0" > /dev/null 2>&1 "
Execute in root@computenode:/boot/config/plugins/snapshots#


/usr/local/sbin/update_cron*

 

Is this OK?

Edited by volechen

  • Author
On 2/27/2025 at 8:30 AM, volechen said:

So I directly modified the content of "%2Fmnt%2Fcache%2FappdataSlot0.cron" as follows,
# Generated snapshot schedule for:/mnt/cache/appdata
0 6-20 * * 1,2,3,4,5, /usr/local/emhttp/plugins/snapshots/include/snapping.php "/mnt/cache/appdata" "0" > /dev/null 2>&1 "
Execute in root@computenode:/boot/config/plugins/snapshots#


/usr/local/sbin/update_cron*

 

Is this OK?

Yes that should work, You may want to give it a file name that is not related as when you change something in the gui the cron file will be overwritten. Not sure if you can have schedule set to disabled in  the gui and this process will work would need to check.

 

I can look to add a custom cron value to the gui.

 

just run -> /usr/local/sbin/update_cron

  • 8 months later...

@SimonF Could you take a look at the UI of your plugin? I am currently using unRaid 7.2 and noticed that the plugin cannot be used, at least on mobile. If you significantly reduce the browser window on the desktop, you get the same behavior.

Screenshot_20251117-195115.Brave.png

@SimonF First of all, thank you very much for your plugin. This is very helpful and has already saved me a lot of work.

Nevertheless, I have a small suggestion for improvement. Most users are not really familiar with snapshots, and they don't know the difference between 'subvolumes' and 'directories'. They also have enormous problems creating the first snapshot with this plugin. For this reason, it would be useful to integrate a small wizard, that should ask which share should receive a snapshot, and where should the snapshot be stored. After this, the first snapshot should be created in the plugin automatically. Once this basic information is available, then the user can actually get along very well with the interface and its plugin.

It would be great, if you could find the time to program this wizard.

Edited by petbrau

  • 2 months later...

Am I the only one for whom the interface for Snapshots does not work at all in Unraid 7.2.3 ?

I can't see the usual options, everything is empty.

image.png

Edited by Normand_Nadon

  • 2 weeks later...
On 2/9/2026 at 10:15 PM, Normand_Nadon said:

Am I the only one for whom the interface for Snapshots does not work at all in Unraid 7.2.3 ?

I can't see the usual options, everything is empty.

@Normand_Nadon What type of file system do you have?

Do you have a Btrfs partition at least?

Does this plugin work with other UnRaid releases on your system?

Please provide us with some more information.

Edited by petbrau

On 2/18/2026 at 4:21 PM, petbrau said:

@Normand_Nadon What type of file system do you have?

Do you have a Btrfs partition at least?

Does this plugin work with other UnRaid releases on your system?

Please provide us with some more information.

Sorry for the delayed response, I somehow did not get the notification.

This plugin has worked for me on my array for several years now... partitions are BTRFS of course, and I had my snapshot creation/expiration schedules all created on that interface.

I noticed one of my drive was not getting snapshots correctly (entirely my fault, misconfiguration) but I could not manage Snapshots from that plugin's UI anymore.
I disabled the plugin for now and reverted to using a script to run the snapshots... But it is not as convenient!

Have a nice day!

  • 1 month later...

I've also noticed, that the checkboxes to show/hide docker or root volumes is gone in recent Unraid versions (because of breaking UI changes?):

image.png.4bbe319e178f7d4cfcc8391bcf07a4

Maybe the UI gets confused because of this. Anyways, I cannot maintain schedules or settings for root subvolumes anymore, it somehow tries to manage "/" instead of "/mnt/cache/" and cannot find or manipulate any configuration because of that.

grafik.png

E.g. if I hit settings here it wants to edit SubVolume "/" but it should be "/mnt/cache".

grafik.png

Besides that the scripting part that triggers snapshot creation for already existing schedules is working fine, but configuration in the UI is impossible as of now.

  • 3 weeks later...

Hi @SimonF ,

I've created a Pull Request for the issues mentioned above on GitHub. Would be nice if you find some time to have a look at it.

  • Author
8 hours ago, chli01 said:

Hi @SimonF ,

I've created a Pull Request for the issues mentioned above on GitHub. Would be nice if you find some time to have a look at it.

Thanks for the PR I will try and review over the weekend.

  • Author
On 5/7/2026 at 11:42 PM, chli01 said:

Hi @SimonF ,

I've created a Pull Request for the issues mentioned above on GitHub. Would be nice if you find some time to have a look at it.

Which version of 7.2 did you test on?

10 hours ago, SimonF said:

Which version of 7.2 did you test on?

I was testing on 7.2.5. Could you reproduce?

  • Author
21 minutes ago, chli01 said:

I was testing on 7.2.5. Could you reproduce?

I was testing 6.12, 7.1 and 7.2 for backwards compatibilty but 7.2 did not show for me. I will try again today.

It is working on 7.3 must be the package I created was not ok. I wil test for backwards compatibilty then look to release.

1 hour ago, SimonF said:

I was testing 6.12, 7.1 and 7.2 for backwards compatibilty but 7.2 did not show for me. I will try again today.

It is working on 7.3 must be the package I created was not ok. I wil test for backwards compatibilty then look to release.

Hopefully you get it working. I was just testing by replacing the installed files on the fly...

I didn't remove the existing bindings, so older Unraid version should still be fine.

Otherwise, sounds great!

  • Author
On 5/11/2026 at 10:18 AM, chli01 said:

Hopefully you get it working. I was just testing by replacing the installed files on the fly...

I didn't remove the existing bindings, so older Unraid version should still be fine.

Otherwise, sounds great!

I have release the update today, thanks for the PR.

4 hours ago, SimonF said:

I have release the update today, thanks for the PR.

Works like a charm, thanks for releasing the fix!

  • 2 weeks later...

unraid to sysnology

attribute 12 requested but not present

GitHub
No image preview

Fail to backup to a synology btrfs drive · Issue #383 · d...

Hi there! I'm trying to backup from my local workstation to a synology formated drive. Here is my btrbk conf : transaction_log /var/log/btrbk.log lockfile /var/lock/btrbk.lock snapshot_dir snapshot...

--max-errors=0

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.