Automatic Clone of Ubuntu systems
Michael R. Head
burner at suppressingfire.org
Fri Apr 21 05:12:34 UTC 2006
On Thu, 2006-04-20 at 11:03 -0700, John Schofield wrote:
> I'm looking for a tool that lets me clone and restore an entire disk
> image from an Ubuntu box, a la Norton's Ghost. (But from what I
> understand, Ghost isn't all that great with Linux volumes.)
>
> The idea is that for servers, I would set them up once correctly,
> clone that image, and then simply do a bare-metal restore from the
> cloned image if necessary due to hardware failure or OS corruption.
>
> If there's a tool you've used for this with success, I'd love to hear
> your stories.
I just use dd with a live CD.
to make the image, splitting it across gigabyte size files, putting the
images directly on a windows file server:
Boot with live CD and...
for p in `cat /proc/swaps | grep partition | awk '{print $1}'`; do sudo swapoff $p; done
mkdir image_dir
sudo mount.cifs //server/images image_dir -o uid=ubuntu,gid=ubuntu,ip=192.168.X.X,username=foo
cd image_dir
sudo dd bs=900k if=/dev/hda | gzip --fast -c | split -b $((1024*1024*1024)) -d - image-`date +"%Y-%m-%d"`-gz.
to dump the image back:
Boot with live CD and...
for p in `cat /proc/swaps | grep partition | awk '{print $1}'`; do sudo swapoff $p; done
mkdir image_dir
sudo mount.cifs //server/images image_dir -o uid=ubuntu,gid=ubuntu,ip=192.168.X.X,username=foo
cd image_dir
cat drive-image-2006-03-08-gz.* | zcat | sudo dd bs=900k of=/dev/hda
mike
> Thanks a bunch!
>
>
> John Schofield
>
>
--
Michael R. Head <burner at suppressingfire.org>
GPG: http://www.suppressingfire.org/~burner/gpg.key.txt [0x4C9DA1D0]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060421/e4fa197d/attachment.sig>
More information about the ubuntu-users
mailing list