Best procedure for full backup of live system

Warren Block wblock at
Fri Oct 16 03:47:58 UTC 2009

On Thu, 15 Oct 2009, Nerius Landys wrote:

> Thanks for your help guys.  I have decided to attempt the following.
> With a filesystem snapshot, take a dump 0 of all filesystems.  Back up
> these dumps to a 500GB disk I have sitting at home (the server I'm
> backing up is in a data center).  Perform this maybe once a week or
> once a month.

Just a general note: backup to a hard drive isn't bad, but it's not the 
same as removable media.  One failure can kill all of your backups...

> I am now looking at this:
> For step 1, I'm a little unsure what they are talking about.  I assume
> that to begin with I would do this:
>  > bsdlabel ad4s1
> Since that is my disk and it has one partition.

The first step there has you print out the bsdlabel.  That can be 
valuable because it's a lot easier to have that information on hand than 
to try to reconstruct it after a failure.

> I would probably also want to do this:
>  > dd if=/dev/ad4 of=MBR_backup bs=512 count=1

Handy to have, and takes little space.

> to back up the MBR, so I can recontruct the boot program and partition
> table.  But they don't mention that in the Handbook.
> Then it says to back up /etc/fstab, but I'm not quite sure how I'd use
> this in a restore.

Mostly it's reference information you might need after a failure, to see 
which partition goes to which mountpoint: "Aha!  On that drive, /usr is 
s1g, not s1f."

> Lastly, it says save all boot messages.  Do they mean the output of
> dmesg?  Why is this useful?

It would show what hardware was in the old machine and what services are 
running on startup.  Backup in general is making copies of information 
you won't need as long as you have a backup of it.

> Of course I would complement all of these things with the actual dump
> 0 of all sectors on the primary partition of the single hard drive
> that I have.

dump(8) doesn't do all sectors, just ones used by the filesystem.

Also, dump doesn't cross filesystems.  In a typical FreeBSD install, /, 
/var, and /usr are separate filesystems.  A dump of / won't get them all 
at once.

> My server should boot fine with the FreeBSD CDROM (fixit), because it
> uses a subset of the GENERIC kernel device drivers.

If you can, try that before an actual emergency.

> So I probably don't need to pay attention to the instuctions talking 
> about floppies.

Not any more.  A full FreeBSD install CD or DVD along with the fixit 
gives a lot more options.

-Warren Block * Rapid City, South Dakota USA

More information about the freebsd-questions mailing list