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!