Restore from rsync files - Need walk through

I have a FreeBSD server. Drive crashed. Replaced drive. Have all files on a FreeNAS server that was synced with the FreeBSD server. The files were not dumped, but copied over using rsync. I need a walk-through on how to restore the server from files on the FreeNAS server.

Any help would be appreciated.

Thanks in advance
Rick
 
Search the forums. I've posted a few times with recipes for restores via rsync. The simplest method is to just use the same rsync command you used to get the files onto the FreeNAS system, but reverse the src and dest portions at the end of the command.

Or, do you mean how to rebuild the entire server install via rsync? (See first line above.)
 
I found this. Which is what I want to do. I can't find the right commands to make it happen.

To make your life simpler, backup everything. Why? Because then the restore process is simple:
  • boot LiveCD
  • partition/format disks
  • mount filesystems
  • rsync
  • install boot code
  • reboot

If you just backup things piecemeal, then you have to add a bunch of install steps (OS, ports tree, ports tools, ports, etc), and reconfigure steps, and then copy config and data files around, and twiddle this, and twiddle that. Too much hassle.
 
The exact commands to use will depend on how the system was configured originally.

The simplest method is to use a FreeBSD install CD, go through the process of doing a Standard install, configure the disk(s), slice(s), partition(s) as before, and select Minimal install. Boot into the OS to make sure it boots correctly.

Install rsync from the ports tree or via pkg_add.

Then, boot into single-user mode. Mount the partitions read-write:# mount -a

Configure the network interface manually using ifconfig(8). Then run the rsync command.

Finally, reboot again, and it should come up exactly the way it was.
 
wblock said:
rsync is only one small part of that procedure. Oddly, it installs bootcode last, which is not the way I'd do it.

I install the bootcode last so that it uses the files from the restored system. This prevents errors where (for example) you use an 7.x-based LiveCD to restore a 8.x system and you try to use the bootcode off the LiveCD which doesn't work with the 8.x system files.

It all depends on what you use to boot (boot0, loader, MBR vs GPT, etc) and whether or not ZFS is involved. Sometimes you can get away with using old boot code, sometimes you can't.
 
Back
Top