Disk cloning
Dimitri Yioulos
dyioulos at firstbhph.com
Tue Jan 20 06:26:55 CST 2009
On Tue, 20 Jan 2009 13:09:47 +0100, Renaud MICHEL wrote
> Le mardi 20 janvier 2009 à 12:48, Dimitri Yioulos a écrit :
> > I understand about disk consistency but, really, the system can't be
> > brought down for any length of time, and there's no one available at the
> > colo to do tasks like inserting CDs or DVDs. so, most everything has to
> > be done remotely on a live system. The job could be done during
> > s0-called "quiet time", say 3:00AM.
>
> The rule is: never use dd on a live system, rsync is what you are looking
> for. And it will be possible to change the partitions type/size/mount
> point.
>
> Create the needed partitions on the second disk, format them.
> Mount the root on some directory, let's say /mnt/newroot, create there
> directories for the other partitions (if needed, for
> example /mnt/newroot/home) and mount them.
> Then use rsync to synchronize the current system:
>
> rsync -aH --exclude='/mnt/*' --exclude='/proc/*' --exclude='/sys/*' / /mnt/newroot/
>
> (you may want to add other exclude paterns for some specific locations)
> Note that if you have some database running on that server youy probably
> need to exclude its data folder/files from rsync and backup/restore it with
> dedicated software.
>
> The good thing with rsync is that if you need to synchronize it again it
> will only copy the files that changed.
>
> Note that you still need to copy (or recheate) the MBR on the second disk.
>
> --
> Renaud MICHEL
> defimedia S.A.
>
I kind of had the feeling there was no simple way of doing this. And, of course, I've
just been made aware that there are MySQL databases running on the target machine.
I've certainly considered rsync (in fact, I use it for backup tasks on my own systems).
So, what you're saying is the I should:
- create the same filesystems on sdb as on sda
- mount sdb / on sda /newroot
- mount e.g sbd /var on sda /newroot/var, sdb /usr on sda /newroot/usr, etc.
- run rsync, with exclusions
- recreate or copy MBR to sdb (don't know how)
Dimitri
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Linux-PowerEdge
mailing list