cloning Mageia to new disk, same system

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

cloning Mageia to new disk, same system

Postby patanjali » Sep 4th, '14, 20:27

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!
patanjali
 
Posts: 3
Joined: Sep 4th, '14, 20:15

Re: cloning Mageia to new disk, same system

Postby benmc » Sep 5th, '14, 00:22

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
benmc
 
Posts: 1215
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: cloning Mageia to new disk, same system

Postby patanjali » Sep 5th, '14, 02:37

@benmc, thanks for your reply...that sounds like a straightforward approach!
patanjali
 
Posts: 3
Joined: Sep 4th, '14, 20:15

Re: cloning Mageia to new disk, same system

Postby benmc » Sep 5th, '14, 02:51

Hi

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

Benmc
benmc
 
Posts: 1215
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: cloning Mageia to new disk, same system

Postby claire » Sep 7th, '14, 00:59

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.
Help to make Mageia! Get involved.. Please come and join us
claire
 
Posts: 161
Joined: May 28th, '11, 19:17
Location: UK

Re: cloning Mageia to new disk, same system

Postby patanjali » Sep 7th, '14, 01:44

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.
patanjali
 
Posts: 3
Joined: Sep 4th, '14, 20:15

Re: cloning Mageia to new disk, same system

Postby viking60 » Sep 13th, '14, 01:58

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.
Image Flexibility is good and inxi is good... install both!
User avatar
viking60
 
Posts: 255
Joined: Mar 19th, '11, 22:26

Re: cloning Mageia to new disk, same system

Postby rooman » Sep 22nd, '14, 18:37

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?
Mageia 6, Asus Z-87-Pro, i5 4670k @4.2, DDR3 16gb, nVidia 760 GTX
rooman
 
Posts: 52
Joined: Apr 20th, '11, 16:43
Location: Lausanne, Switzerland

Re: cloning Mageia to new disk, same system

Postby wintpe » Sep 23rd, '14, 13:43

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
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: cloning Mageia to new disk, same system

Postby rooman » Sep 23rd, '14, 21:12

I'll give that a shot soon tks.
Mageia 6, Asus Z-87-Pro, i5 4670k @4.2, DDR3 16gb, nVidia 760 GTX
rooman
 
Posts: 52
Joined: Apr 20th, '11, 16:43
Location: Lausanne, Switzerland


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest