I've been working on an OS backup script off and on for a little while, but
have as of yet come up with a good solution that can fit as universally
across all Linux systems in house. I've gotten to the point where I need to
get it done, tested and put into production over the next couple of days.
Any help or guidance on this would be beneficial.

 Scenario:

Roughly 20 linux systems, most are RHELv3 with ext3 filesystems. However,
there are also systems that are Debian, SuSe, Slackware, etc., or don't use
ext2/3 but other filesystems such as reiserfs or xfs. We do use Tivoli
Storage Manager for our nightly incrementals.

Most systems have a partitioning scheme similar to the following:

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 274 2096482+ 82 Linux swap
/dev/hda3 275 372 787185 83 Linux
/dev/hda4 373 4865 36090022+ 8e Linux LVM

With a filesystem layout similar to:
/dev/sda3 495908 302673 167632 65% /
/dev/sda1 100692 46883 48610 50% /boot
none 1282920 0 1282920 0% /dev/shm
/dev/vg00/lvol1 4285712 3167820 900192 78% /usr
/dev/vg00/lvol2 1007896 17492 939204 2% /tmp
/dev/vg00/lvol3 2015824 1568220 345204 82% /var
/dev/vg00/lvol4 2519632 826072 1591160 35% /opt
/dev/vg00/lvol5 2015824 1358488 554936 71% /home
/dev/vg00/lvol6 2015824 1568220 345204 82% /data

 There are additional filesystems that are primarily on other volume groups
that I haven't listed. Those are mostly irrelevant so I've omitted the
information.

 Goal:

I'm looking to create a script that will backup what I consider the primary
OS filesystems to a filesystem on a remote server while ignoring the other
filesystems and virtual systems such as /proc. The filesystems I'm
considering to backup are:
/
/boot
/usr
/var
/opt
/tmp
/home (if small enough, otherwise restore from incremental)

To restore, I would boot off of a live distro such as Knoppix, Slax, or
similar and recreate the partions on the HDD (if necessary), then begin to
restore the files across the network to either the same size drive or
larger.

 At first, I was looking at utilities such as tar or dump. However, these to
me, seem to have limitations preventing me from doing what I'm after given
the partitioning scheme and using LVM. I believe dd might be my best option,
but I'm not sure if that would be the best route as I don't want to pull
empty disk space or bad sectors that typically come with using dd.

I've done a fair amount of googling, and reading various sources about this.
However, most only deal with physical or logical partitions being the
filesystems instead of LVM. Typically, these only cover using tar or dump
and do not address how to restore on LVM filesystems. However, if I use dd
to do the partitions, I would be taking everything on the disk including
non-essential filesystems and blank diskspace wouldn't I?

Am I stuck just using dd and taking all filesystems on the root/OS disk, or
is there something that I'm not aware of? Again, any thoughts or suggestions
on this would be quite appreciated.

Thanks!


--
-Shawn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shadowknight.real-time.com/pipermail/tclug-list/attachments/20051021/029ae016/attachment.htm