Skip to main content

A Record of a Server Migration

·570 words·3 mins
Table of Contents

Preface #

The day before yesterday (June 7), we had a holiday for the college entrance exam, and I just happened to have no homework. In the morning, I suddenly wanted to replace the old, crappy server that was constantly disconnecting. I figured it was oversold, the experience was terrible, and the configuration was subpar. Although the cost was supposedly monthly, I had contacted the seller directly and paid for a year (since he was quite well-known on Telegram for selling small servers, though I had known him from before and not through Telegram). The after-sales service was practically non-existent. I had no idea how many times it had changed hands between sellers and buyers. After learning all this, I had been waiting for a suitable time to migrate to a stable server that would give me peace of mind. So, I chose this time~

Process #

  1. Server Purchase Process

The server I bought this time is from a purely foreign seller and doesn’t support domestic payment methods (except PayPal). I used my Bank of China’s Mastercard. I had heard that this seller had strict fraud controls, so I filled in the address and name exactly as they are. Despite this, my payment was flagged as fraud immediately. Fortunately, it was in the morning, and Chicago time is 13 hours behind China. I submitted an urgent support ticket and found out they were still working (I know many server sellers claim to be available 24/7, but I also heard this one is quite laid-back and hadn’t specified support hours, though they have been operating stably for 11 years). After some back-and-forth, my payment was quickly restored, and I also requested an IPv6 address.

  1. Migration Process

After purchasing the server, I made a list and found I needed to migrate five services: aapanel, typecho, alist, and docker’s vaultwarden and tg-userbot.

typecho: Initially, I thought typecho would be the most troublesome, while the others would be fine even if I had to rebuild them. However, after searching online tutorials, I found that only the database and configuration files needed to be migrated, which made the process quite easy.

aapanel: I initially planned to use the panel’s one-click migration, but the two servers couldn’t connect, so I had to manually reinstall everything.

alist: Since alist has a built-in backup function, I simply downloaded the export file, reinstalled it, and then imported the backup to restore.

vaultwarden: The password vault hadn’t been updated for a long time, so I decided to abandon it and re-import from Chrome after reinstalling.

tg-userbot: I reinstalled it and imported some plugin backups.

After all this, I updated the DNS settings in Cloudflare and added SSL certificates, completing the entire migration process.

Finally, I installed rclone on the new server and used it to mount OneDrive for automatic scheduled backups of my blog’s database and configuration files, giving me even more peace of mind.

  1. Summary

Although the process sounded simple, it actually took a lot of time due to my own limitations. One issue was the network; the servers were far apart, the old server had poor connectivity, and my local mobile broadband caused SSH to disconnect several times an hour. Additionally, there were numerous small issues… for example, a Tampermonkey script in Chrome caused me to be unable to log into phpMyAdmin to back up the database for a long time orz (.

In summary: I am too inexperienced!