Do any of you take “snapshots” of your system to restore everything if something goes wrong? or do you just backup your important data?
I am currently using Restic to backup all my data. I have made quite a mess of my server, so I’m looking to probably re-install the whole system. I won’t lose any data, but it will be a bit time consuming to configure and install all my programs again.
So, I’m wondering if there is an easy way to take snapshots of a whole live system, and then restore a snapshot.
What software do you use? Is it worth doing?
I’ve seen different methods discussed online:
Anybody have some real-world experience with these? or is a fresh install good every now and again?
I’d add LVMS to the list. I have no experience with btrfs, but from LVMS I know that it supports ‘block level’ remote sync of logical volumes. I guess ZFS would support something like that as well, but I have not used ZFS enough to feel comfortable with it yet.
I have found the Yunohost backups a reliable way of restoring a server from scratch, or anyway, instead of doing the post-install after having set up Debian and installing Yunohost.
Yes, that is what I do with Borg.
I think having whole-system back ups would help for a totally screwed up server, but it does not allow to restore a single messed up program.
I use Borg to backup and yunohost is in a virtual machine with Proxmox. Before each upgrade, i make a snapshot. All my data is in yunohost.multimedia on another disk and are not in the snapshot, so it takes a few seconds.
From my experience, i install yunohost on a RPI3B+ about 3 years ago. When i migrate my yunohost on a VM, i use my last backup and restore it instead of doing post-install and all is fine.
I use proxmox about fifteen month. I had a problem with an upgrade of Nextcloud. When it happened, i uninstall it and try to restore my backup but it failed. I don’t waste my time to investigate, then, i restore the proxmox snapshot and my server revive. I did the upgrade of Nextcloud again and it worked this time.
Without snapshot, i think i shoud have reinstall my server.
So, the combination of Borg (or restic for you) for your data and the server and proxmox with a VM for snapshot is a strong solution. proxmox also supports backup of the VM and i’ve planned one a week. You can define the number of backup that you want to keep.
You could try to use lxc containers.
It’s very lightweight, fast and easy to use.
I didn’t install my yunohost in LXC container but I tried it a lot in a VM (virtualbox) to get accustomed to it so when I’ll do the migration (not in the near future) it won’t be hard.
That is the combination I use for my ‘own’ Yunohost. I am very happy with the combination. It was my first Proxmox machine, on install it defaulted to ZFS (the case I mentioned above :-P) and ever since I have hesitated to run ZFS-snapshots.
Surely I should look into snapshots, perhaps after switching to LVM if that is the thing holding me back.
I remember having read that databases are not always happily restored from backups at VM level (transactions may be open ended at the time the snapshot is taken), did you run into any problem relating to that ?