backup FreeBSD system

Clifton Royston cliftonr at tikitechnologies.com
Thu Apr 21 17:21:14 PDT 2005


On Thu, Apr 21, 2005 at 04:03:37PM -0700, Joshua Lewis wrote:
> I have a working FreeBSD system that I love and...(Wow saying out loud I
> think I may need to seek a professional). Any way I would hate to loose it
> and was wondering if there is a way to make a duplicate system without
> weeks of configuration. Kind of like RAID Mirroring for a computer?
...
> I am probably going to load FreeBSD from scratch. Not hard at all. I can
> be done in a matter of 20 mins

  ISTR it takes a bit more time than that to install the base system,
but it's not too bad.

  Here's how I would probably do what you want to do:

 * Buy the second system with exact duplicate hardware.

 * Install FreeBSD on it from sysinstall as you said, partitioning the
drive the same way as your previous system and newfsing all the
partitions.
 
 * Shut down both systems to power off, pull the hard drive out of the
new system, and mount it temporarily into the working system as a
second drive.

 * Boot it up into FreeBSD, in single-user mode, and mount all the file
systems, including mounting all the file systems on the new drive onto
temporary mount points.

 * Use rsync to clone each file system from the working system to the
corresponding partition on the new system.  (This should go fast if
you've already installed the base system, as most files will already be
there and be identical.)

 * Shut it down and remove the new drive.

 * Reboot the working system as normal.

 * Restore the drive to the second system, and it should boot up as an
exact clone of the working system.  Then you'll just need to edit the
hostname and IP address in rc.conf (and any application config files
that reference them) before you put it onto the network.  (Oh, and
clean out the logs in /var, as it will have picked up the logs and
"history" of the first system.)

 * Done.

  This should get you a system that in every respect but name and IP
functions as a clone of your existing one, and it should be pretty fast
to do.
  
  -- Clifton

-- 
          Clifton Royston  --  cliftonr at tikitechnologies.com 
         Tiki Technologies Lead Programmer/Software Architect
"I'm gonna tell my son to grow up pretty as the grass is green
And whip-smart as the English Channel's wide..."
                                            -- 'Whip-Smart', Liz Phair


More information about the freebsd-questions mailing list