Solved 'Clone' a FreeBSD installation to new hardware...

I'd like to create a complete clone of my FreeBSD installation on new similar hardware to act as a ready-to-go backup. So data, users, passwords, installed software, settings (not IP address). Is there a straightforward way to do this? Thanks.

Solved: I'm going to go with the fresh install/script approach suggested by LibreQuest. Thanks all.
 
Last edited:
You could clone your drive with dd. Or do a fresh install and script your package or ports install and copy all your configs to the new machine. Or I'm sure there is a backup solution you can use to create a backup to restore to another system. Restic seems to be popular. You could also just compress your configs and script the restore to another machine. There are many ways to do a backup. I have cloned my usr dir to other systems before just using sftp.
 
Just use dd. I do that all the time.

Just be aware that dd'ing a read-write mounted filesystem isn't entirely safe. Would be better to boot from a USB stick for the copy, or to dd when in single-user mode with filesystems mounted readonly or not at all.

For completeness you should also:
- make a new ssh host key for the copy
- change fllesystem labels and uuids
 
I'd like to create a complete clone of my FreeBSD installation on new similar hardware to act as a ready-to-go backup. So data, users, passwords, installed software, settings (not IP address). Is there a straightforward way to do this? Thanks.
Depending how many drives you have and if you have ZFS.

Personally I am always cloning small desktop installations using ZFS mirroring. An alternative is to create new empty pool on new drive and use zfs send - zfs-send(8).

You can attach bigger drive to mirror and have a bigger pool later on the cloned system. zfs-send(8)

Drive needs to be manually partitioned before, using gpart(8)

There is a nice script to update loader on a new drive sysutils/loaders-update
 
Back
Top