[CentOS] Migration from 32 to 64 bits

Wed Feb 26 14:09:46 UTC 2014
Ljubomir Ljubojevic <centos at plnet.rs>

On 02/26/2014 06:05 AM, John R Pierce wrote:
> On 2/25/2014 8:49 PM, Fabrizio Di Carlo wrote:
>> Well... I have 8GBs of RAM... But the point is: how is the best way to do
>> this migration? How backup data?
>>
>
> my favorite way to upgrade a system is to get a new disk drive. pull the
> old one out, install the new one, do a clean install of the new OS on
> the new disk, THEN reconnect the old one as a slave drive, and mount it
> under /mnt or whatever, and copy my data, settings, etc from the old
> system.  once done, wipe the old drive and reuse for something else.
>

This line will archive (compress too) your entire OS (important parts) 
to tar archive:

tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc 
--exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/media 
--exclude=/dev /

If you do not want everything, then add '--exclude=/<folder>" before the 
end part "/", but I suggest to at least keep /etc/and /home. Also, 
locate your VM's files and move them before tar-ing everything else, to 
avoid slowdown with compressing large compressed files.

Watch to have enough space on the directory you are starting the tar 
command from.

Also, you can compress to remote system via ssh. Here are examples of 
compressing single folder to server via SSH:

tar zcvf - /wwwdata | ssh root at 192.168.1.201 "cat > /backup/wwwdata.tar.gz"
or
tar cvzf - /wwwdata | ssh root at 192.168.1.201 "dd of=/backup/wwwdata.tar.gz"



-- 
Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

StarOS, Mikrotik and CentOS/RHEL/Linux consultant