[Plugin] Snapshots


Recommended Posts

Btw, is it possible to set a custom schedule for snapshots or maybe some more pre-defined schedules, like half an hour or every 15 minutes or so?

Something like znapzend for zfs would be great. With tiered snapshots, like 1 snapshot every 10 minutes which last for 2 days, then a snapshot every hour which lasts for 1 month or so?

Link to comment
13 hours ago, Peter Braun said:

Have any of you noticed that the automatic deletion of snapshots has recently stopped working?
I use the latest version of "snapshots" 2022.06.17a and unraid 6.10.3

image.png.28fbf3a94093c123458dae7da6dd7df4.png

 

This is fixed in release 2022.06.25

Link to comment

thanks for this great plugin,   I used to manually create subvol on each disk for my share, then do the snap via script;  I played this plugin yesterday,  it works well and below is my findings

1.  when you click the button to create the snapshot, it will allow you to select to create a read-only snapshot,  but there is no such selection in schedule setup

2.  I had though the read only selection on the page is the option used for snapshot, but actually it is not,  when you select it,  it actually will put the whole user share to read-only, it is better to have a remind here, or it will surprise people  

image.thumb.png.b8f4bc16756d7977613e67a959042728.png

 

Link to comment
5 hours ago, trott said:

1.  when you click the button to create the snapshot, it will allow you to select to create a read-only snapshot,  but there is no such selection in schedule setup

Scheduled snap shots are read only as needs to be to allow sends, Users can change via the gui.

 

For point 2 I will look to add a confirmation pop up if they are setting a subvolume to read only

 

Thankyou for your feedback appreciated. 

Link to comment

the btrfs send in schedule setup is not working, log as below, it might because I select snap send incremental, but it is the first time the schedule run and no snapshot has been created before:

 

Jul  2 10:51:47 Tower snapshots: btrfs subvolume snapshot -r '/mnt/ssd/backup/wei' '/mnt/ssd/.snapshot/wei_20220702105147.daily' OK  Create a readonly snapshot of '/mnt/ssd/backup/wei' in '/mnt/ssd/.snapshot/wei_20220702105147.daily'
Jul  2 10:51:47 Tower snapshots: btrfs snapshot send -p / /mnt/ssd/.snapshot/wei_20220702105147.daily To /mnt/disk10/.snapshot/ Error  ERROR: empty stream is not considered valid

 

screenshot of the setting:

image.thumb.png.ef64a66ef15b9d276a3bff3eb304537c.png

Edited by trott
Link to comment
5 hours ago, trott said:

the btrfs send in schedule setup is not working, log as below, it might because I select snap send incremental, but it is the first time the schedule run and no snapshot has been created before:

 

Jul  2 10:51:47 Tower snapshots: btrfs subvolume snapshot -r '/mnt/ssd/backup/wei' '/mnt/ssd/.snapshot/wei_20220702105147.daily' OK  Create a readonly snapshot of '/mnt/ssd/backup/wei' in '/mnt/ssd/.snapshot/wei_20220702105147.daily'
Jul  2 10:51:47 Tower snapshots: btrfs snapshot send -p / /mnt/ssd/.snapshot/wei_20220702105147.daily To /mnt/disk10/.snapshot/ Error  ERROR: empty stream is not considered valid

 

screenshot of the setting:

image.thumb.png.ef64a66ef15b9d276a3bff3eb304537c.png

You need to have a seed snap shot sent first. I normally do that manually when testing.

Edited by SimonF
Link to comment
  • 2 weeks later...
24 minutes ago, autumnwalker said:

Will there be a capability to snapshot a running VM in future (without shutdown / suspend)?

There is*, but note that the OS will be in a crash consistent state, i.e., if you restore that backup it would be like if the plug was pulled, I take daily snapshots with the VMs running but also try to at least once a week create a snapshot with the VMs off/hibernating, this way I have more options.

 

* Edit to add - not sure if the plugin supports that, but it's possible with btrfs snapshots.

Link to comment
2 hours ago, autumnwalker said:

This looks like an intersting option for VM snapshots! Will there be a capability to snapshot a running VM in future (without shutdown / suspend)?

If you setup disks in a subvolume and dont specify a vm and action it will snapshot the image while vm is running.

 

I am planning of looking at external qemu snapshots in the future.

Link to comment

I have only looked into it briefly so far. But my understanding is that the original drive can be either, but when the snapshot is taken a a new qcow2 file will be created using the existing file as a RO backing store. This will be for external snapshots. Unlikely I will use internal but these require qcow2 disks.

 

https://fabianlee.org/2021/01/10/kvm-creating-and-reverting-libvirt-external-snapshots/

 

https://blog.programster.org/kvm-external-snapshots

Link to comment

Thanks for this great plugin.  I have always found managing snapshots manually to be challenging.

 

I am in the process of reorganizing my manual snapshots to be usable with the plugin, so the what is in the attachments is somewhat of a mess.

 

On my cache drive, the important folders that needed to be backed up were subvolumes.  Some time ago, when I needed to replace the drive, I created snapshots and send-received them to a backup drive.  I then replaced the drive and send-received them back, and made them read/write.

 

The folders that were restored with send-receive (appdata, domains, isos, nospin) do not show up in the plugin as subvolumes.  In fact they don't show up at all, so I have no way to use the plugin to continue to snapshot them.

 

Please help.

 

btrfs sub list /mnt/cache

ID 258 gen 16897694 top level 5 path nospin
ID 260 gen 16897704 top level 5 path appdata
ID 270 gen 16897705 top level 5 path domains
ID 314 gen 16838685 top level 5 path isos
ID 961 gen 16897705 top level 5 path system
ID 3568 gen 16750283 top level 5 path .snapshots/nospin/nospin-old
ID 4657 gen 16750119 top level 5 path .snapshots/isos_20220711142307
ID 4658 gen 16750119 top level 5 path .snapshots/isos_20220711143028
ID 4659 gen 16750283 top level 5 path .snapshots/appdata/appdata-old
ID 4660 gen 16750283 top level 5 path .snapshots/domains/domains-old
ID 4661 gen 16750283 top level 5 path .snapshots/nospin/nospin-new
ID 4662 gen 16750283 top level 5 path .snapshots/appdata/appdata-new
ID 4663 gen 16750283 top level 5 path .snapshots/domains/domains-new

102145333_SnapshotCache.thumb.PNG.c6e3785939d2b62c8976e92af6417cbc.PNG

Edited by aim60
Link to comment
26 minutes ago, aim60 said:

Yes, but no settings widget.  And its in the debug tab.

1841789473_SnapshotCache2.thumb.PNG.22d5c99837cf15f6acde995b60a473bf.PNG

debug.txt 419.97 kB · 2 downloads

Can you provide me the output of

 

btrfs subvolume list  -puqcgR /mnt/cache

btrfs subvolume list  -spuqcgR /mnt/cache

btrfs subvolume list  -s /mnt/cache

btrfs subvolume list -opuqcgR /mnt/cache

 

also do they should if you toggle show docker as I see you are using a docker folder.

 

image.png.e9692be285cbbcb58850da8f19f84f2f.png

Link to comment
28 minutes ago, SimonF said:

Can you provide me the output of

 

btrfs subvolume list  -puqcgR /mnt/cache

btrfs subvolume list  -spuqcgR /mnt/cache

btrfs subvolume list  -s /mnt/cache

btrfs subvolume list -opuqcgR /mnt/cache

 

also do they should if you toggle show docker as I see you are using a docker folder.

Toggling show docker doesn't change anything about the subvols in question

btrfsSubListOutput.txt

Link to comment

@SimonF, not sure if this simplifies your troubleshooting:

 

Test done on 6.9.2

 

btrfs sub create /mnt/cache/test1

  The subvol shows up correctly in the plugin.  You can go into settings for the subvol, and create a snapshot of it.

btrfs sub snap /mnt/cache/test1 /mnt/cache/test2

  The only option in the plugin is to send the snapshot

Edited by aim60
Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.