Upgreade major version with full backup and restore?

Hello, I'm currently using freeBSD 12.2 or something like that. There are few services running on. The question is such - how can I backup the whole system and upgrade it to 13.x latest releese and how to rollback to stable state in the case if I'll face failure. The only Idea that I have on my mind is to make the image of my hard drive from another machine and than to start upgrading,but I belive that there is more efficient way to do such backups/rollbacks on the fly without physica linteraction with my hdd. I've done some kind of such things on Google cloud platform, there I can do hot image of my current running system, and backup from this one. How can I achive something like that on my vare metal machine running freebsd.
 
If you installed on ZFS, you have a much better mechanism (with full rollback) already builtin: boot environments.
 
There was some work done to provide boot environments with UFS, too, and I think it works, although it's less efficient than with ZFS. BUT it needs a specific partitioning scheme, so it would only be an option for you if you have unpartitioned space left. Short of that, I don't see much other possibilities than a full image/backup, but maybe somebody else would have an idea.
 
I agree with everyone that "if ZFS...", but without knowing your current hardware setup, it's hard to give good specific advice.
But:
If a desktop and empty drive slots and the means to do so, I would pick up a new drive and install on that.
I've done that a few times and it works pretty well.
Install new drive (time to upgrade to an SSD), unplug existing boot drive, install to new drive using ZFS, do enough config to get up and running and verify it's all working, make sure you reboot off the new install a couple times, then power down, plug in old drive, boot off new drive, temp mount old drive and selectively pull off what you need.
It's a bit more work, but you wind up with a clean system, gives you the chance to clean up a bit.
 
I agree with everyone that "if ZFS...", but without knowing your current hardware setup, it's hard to give good specific advice.
But:
If a desktop and empty drive slots and the means to do so, I would pick up a new drive and install on that.
I've done that a few times and it works pretty well.
Install new drive (time to upgrade to an SSD), unplug existing boot drive, install to new drive using ZFS, do enough config to get up and running and verify it's all working, make sure you reboot off the new install a couple times, then power down, plug in old drive, boot off new drive, temp mount old drive and selectively pull off what you need.
It's a bit more work, but you wind up with a clean system, gives you the chance to clean up a bit.
Is there are some scripts to change from UFS to ZFS? I don't have any other drives except my destop pc drive with backup data on it
 
Is there are some scripts to change from UFS to ZFS?
It's not possible to "convert" from UFS to ZFS.

In any case, backup your data not the OS or the software you installed. Those are all easily installed again (you do want to backup some of their configuration files), it's your data that's important and that cannot be reinstalled.
 
  • Like
Reactions: mer
So what is the way to backup running system and make snapshot from it if I'm using UFS? Isit possible?
 
So what is the way to backup running system and make snapshot from it if I'm using UFS? Isit possible?
Did I understand correctly that this is your desktop system with just one drive? If so, I recommend to find one more drive and back up the whole thing. Then make a fresh install (on ZFS) and import your data from backup.
To back up the drive, one option is to boot from USB stick and copy the whole drive with dd. (dd(1))
 
Back
Top