How to Backup a FreeBSD Workstation Boot Drive?

hunter

Explorer
Joined
Nov 24, 2013
Messages
94
After learning a little about FreeBSD from this project and hearing so many good reports about the OS, I am in the process of configuring a freeBSD workstation to try to use as my daily driver. I normally boot Clonezilla off a CD to back up this type of work to TrueNAS over the network (using NFSv4) in case I were to do something wrong and bork the OS I am working on. That won't work this time because clonezilla doesn't know how to read the ZFS my distro wanted for the boot drive.

I know the FreeBSD manuals are good and it suggested the functions dump and restore. I'm none too sure the live installation disk will have those functions and I don't have another spare drive to add to the workstation to format into ZFS and send snapshots.

Does anyone happen to know a quick and dirty way I might be able to backup my FreeBSD workstation while I'm working on configuring it?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If you are running on ZFS, then snapshots and zfs send/receive are the preferred method. dump/restore are historical tools mainly used with UFS.

If you want to be able to rollback changes that might have messed up your system and resilience against a disk failure is not yet the objective, then snapshots might be enough. Read up on boot environments and the bectl command, I suggest.
 
Last edited:

hunter

Explorer
Joined
Nov 24, 2013
Messages
94
@Patrick M. Hausen : Are you suggesting that my new workstation would be able to take a snapshots of the drive it booted from? Or are you suggesting, I try to boot a live environment from the CD (USB actually) and attempt to command the snapshots from there?

I will also check out the bectl command. Thanks for pointing me in the right direction.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You can have as many (within reason) snapshots of your boot pool and datasets as you like and roll back to any one of them if needed. Of course that works for the boot device. That's the point of ZFS.

If you did the "guided ZFS" installation, then everything is already prepared for boot environments. So before every major change you create a new boot environment (which is essentially a ZFS snapshot) and if you mess up you can reboot and pick that boot environment with the "known working" state from the boot menu.
 

hunter

Explorer
Joined
Nov 24, 2013
Messages
94
Thank you very much. I never understood why the default installation changed to ZFS. The snapshots will be sufficient for now. You're right, resilience against disk failure was not yet the objective (before I never got one without the other!)

Not only can I use snapshots to solve this problem, but there is a system tool (bectl) built in that does all the work for me, and it even integrates the snapshot with the bootloader, so I don't have to learn the bootloader? Wow, guess it was my lucky day!
 
Top