Hi
I am playing with virtualization on centos 5. I have an old redhat 7 system I still need so I want to virtualize it. I found the old disk, installed in the virtual environment but found I had done some additions WAY back. I want to be sure my virtual system is exactly the same as the ACTUAL system.
Do I use cpio on the actual system to grab everything and then put that back on the virtual system?
What would the format of the command be to grab it and extract it? I have never used cpio and dont want to screw something up.
Is there a better way?
Jerry
On 10/24/07, Jerry Geis geisj@pagestation.com wrote:
Hi
I am playing with virtualization on centos 5. I have an old redhat 7 system I still need so I want to virtualize it. I found the old disk, installed in the virtual environment but found I had done some additions WAY back. I want to be sure my virtual system is exactly the same as the ACTUAL system.
Do I use cpio on the actual system to grab everything and then put that back on the virtual system?
I'm more "tar" adept ! Here is the tar command :
# cd /src # tar cf - . | ( cd /dst ; tar tvpf - ) This is just a try that display all file it will copy. Now I copy for real # tar cf - . | ( cd /dst ; tar xvpf - ) To copy through ssh on a remote machine # tar cf - . | ssh root@host "( cd /dst ; tar xvpf - )" bu scp is fine too
To avoid copy of /proc and other anoying file system you can use --except ./proc --except ./sys ....... or better use -l to copy only /src and not other mounted filesystem then you have to copy /boot and other data partition the same way.
cpio require you to use a filesysteme walker like find to generate the list of file you wan to copy. Something like : # find . | cpio ???? | (cd /dst ; cpio ??? )
What would the format of the command be to grab it and extract it? I have never used cpio and dont want to screw something up.
Is there a better way?
Jerry _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Wed, 2007-10-24 at 19:41 +0200, Alain Spineux wrote:
On 10/24/07, Jerry Geis geisj@pagestation.com wrote:
Hi
I am playing with virtualization on centos 5. I have an old redhat 7 system I still need so I want to virtualize it. I found the old disk, installed in the virtual environment but found I had done some additions WAY back. I want to be sure my virtual system is exactly the same as the ACTUAL system.
Do I use cpio on the actual system to grab everything and then put that back on the virtual system?
I'm more "tar" adept ! Here is the tar command :
<snip>
cpio require you to use a filesysteme walker like find to generate the list of file you wan to copy.
FYI: the list of files/dirs to be copied can be in a file too. Allows utils like comm or diff to be used for various paring/augmenting operations before/after the copy.
Something like : # find . | cpio ???? | (cd /dst ; cpio ??? )
No need for the pipe/sub-shell with cpio. It is fully featured.
However, with "fully featured" comes the need to RTFM and carefully think about it... sometimes.
A simple case used to be (I haven't kept abreast of all the "enhancements")
find . | cpio -p<other options> <destination-dir>
<snip>
Is there a better way?
Not IMHO.
Jerry
<snip sig stuff>
HTH -- Bill