Backup/restore recipe

From: Eugene R <genie_at_geniechka.ru>
Date: Wed, 12 Nov 2025 16:00:15 UTC
Hello,

Does anyone have any howtos/recipes for optimal backup and restore 
strategies for a FreeBSD-based server? In particular, a "modern" ZFS 
installation (pretty complex dataset tree) on a remote cloud system 
accessible via SSH or console, with some external storage via smbfs or S3.

I suppose we will need
- partition layout
- ZFS layout
- /boot directory
- /etc directory (including passwd, fstab, etc)
- filesystem contents (using tar.gz or whatever) and/or
- ZFS data that can be restored directly

I imagine three potential scenarios:
- selective restore of specific files or subtrees to a working FreeBSD 
system (this one is reasonably obvious)
- (essentially) exact duplicate of the original system state on the same 
or different machine (ideally binary exact if hardware allows)
- functionally equivalent duplicate (i.e., the same filesystem content 
over the potentially different low-level layouts)
In cases 2 and 3, we likely will have to start from a clean machine, 
possibly with dummy Linux or FreeBSD installation.

I will be grateful for any pointers or explanations.

Best regards
Eugene