You are not logged in.
Hello,
I need to clone my existing arch installation to a different partition, that is, copying the entire root directory "/" to another partition. Small problem: I cannot boot from a different device, so I have to do the cloning live while booted from my root partition.
I have tried rsync with the -avz option and excluding /proc, /sys and /dev but for some reason I get tons of errors when booting from the cloned drive, even if I include /dev in the rsync I get errors.
Anyone know the best way to do what I want? Do I have to exclude other directories maybe?
Thanks!
PS: Yes, there are lots of threads with cloning questions, but none of them seem to need a solution for "live" cloning....
EDIT: on marking this solved, I'd like to add there sure is a way to do this, but noone really bothered to figure it out. I wish there was an easy way like on Windows, where you can just launch drive snapshot.exe on a live running system and clone the entire partition while working normally...
Last edited by awayand (2011-06-14 11:11:53)
Offline
When you say you cant boot from a different device - does this mean both usb and cd?
Often 'thin' machines don't have cd's but no probs booting from a usb ... ('grml' to me is the best thing since sliced bread!! - www.grml.org)
Offline
I think that what you want is something like:
dd if=/dev/sda of=/dev/sdb
It makes a precise copy of the partition /dev/sda to /dev/sdb. But be VERY careful and read man dd VERY thoroughly before trying it! Dd is an extremely dangerous tool and can wreck your data if not used properly. I warned you
If I were you I would rather think about USB boot or booting over network...
Offline
If you can't boot from another device, how did you install Arch in the first place?
Offline
Don't use dd from a live system, it won't work. Unless you're very lucky, I guess... (If anything writes to the disk during the copy, you're screwed.)
Instead of explicity excluding /dev, /proc and /sys, you could try the -x option (--one-file-system). It might help... Or not .
Offline
*chuckles* it would seem that the OP has gone AWOL ...
Other than that - +1 for "ANOKNUSA"!
'dd' on two disks is a toil cuz you copy gigabytes that have not been used yet - and if your target disk is smaller than your original - well ...
Me - I use Alan Cox's ...
(cd $SRC && tar cf - .) | (cd $TARGET && tar xvpf -)
- and absolutely and undeniably on a non-running system - use a live CD/usb ...
Then install the bootloader and edit fstab and Bob's your uncle.
Last edited by perbh (2011-06-08 13:41:02)
Offline
well I guess there is no way of doing a "live" cloning. I went the grml route. and YES, I HAVE GONE AWOL!!!!
Offline