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

Re: Failing system drive: mirror or clone to new drive via cp and rsync and grub configuration



On Sun, 27 Mar 2005 02:07:00 -0500, Mitchell Laks <mlaks@verizon.net> wrote:
> Hi,
> 
> i am running Debian Sarge on a server.
> 
> I just had a server with a failing system drive /dev/hda. In particular errors
> write errors from the /var partiton = /dev/hda7.
> 
> I decided to clone the system drive to /dev/hdb and I wanted to document, for
> others benefit, what I did.

Awesome, much thanks as this is something I need to do. I've been
researching a bit, but since it's not critical I've taken my time. 
One note though, regarding rsync (and I for one would rather use it
entirely and avoid cp, just because rsync is a bit "smarter")

> i instead ran
> 
> rsync -a  --exclude=/proc/* --exclude=/boot/* --exclude=/home/*
> --exclude=/mnt/*   --exclude=/tmp/*  --exclude=/var/* / /mnt &

rsync -avx / /mnt

Would do the same (simplified, v because I like to see it working! x
tells it not to cross filesystems) But really, I think one swoop could
be done, if you mounted everything in /mnt as it would be on your
sytsem and ran

rsync -av --exclude=/mnt/* / /mnt/

It would cross filesystems, but duplicate them completely.  Of course,
you would have to remember to exclude any mounts that are on other
disks that are not being replaced, but fewer overall steps makes it
good.

Good instructions though, again, thanks.

-- 
~ Darryl  ~ smartssa@gmail.com
http://smartssa.com / http://darrylclarke.com
International Clean Your Windows Day - April 22, 2005
http://pileofcrap.org/news/2096/



Reply to: