I am in the process of migrating a server to another machine.
Without much thought, i just copied one partition to the other server using, simple scp in at job which ended up in mess.
scp -r /mnt/sda6/* root@IP:/mnt/sda9/
At first sight, it seemed correct. So i did this, for all the partitions which i want to copy.
And today, once after the weekend, when all the huge partitions are copied to here, when i investigate the directories, the partitions got filled up without really copying all the files. And found that, the links are copied, that is where as only the link is supposed to be copied, the original file also copied.
I am worried about what else went wrongly ?
So here is my question, how to exactly copy a partition to another server ?
Note: I actually seen the following, and it did not want to take risk something like this ? ( is this is a risk or good way to copy ? )
bzip2 -c /dev/sda1 | netcat hostA 2222
netcat -p 2222 -l |bzip2 -d | dd of=/dev/sdb3
I sincerely appreciate any help on this.