A tiered approach to cloning linux partitons
- by Djurdjura
I'm looking at a strategy for cloning Linux (root) partitions without having to use a Live CD. Literature suggests rightly that the source and target partitions must be umounted to be able to get a clean clone. This assumes that you need to use a LiveCD. I was wondering if instead of requiring a LiveCD, if using a 3rd partition that would emulate the LiveCD functionality, if we can't achieve the same functionality. In other words, at a high level a system with 3 partitions (all bootable):
Rescue Partition (LiveCD emulation)
Running Partition (Source)
Backup Partition (Destination)
All 3 partitions are LVMS.
When it's time to clone the source partition to the backup (destination) partition, we would boot to the rescue partition, unmount the other 2 partitions (is it required?), run disk check on the source, copy to the destination (dd or simple copy to avoid replicating the defragmentation from the source), run disk check on the destination partition, update Grub menu list to force boot from either partition, and reboot into that partition.
My question, is it an approach that you'd recommend? MBR in all this? Any gotchas or extra checks required?
Thanks,
D.
PS. On recommendation from members, posting here instead of stackoverflow.com.