Page 1 of 1

cloning Mageia to new disk, same system

PostPosted: Sep 4th, '14, 20:27
by patanjali
Friends,
I plan to clone my Mageia 4 installation to a new drive, which will end up on the same machine. Have looked on forums & web without finding much detail. But here is my plan; any comments, additions, and corrections welcome.

1. Use "rsync -aH" to copy all files to the new partition. Plan to do this while logged on (rather than from a live CD or SystemRescueCd). I don't believe the -AX flags are needed in my case (no ACL's or extended attributes).
Code: Select all
rsync -aH "$src" "$dest" --exclude ...

2. Will exclude the following from the rsync copying: /proc/*, /sys/*, /tmp/*, /media/*, /mnt/*, /run/*, /initrd/*, /dev/*
3. Adjust /etc/fstab to reflect new setup.
4. From grub, after installing the new drive, will run grub-install or setup. I plan to do this either by booting Mageia with a grub CD, or by booting from SystemRescueCD and using the chroot technique.

Or would it be better to do a fresh install??
In that case, I believe I could clone packages by doing something like the following on the original system:
Code: Select all
rpm -qa --queryformat "%{NAME}\\n" > packages.list

Perhaps followed by something like this on the new drive.
Code: Select all
urpmi $(cat packages.list)

Would still have to deal with configuration files in this scenario.

Thanks for any tips!

Re: cloning Mageia to new disk, same system

PostPosted: Sep 5th, '14, 00:22
by benmc
curiously I just did this last night but used a different method, but I am not command line proficient.

I also have a Cauldron setup.
for me:
boot to cauldron
created and formatted new partitions for Mageia 4 and home.
copied entire contents of Mageia 4 partitions over using dolphin file manager [ 119000 files, 6833 folders] about 20 min, enabled view hidden folders .
rebooted to install media,
ran installer but not formatting of any partitions.- about 5 minutes.
checked boot set up and altered as required at config page.
rebooted and checked system - ok

Re: cloning Mageia to new disk, same system

PostPosted: Sep 5th, '14, 02:37
by patanjali
@benmc, thanks for your reply...that sounds like a straightforward approach!

Re: cloning Mageia to new disk, same system

PostPosted: Sep 5th, '14, 02:51
by benmc
Hi

meant to add, chose custom partition set up to set mount points, [ / and /home ]
regards

Benmc

Re: cloning Mageia to new disk, same system

PostPosted: Sep 7th, '14, 00:59
by claire
You might
want to have a look at clonezilla. It can handle hdd size mismatch by expanding partitions to fill the new disk.

It's not straightforward/beginner but it it is capable.

Re: cloning Mageia to new disk, same system

PostPosted: Sep 7th, '14, 01:44
by patanjali
thanks, Claire...have now downloaded clonezilla. One thing that appeals to me about clonezilla, and also rsync with the correct parameters, is that they should handle hard links correctly, and also special files, etc. Not sure about dolphin.

Re: cloning Mageia to new disk, same system

PostPosted: Sep 13th, '14, 01:58
by viking60
I have cloned a laptop with Trinity kit over the network.
Image
http://bjoernvold.com/forum/viewtopic.p ... ity#p13504
It worked and everything was there (exact clone). I had to fix grub2 with the supergrub2 cd though.

Re: cloning Mageia to new disk, same system

PostPosted: Sep 22nd, '14, 18:37
by rooman
I'm planning to clone my Win 7 and Mageia 4 hard-disks to bigger ones and want an easy foolproof method. Does Clonezilla copy over boot sectors as well as the partitions? I need to rerun grub setup I imagine, booting from old disk, in order to be able to boot afterwards from the new disk.
I'll do the same with win 7 after, any one done the same? Any traps to avoid?

Re: cloning Mageia to new disk, same system

PostPosted: Sep 23rd, '14, 13:43
by wintpe
yes it does

you can use clonezilla to backup,

windowsxp, windows 7, windows 8
centos 5, 6 , and 7 if you stick with ext4, not sure about XFS yet not tested that, and last time i tried to use it
with an XFS partition it tried to dd it.

also solaris has same problem as XFS.

also any version of mageia, mandriva, fedora, and probably any other linux, although ive not tried that.

if the target disk is bigger it usualy only applies the same amount of disk space as the old disk,

so 360 gig -> 1TB will leave 650 meg allocated.

I then usually boot from the gparted live disk and use that to fill out any unused space.

as some people already know im a big fan of clonezilla, and use it for many backups.

regards peter

Re: cloning Mageia to new disk, same system

PostPosted: Sep 23rd, '14, 21:12
by rooman
I'll give that a shot soon tks.