Clone a hard disk with rsync

Posted: 11-26-2004, 10:47 AM
Hi there,

I need to make a 'complete' clone of a hard disk to a second, 'backup'
hard disk which is now installed in the same computer, but will later
be moved to a different computer. This means RAID is out of the
question. I also plan to update the backup disk nightly. I think rsync
is appropriate for the job.

In the event that the main disk dies, I would like to be able to just
plug in the 'backup' disk and have the system boot and run normally.

My question is, how to do this? Will the following work:

rsync -a --delete --force --exclude /backup/ / /backup/

Do I need to exclude additional things such as /var/run, etc.? I've
seen people recommend excluding dev/ and other system directories but
if I do that, I guess the backup drive won't be bootable?

Do I need to do something extra? (install LILO on the second disk I
assume, but something else?)

Any suggestions welcome. Thanks!

Ralph W.

Clone a hard disk with rsync


Reply With Quote

Responses to "Clone a hard disk with rsync"

J.O. Aho
Guest
Posts: n/a
 
Re: Clone a hard disk with rsync
Posted: 11-26-2004, 11:26 AM
Ralph.White wrote:
> In the event that the main disk dies, I would like to be able to just
> plug in the 'backup' disk and have the system boot and run normally.
>
> My question is, how to do this? Will the following work:
>
> rsync -a --delete --force --exclude /backup/ / /backup/
>
> Do I need to exclude additional things such as /var/run, etc.? I've
> seen people recommend excluding dev/ and other system directories but
> if I do that, I guess the backup drive won't be bootable?
/dev /proc /sys are things you shouldn't try to "copy" as they do contain a
lot of streams and leads to the filling of your harddrive without geting space
for the stuff you want. Just see to that the empty directories /dev /proc /sys
are there on the backup.

In theory your row should work, just test o see, just exclude those 3 other
directories too... it can be wise to exclude /mnt too, in case you have a CD
mounted, you may not want to backup it to the harddrive.

> Do I need to do something extra? (install LILO on the second disk I
> assume, but something else?)
Yes, you will need a boot loader or a boot disk. But don't forget to keep the
backup harddrive as the primary harddrive when you want to install the boot
driver, so you don't have to problems to find the boot image.

It could be smart to keep a backup kernel, one that you don't remove at all,
this way you have a kernel you can boot into on the backup system all the time
and you don't need to update the lilo (IMHO grub could be an easier option as
it reads a text).


//Aho
Reply With Quote
Ralph.White
Guest
Posts: n/a
 
Re: Clone a hard disk with rsync
Posted: 11-28-2004, 08:39 PM
For the initial copy, should I format the 'backup' driver, then rsync,
then install LILO, or should I use 'dd' to start from an exact copy of
the original disk, and then use rsync to keep this up to date?

Thanks
Ralph W

"J.O. Aho" <user@example.net> wrote in message news:<30ohsbF30a08oU1@uni-berlin.de>...
> Ralph.White wrote:
>
> > In the event that the main disk dies, I would like to be able to just
> > plug in the 'backup' disk and have the system boot and run normally.
> >
> > My question is, how to do this? Will the following work:
> >
> > rsync -a --delete --force --exclude /backup/ / /backup/
> >
> > Do I need to exclude additional things such as /var/run, etc.? I've
> > seen people recommend excluding dev/ and other system directories but
> > if I do that, I guess the backup drive won't be bootable?
>
> /dev /proc /sys are things you shouldn't try to "copy" as they do contain a
> lot of streams and leads to the filling of your harddrive without geting space
> for the stuff you want. Just see to that the empty directories /dev /proc /sys
> are there on the backup.
>
> In theory your row should work, just test o see, just exclude those 3 other
> directories too... it can be wise to exclude /mnt too, in case you have a CD
> mounted, you may not want to backup it to the harddrive.
>
>
> > Do I need to do something extra? (install LILO on the second disk I
> > assume, but something else?)
>
> Yes, you will need a boot loader or a boot disk. But don't forget to keep the
> backup harddrive as the primary harddrive when you want to install the boot
> driver, so you don't have to problems to find the boot image.
>
> It could be smart to keep a backup kernel, one that you don't remove at all,
> this way you have a kernel you can boot into on the backup system all the time
> and you don't need to update the lilo (IMHO grub could be an easier option as
> it reads a text).
>
>
> //Aho
Reply With Quote
emulsion
Guest
Posts: n/a
 
Re: Clone a hard disk with rsync
Posted: 12-02-2004, 12:22 AM
What about dd?

On Sun, 28 Nov 2004 12:39:05 -0800, Ralph.White wrote:
> For the initial copy, should I format the 'backup' driver, then rsync,
> then install LILO, or should I use 'dd' to start from an exact copy of
> the original disk, and then use rsync to keep this up to date?
>
> Thanks
> Ralph W
>
> "J.O. Aho" <user@example.net> wrote in message news:<30ohsbF30a08oU1@uni-berlin.de>...
>> Ralph.White wrote:
>>
>> > In the event that the main disk dies, I would like to be able to just
>> > plug in the 'backup' disk and have the system boot and run normally.
>> >
>> > My question is, how to do this? Will the following work:
>> >
>> > rsync -a --delete --force --exclude /backup/ / /backup/
>> >
>> > Do I need to exclude additional things such as /var/run, etc.? I've
>> > seen people recommend excluding dev/ and other system directories but
>> > if I do that, I guess the backup drive won't be bootable?
>>
>> /dev /proc /sys are things you shouldn't try to "copy" as they do contain a
>> lot of streams and leads to the filling of your harddrive without geting space
>> for the stuff you want. Just see to that the empty directories /dev /proc /sys
>> are there on the backup.
>>
>> In theory your row should work, just test o see, just exclude those 3 other
>> directories too... it can be wise to exclude /mnt too, in case you have a CD
>> mounted, you may not want to backup it to the harddrive.
>>
>>
>> > Do I need to do something extra? (install LILO on the second disk I
>> > assume, but something else?)
>>
>> Yes, you will need a boot loader or a boot disk. But don't forget to keep the
>> backup harddrive as the primary harddrive when you want to install the boot
>> driver, so you don't have to problems to find the boot image.
>>
>> It could be smart to keep a backup kernel, one that you don't remove at all,
>> this way you have a kernel you can boot into on the backup system all the time
>> and you don't need to update the lilo (IMHO grub could be an easier option as
>> it reads a text).
>>
>>
>> //Aho
Reply With Quote
Ralph.White
Guest
Posts: n/a
 
Re: Clone a hard disk with rsync
Posted: 12-02-2004, 11:15 PM
Well, that's my question exactly..

emulsion <not@aol.com> wrote in message news:<pan.2004.12.02.00.21.26.357967@aol.com>...
> What about dd?
>
> On Sun, 28 Nov 2004 12:39:05 -0800, Ralph.White wrote:
>
> > For the initial copy, should I format the 'backup' driver, then rsync,
> > then install LILO, or should I use 'dd' to start from an exact copy of
> > the original disk, and then use rsync to keep this up to date?
> >
> > Thanks
> > Ralph W
Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply



Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reactivate after disk clone smw Windows XP Setup 1 05-14-2004 01:16 PM
License checking on clone disk John Wood Windows XP Security & Administration 1 12-19-2003 03:12 AM
Dual Boot Clone Disk brian Customize Windows XP 0 09-03-2003 07:47 PM
New startup disk - clone from previous - DON´T WORK Millard Windows XP Hardware 0 08-31-2003 08:39 AM
New startup disk - clone from previous - DON´TWORK Alvin A Brown Windows XP Hardware 0 08-28-2003 03:35 PM