Remote system migration under Linux environment

Source: Internet
Author: User

First, the basic understanding:

Netcat is a computer network utility that is used to read and write to TCP or UDP on a network connection. The NC command is the abbreviation for the Netcat command, which is used to set up the router. Netcat in 2001 Insecure.org's vote on the NMAP user mailing list was chosen as the second most useful network security tool. The 2003 poll was the fourth place, and the 2006 vote continued to hold the same fourth place. From: Https://zh.wikipedia.org/wiki/Netcat

Parameters:
-p< communication port;: Set the communication port used by the local host;
-H: Online help;

-L: Monitor the incoming data using the listening mode;

-Z: Use I/O mode, only when scanning the communication port.
Use:

Host: Specifies the IP address or host name of the host;

Port number: Can be a single integer or a range.

Centosa (admin,192.168.1.1): NC-LP 1234

Centosc (client,192.168.1.2): NC 192.168.1.1 1234

second, the experimental environment:

The left Centosa is the machine that needs to be migrated. IP is 192.168.1.1

The right Centosc is the migrated machine with two fast disks. IP is 192.168.1.2

third, the transmission of data (three methods):I-common law:

Left Centosa using: DD IF=/DEV/SDX | NC IP Port

Right Centosc use: nc-l Port | DD of=file

This is the most conservative, when doing the above operation. MD5 should be matched multiple times to prevent file corruption

Note: To start the Centosc netcat data listening port, then use the CentOS transfer.

Cons: Insecure (can use iptables), time-consuming (multiple operations required, large file transfer)

Ii-Convenient Method:

This is more convenient, but the sacrifices are much more satisfying.

Note: This is to demonstrate that the NC data is decompressed directly from the DD to the disk

Advantages: Convenient, transfer (compressed) file small

iii-Safety Law:

It is safest to use openssh for transmission.

Note: OpenSSH is used here, not netcat!. Of course, it is also possible to use Iptables's NC transfer, but it is more secure to compare openssh without tunneling encryption.

Advantages: Safe, Conservative, guaranteed file integrity.

Cons: Transfer slow (encrypted SSH must not be unencrypted for NC fast)

iv. cloning to disk

DD if=< File location > of=/dev/sd< disk number >

If there is a problem with the migration process, you can view my blog about migrating systems article:

Blog Park: http://www.cnblogs.com/itxdm/p/linux_lvm.html or

Linuxcn:https://linux.cn/article-7718-1.html

thinking with other

1, the operation should be backed up data many times before. (Be careful to make a perpetual boat)

2, the operation should be paired MD5 value (prevent file corruption problem)

3. In-Transfer (trusted) should turn on the Iptables security setting (only accept-to-end connection local port)

4, the transmission (the Internet) should be transmitted using SSH (NETCAT transmission is not encrypted)

5, should use BZIP2 and other compressed transmission time and traffic manpower cost.

Remote system migration under Linux environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.