We have previously received the following inquiries:
Our current IDC (data center) provider has abruptly announced the termination of service due to aging data center equipment and restructuring of their server hosting business.
As a result, we need to complete the data migration from our existing server environment within approximately two weeks, and we hope we can assist in migrating to a new server environment.
This means that if the data migration deadline is exceeded, the existing server environment will be forcibly stopped and deleted, and the company’s website and related resources will be completely inaccessible.
Table of Contents
Generally, before migrating a server, we access the web console service panel provided by the IDC server to understand the server configuration: operating system version (Windows/Linux), IP, DNS, CPU, memory, disk, bandwidth, node region, so as to understand the hardware environment configuration.
At the same time, we check the IDC service platform to understand which service resources have been purchased, such as: cloud servers, SQL databases, RDS, SSL, CDN, domain names, and other products. Therefore, the first thing to do is to collect an inventory of the old server environment to provide guidance for subsequent new server procurement and migration.
The current transfer service situation is special. The customer’s website is no longer accessible, and the IDC server provider’s web console website has been shut down.
Our server operation and maintenance engineers are unable to log in to understand the basic configuration of the old server. We have had in-depth communication with the customer and learned that the customer’s company operates a UGC (User Generated Content) website for a specific industry, which is developed using PHP language programming, connected to WeChat public account services, and has online WeChat payment functions.
At the same time, the customer provided the engineer who developed the website for them at the time to contact us, and we roughly understood the basic situation of the customer’s server and running web services.
Hardware environment | Software Environment | Running Service |
CPU: 4G | System version:CentOS 7.9.2009 x86_64 | Website Project: 1 website project |
内存: 8G | operating system:Linux | Database: 1 database |
Bandwidth: 10M (single line) | Program Components:Nginx、PHP、Redis、FTP、Mysql | PHP versions: 5.6, 7.0, 8.0 |
System disk: 40G | Development Port:22、21、3306、443、6379 | phpMyAdmin 5.1 |
Data disk: 200G | Firewall: Nginx Free Firewall | MySQL 5.7.44 |
– | Server Panel: Server visualization panels such as wdcp, pagoda panel, AMH in China, DirectAdmin, VestaCP, Plesk in foreign countries | Website Configuration: 1 Nginx pseudo-static rule
Security Certificate: 1 SSL certificate |
When our server operation and maintenance engineer used Xshell software to log in through SSH, he found that he could not connect, and the local CMD command: tcp ip was also inaccessible, which was another headache and anxious thing.
After coordinating with the IDC service provider, we learned that the current broadband supplier in the computer room had been withdrawn, and only China Mobile broadband was retained.
A computer connected to China Mobile broadband was required to connect. However, we used China Telecom and China Unicom broadband, and could not obtain China Mobile broadband (except for using mobile phone 5G signals, which have large data volumes and long transmission times, and cannot guarantee data integrity). At the same time, the IDC service provider has limited bandwidth and cannot guarantee server data security. It is also impossible to use commands to install images or application components.
The safest way is to use the server image command, and the second is to install cloud components and upload them to the cloud disk. Finally, after collective research by our server operation and maintenance team, we temporarily purchased a Linux transit server using China Mobile, first connected to and logged in to the secondary server through the Xshell software, and then used the command ssh root@127.0.0.1 to log in to the old server.
# ssh conntect old linux servcer
ssh root@192.168.1.2
# write old server 192.168.1.2 pwd
The above paragraph adds a transit server. Through the transit server, we connect to the old server, and then we compress and package the server data, program source code and database.
First, we check the directory and capacity of the data disk and system disk of the old server.
# 查看硬盘
[root@MyCloudServer ~]# df
# 查看目录
[root@MyCloudServer ~]# ls /path/to/directory
# 查看CPU
[root@MyCloudServer ~]# ls lscpu
# 备份所有数据库
[root@MyCloudServer ~]# mysqldump -u[用户名] -p --all-databases | gzip > /path/to/backup_file.sql.gz
# 备份单个数据库
[root@MyCloudServer ~]# mysqldump -u[用户名] -p[密码] [数据库名] > /path/to/backup_file.sql
Another issue is that the client’s server wasn’t assigned to a dedicated server operations and maintenance team responsible for website data backup, server monitoring, website security, and server snapshots. The client chose a niche IDC provider because its servers offered comparable pricing compared to large, global IDC providers like Alibaba Cloud, Tencent Cloud, and AWS, without even considering the cost savings associated with website data security and stability.
The lack of contracted server maintenance, website backup, and server monitoring services also increased the time required for subsequent backup mechanisms. We analyzed the server’s critical website program capacity, which was 160GB, leaving 40GB of backup space, posing a significant challenge to service compression. Therefore, our server operations and maintenance team implemented a batch-by-batch approach, prioritizing the most important tasks.
First, we packaged and transferred the existing executable PHP source code directory and MySQL database to a staging server. We also packaged and transferred large file directories like images in batches, followed by the website and server logs. Finally, we packaged and transferred all server services, including Nginx, MySQL, and PHP (including their configurations), including the entire visual server control plane.
# 传输压缩包
[root@MyCloudServer ~]# scp /local/path/backup.tar.gz username@remote_host:/remote/path/
# 传输目录
[root@MyCloudServer ~]# scp -r /local/directory/ user@remote_host:/remote/path/
A small incident occurred: the IDC service provider only had one mobile broadband connection.
A large amount of customer data needed to be downloaded, backed up, and transferred to other servers, resulting in slow transfers and potentially disconnected connections. To address this, our server operations team conducted a detailed analysis of the client’s website program components, prioritizing transfers and capacity requirements.
We also implemented 24/7 monitoring of the transfers and performed multiple backup checks to verify data duplication. Since the client had not yet confirmed whether to launch the website, they wanted to download the archived website program and database, and required that the downloaded data be protected from loss. Therefore, our server operations team temporarily used a transit server to establish a test platform for the client’s website to verify data integrity, paying particular attention to database transfers that could result in data loss or garbled data due to disconnections.
Over a three-day, 24/7 operation, we completed the complete migration from the old server to the transit server. Simultaneously, we deployed a test server to verify data integrity and ensure the website was operational.
The customer gave a very high evaluation of our server operation and maintenance for this server migration project. Because the image files of the customer’s website data are too large, the customer requires us to deduplicate and compress the images and delete the referenced images to save data disk capacity. It takes some time to process this service.
After communicating with the customer, we first purchased a server with the corresponding configuration. Subsequently, the website images were deduplicated and compressed before being migrated to the new server to launch the website. At the same time, a server operation and maintenance and monitoring service contract was signed.
When purchasing or signing up for a new server, be sure to choose a highly reliable service provider or a global cloud platform.
For projects requiring online payment transactions, data security, and consistency, we recommend considering large-scale platforms such as Alibaba Cloud, widely used in China and globally, or AWS, widely used in Japan, Europe, and the US. These platforms offer global nodes, stable access, comprehensive redundancy mechanisms, and ensure data security and consistency.
When purchasing servers, our company comprehensively considers factors such as node architecture, CDN, bandwidth, backup, security, and operations and maintenance, and provides 24/7 support for server environments.
● Website development, server construction — service consultation ●
▼ Company WeChat Official Account▼
▼ Contact person in charge WeChat ID ▼
Follow us on WeChat