How to activate something similar to a snapshot?

The disk is automatically configured upon installation. I checked if I had the option to enable LVM (which I use in another server), but I don’t have this option.
As a result, in Webmin I can create an LVM group, but it would delete everything.

I would suggest/recommend my own experience and what I came to eventually do:
On bare metal server systems always run a hypervisor. Even if it is to host a single VM.

The flexibility and features you get from virtualization is so addictive you wouldn’t wanna be doing it any other way.

I use (and recommend) Proxmox as a powerful, trustworthy and lightweight hypervisor based on Debian. It comes with a free license, if you want to try it out, or use it for non-critical systems.

1 Like

My Virtualmin server is running in KVM which is hosted TrueNAS which is on ZFS.

This allows me to do snapshots for development and messing about with, but I would not use snapshots for backing up as there might be issues with live service and data (quintessence I think it is).

ZFS snapshots would not take into account what is in RAM and what processes are running.

Obviously this would different to your setup.

I use Linode (Akamai now) to host the Virtualmin services. If I have a large update I can switch on the backup service for a “snapshot”, do the upgrade, then either retain the backup or turn off the service once I’m happy the changes won’t cause trouble. The cost is almost zero for a quick upgrade snapshot then turn the backup service OFF. The nightly backups still happen on AWS and my last invoice was $12 for a month for two servers.

In this new server configuration I still don’t have LVM, but I have ZFS as the file system.
Now how do I activate a ZFS snapshot and restore it from Virtualmin?

I have to do an email import test and if it doesn’t work I don’t want to redo the server again.
The provider does not provide me with a backup service.

how do I activate a ZFS snapshot and restore it from Virtualmin?

@DarkCorner You dont.

Not even from the command line?

Your Virtualmin install should not be able to see a ZFS filesystem and cannot control it.

ZFS is a file system and more and sits below Virtualmin. My Virtualmin is on a ZVol which is part of the ZFS file system and it cannot see the underlying ZFS just the file systems that Ubunutu formatted the ZVol to.

Do not use ZFS snapshots of live servers for backups. If you do want to use ZFS for backups make sure the server is offline.

I personally would just use the inbuilt backup system, it is very developed and can be run while the server is live.

Joe mentions using Logical Volume Manager but I don’t understand Linux, yet so maybe look at that.

These are my TrueNAS notes with information in ZFS, these are a WIP.

https://quantumwarp.com/kb/articles/122-other-devices/1006-my-truenas-scale-notes

OK, I’ll forget about ZFS.
Upon installation I activated mirroring on two disks and could choose between ext4 and zfs.
On my TrueNAS server (at home) I have enabled snapshots; if I can’t do it here, maybe it was better to choose ext4 which consumes less memory.
Many thanks

ZFS requires in RAM software to handle the file system. This software handles the file system, the IO interface, snapshots etc… i.e. TrueNAS.

ZFS is RAM heavy because of how it works and cache files writes and other stuff.

My TrueNAS has 128GB installed, people say you can get aways with 64GB but that would not leave much left for the virtual machines if you want to run them like I do.

Upon installation I activated mirroring on two disks and could choose between ext4 and zfs.

What OS was this? don’t nest a ZFS file system on another ZFS file system I am sure this can cause performance issues.

If you are using ZVols it does not matter what filesystem it is formatted to you can still do snapshots of the ZVol, the only issues is doing a snapshot while the server is live.

You don’t need to forget about it. But, AFAIK, Webmin doesn’t have UI support for it.

You can use it with Webmin and Virtualmin. Many people do (especially on Solaris-derived OSes, and the BSDs). Jamie just hasn’t written code to manage it. Someone else has, in a module called ZFS Manager. I have no idea if it is good/reliable/secure, as I have never seen it. It appears to be unmaintained for a few years, though, so may not be immediately compatible with current Webmin (not much has changed in the modules API, but there have been some changes, including possibly breaking ones).

But, I don’t think you should be afraid of using command line tools, especially for something low-level like filesystems. I like being able to see the inner workings of critical data-related stuff, even if I use Webmin for day-to-day operations.

Years ago I first installed things like Webmin to see what changes it made to config files.

@DarkCorner If your provider doesn’t offer LVM in its’ default image, you might ask them about including it.

The provider provides LVM, but not with this server class.
At the time of installation it allows me to create mirroring on the two disks and to choose between ext4, zfs and if I remember correctly xfs.
I’m keeping it like this now, I’m still completing the migration and I don’t want to create any more problems for myself.
In the meantime I’m working with the various Virtualmin and Webmin backups.
I’ll try the snapshot from the command line to see if it works for me.

I tried ZFS Snapshot. Below is the list of commands.
First I check if the zpool is available and create the snapshot.
At this point I sent some emails from usermin to two recipients who responded.
I see the emails in the “sent” and “Inbox” folders.
I exit usermin, rollback, go back to usermin and the mail is still there.
Then I remove the snapshot.
In terms of values in the table they were perhaps too small to see any changes, but if the rollback had worked the emails should have disappeared.
Or am I wrong?

admin@srv1:~$ sudo zpool list
NAME   SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
zp0    444G  8.86G   435G        -         -     0%     1%  1.00x    ONLINE  -
admin@srv1:~$ sudo zfs list -t snapshot
no datasets available
admin@srv1:~$ sudo zfs snapshot zp0@Testss
admin@srv1:~$ sudo zfs list -t snapshot
NAME         USED  AVAIL     REFER  MOUNTPOINT
zp0@Testss     0B      -       96K  -
admin@srv1:~$ sudo zfs list -t snapshot
NAME         USED  AVAIL     REFER  MOUNTPOINT
zp0@Testss     0B      -       96K  -

#### Send emails

admin@srv1:~$ sudo zfs rollback zp0@Testss

### Verified presence of emails

admin@srv1:~$ sudo zfs list -t snapshot
NAME         USED  AVAIL     REFER  MOUNTPOINT
zp0@Testss     0B      -       96K  -
admin@srv1:~$ sudo zfs destroy zp0@Testss
admin@srv1:~$ sudo zfs list -t snapshot
no datasets available

I tried again copying a dozen emails and folders.
After rollback I found them still there.

:man_shrugging:

I have never used ZFS. Maybe best asked in a place where ZFS is frequently discussed. (maybe https://askubuntu.com/ or a Debian mailing list? ZFS is patched into Debian and Ubuntu, and it’s not part of most other Linux distros, AFAIK, so general Linux communities may not have much exposure to it, either.)

1 Like

The active ZFS forum these days is here (after many people migrated away from reddit):
https://discourse.practicalzfs.com

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.