K.S. Bhaskar on 14 Jun 2008 08:15:38 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] utility to image a linux host?


I do something similar periodically.  Any computer I set up has two
root partitions, so that if I screw up one (e.g., with a botched
upgrade), there is always a fully functional clone backup.  Each root
partition mounts the other root as something like /spare or
/media/sda4 or whatever.  The way I create the clone is as follows,
starting with an empty partition:

sudo rsync -auvx / /spare/  # trailing slash is important

Then I edit /spare/etc/fstab to swap the partitions for / and /spare.
I edit /boot/grub/menu.list to add entries to allow a boot from the
spare partition, and edit /spare/boot/grub/menu.list (in case I want
to make the spare partition the primary root).  I do a test boot and
am good to go.

I usually use the spare partition to test upgrades (e.g., Gutsy to
Hardy), and if the upgrade is successful, I will swap the main and
spare partitions (gotta remember to edit both boot/grub/menu.list
files).  I also use the spare partition to test new distributions
(e.g., when I tried out Fedora), after which I revert it to being a
copy of the current root.

Regards
-- Bhaskar

On Sat, Jun 14, 2008 at 10:49 AM, Morgan Jones <morgan@morganjones.org> wrote:
>
> I was talking to a coworker recently about 'flarcreate,' a solaris
> utillity that creates an image of a system that can be used to re-create
> a system either manually or via Jumpstart.  It's very handy for
> re-creating production environments in test or taking an ad-hoc backup,
> say, before an upgrade.
>
> Does such a utility exist for Linux (RHEL/Debian/Ubuntu)?  I know it can
> be done with dd but I'm looking for error checking and some awareness of
> the filesystem.  In particular, flarcreate will not backup empty space
> and can be told to exclude paths.
>
> thanks,
>
> -morgan
>
> ___________________________________________________________________________
> Philadelphia Linux Users Group         --        http://www.phillylinux.org
> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug