jonmatifa / zfsmanager

ZFS administration tool for Webmin
Other
108 stars 22 forks source link

Sort snapshots by creation date #19

Open Jip-Hop opened 6 years ago

Jip-Hop commented 6 years ago

This plugin is awesome. I love a complete overview like this. Easily the best GUI for ZoL I've come across. I thought it woud be more intuitive to list snapshots by creation date. In zfsmanager-lib.pl instead of:

zfs list -H -o name,$config{'list_snap'} -t snapshot $snap You could use: zfs list -H -o name,$config{'list_snap'} -t snapshot $snap -s creation

I also noticed the rollback button isn't active. Hasn't that been implemented yet?

I've installed it on Debian 9 in a VM. But would love to use this on my home server. Do you think it's stable enough in it's current state? Are you using it yourself?

Jip-Hop commented 6 years ago

Perhaps it would be nice to add another column Created (like Used and Refer): zfs list -t snapshot -o name,creation -s creation

jonmatifa commented 6 years ago

Awesome suggestion! I just pushed out an update, I had to overhaul a surprising amount of code to make that work, but I think it works better. I'll have to update the way pool and filesystem lists are generated as well to make them consistent, but for now, we'll test this functionality with just the snapshots.

I have a home server with six 2tb drives in a raidz2 configuration and thats where I end up doing the bulk of the zfsmanager development. I give a warning about using it in production environments just because, but I feel like its ok to use as long as you understand the risks and backup your data. There's always some possibility that some piece of code doesn't behave as expected and irreversibly deletes something, but realistically that's not going to happen. No one has ever reported anything catastrophic happening with it.

There's are some secret parameters that can be edited in the config file. You can either edit the config.info file and uncomment the lines referring to list_zpool, list_snap, and list_zfs which will allow you to customize what properties are shown in the corresponding lists. Alternatively, you can edit the config file directly at /etc/webmin/zfsmanager/config if you just wanted to make a one time change. I implemented it this way because you can break things if you don't format the strings correctly.

jonmatifa commented 6 years ago

I also noticed the rollback button isn't active. Hasn't that been implemented yet?

I haven't implemented this yet, reason being is that I never personally use the rollback function. If there is enough demand from others I can implement it easily enough.

vinnie-ki commented 6 years ago

Yes, a rollback function for the snapshots could be usefull. Also the possibility to backup or transfer the snapshots using zfs receive/send. But perhaps that requiers quite a bit of development.