How to smoothly migrate old data after stopping the AnQiCMS project and redeploying a new version?

Calendar 👁️ 58

In the dynamic journey of website operation, technological iteration and upgrading is the norm.How to ensure that the data of the old website can be seamlessly migrated to the new environment when you decide to stop the current AnQiCMS project and plan to deploy a brand new, more powerful version, while minimizing business disruption, is a key challenge that every operator must face.As an experienced website operation expert, I am well aware of the importance of data. Next, I will elaborate on the strategy and steps of this smooth migration based on the characteristics of AnQiCMS and relevant documents.


Understand the data structure of AnQiCMS: basic cognition before migration

Before starting the data migration, we first need to clarify the core data storage mechanism of AnQiCMS. AnQiCMS, as an enterprise-level content management system developed based on the Go language, stores all site content, whether it is articles, products, categories, tags, or user data, system configuration, mainly inMySQL databaseChinese. In addition, the images, attachments, and other static resources of the website are stored in the file system of the server, usually located in the AnQiCMS installation directory.public/uploadsFolder. While the operation configuration of AnQiCMS itself, such as port, database connection information, etc., is stored in its root directory.config.jsonIn the file. Understanding this is the foundation of the smooth migration strategy.


The core strategy and steps of smooth migration.

Data migration is never as simple as copying and pasting files. It requires a thorough and rigorous plan to ensure data integrity and service continuity.

1. Foolproof preparation: Backup, backup, and backup again!

This is the golden rule for any data operation. Be sure to backup the old system before any migrationFull backup.

  • Database backup:This is the most important step. Log in to your database management tool (such as phpMyAdmin, Navicat, or directly using the command line) and export all the databases used by your old AnQiCMS project.Make sure to export as.sqlFormat, including all table structures and data.
  • File system backup:Compress all files and folders under the old AnQiCMS project deployment directory, especiallypublic/uploadsDirectory (including all images, attachments, and other resources uploaded by users) and any customizations you may have madetemplateTemplate files under the directory. Don't forget to back up the project as wellconfig.jsonFile that may contain your unique configuration information.
  • Record key configuration:Record the current Nginx or Apache reverse proxy configuration, domain binding, SSL certificate path, the running port of the old version of AnQiCMS (default 8001), and the administrator account password in detail for reference when configuring the new version.

2. Smoothly pause old service: make way for the new version

After you confirm that all backups have been properly stored, you need to stop the old version of AnQiCMS service in the most stable way to ensure that all pending transactions in the database are completed before stopping, to avoid data corruption.

  • If you deploy through Baota panel, you can enter the "Website" -> "Go project" or "Other project" to stop the corresponding project, or delete its scheduled task.
  • If you are deploying via command line, run the script in the project root directory../stop.shJust do it.
  • If you are deploying via Docker, then throughdocker stopStop the management interface of command or 1Panel/aaPanel.

The goal of this step is.Completely terminate the old version of AnQiCMS process.Relieve its occupied ports and resources to prepare for the new version.

3. Deploy a new AnQiCMS environment: a clean starting point.

Now, we will deploy the new AnQiCMS version. It is recommended to install it in abrand new, independent directoryornew Docker containerThis avoids problems caused by file conflicts and provides convenience for future rollback of failures.

  • Please select the deployment method:AnQiCMS supports various deployment methods, such as Go projects on Baota panel, Docker (1Panel/aaPanel/Baota Docker App Store), or command line deployment. Regardless of the method chosen, please follow the official installation tutorial for the new version of AnQiCMS, but please noteDo not perform initial installation(That is, do not access the website front end, let it trigger the creation of a new database and files).
  • Allocate independent resources:If you are deploying on the same server, make sure to use one version of the new AnQiCMSDifferent from the old versionThe runtime port (for example, old version 8001, new version 8002), and create aNew, empty MySQL databaseIf it is Docker, the internal port of the container can still be 8001, but the port mapped to the host should be different.

4. Core data migration: Inject old data into the new version

This is the core link of smooth data migration, we will import the old version of the data into the new environment.

  • Restore database data:Import the old version of the database that you backed up in the first step.sqlFile, import to the one that is configured in the new version of AnQiCMSNew, empty MySQL database.

Related articles

What is the relationship between the port configuration in the `config.` file of AnQiCMS and stopping/startup?

In the daily operation and maintenance of AnQi CMS, we often deal with various configuration files.Among them, the `config.` file is undoubtedly one of the 'lifelines' for the operation of AnQiCMS, carrying the core parameters for system startup.Today, as a veteran with many years of experience in website operations, I will delve into the configuration of the `config.` file regarding ports, as well as its inseparable connection with the start and stop of AnQiCMS services.

2025-11-06

How to temporarily disable some features of AnQiCMS without completely stopping it?

## Flexible Control: Disabling Specific AnQiCMS Features Without Interrupting Service As an experienced website operations expert, I know that in our daily work, we often need to fine-tune website features, sometimes to test new modules, sometimes to temporarily disable certain services that are no longer applicable, or to maintain and upgrade without affecting core business.How to temporarily disable some functions of AnQiCMS without completely stopping it?

2025-11-06

What negative impacts will there be on the SEO spider crawling the website after the AnQiCMS service is stopped?

As an experienced website operations expert, I know that every CMS system is crucial for the SEO performance of a website, especially systems like AnQiCMS (AnQiCMS) that integrate a large number of SEO-friendly features from the very beginning.It not only provides the efficiency of content management, but also secures a place for the website in search engines through a series of advanced SEO tools.

2025-11-06

Where is the default directory of AnQiCMS's `start.sh` and `stop.sh` scripts?

As an experienced website operations expert, I know that a high-efficiency and stable content management system (CMS) is crucial for the successful operation of a corporate website.AnQiCMS with its lightweight and efficient Go language stands out among many CMS systems, providing us with a solid foundation.In daily system maintenance and troubleshooting, the `start.sh` and `stop.sh` service management scripts of AnQiCMS play a core role.

2025-11-06

The AnQiCMS Operation Manual: Easily resolve the startup dilemma of 'port already in use'

When using AnQiCMS to manage your website, you may occasionally encounter a pesky but quite common error: "The port is already in use".As a content management system developed based on Go language, known for its efficiency and stability, AnQiCMS usually runs smoothly.However, when it throws this error during startup or restart, many operators may feel at a loss.Don't worry, this problem is not unique to AnQiCMS, but a challenge that all network service-based applications may encounter.

2025-11-06

What specific improvements are mentioned in the "elegant startup and restart" of AnQiCMS's changelog?

As an experienced website operations expert, I am well aware of the importance of a stable and efficient CMS system for the operation of a corporate website.In the update log of AnQiCMS (AnQi CMS), we noticed that the feature of "elegant startup and restart of the blog" was proposed in version v1.0.0-alpha, which was then inherited and developed throughout the AnQiCMS system.This seemingly simple description actually contains profound considerations of AnQiCMS in system design and operation experience.In my opinion

2025-11-06

How to confirm that all related processes have exited after stopping the service in the AnQiCMS command-line deployment environment?

AnQiCMS, as an efficient content management system built with Go language, is known for its lightweight and high performance in command-line deployment environments.The characteristics of Go language make AnQiCMS usually compiled into an independent binary file, which simplifies deployment, but also means that we need to clearly understand how to manage its lifecycle.Especially when we need to stop the service, how to ensure that all related background processes have been completely exited, to avoid resource occupation or potential service conflicts, is a critical step to ensure the stable operation of the system and prevent the appearance of 'zombie processes'.###

2025-11-06

After the AnQiCMS project stops, can its static resource files still be accessed through CDN?

AnQiCMS (AnQiCMS) is an efficient and customizable content management system that plays a core role in website operations.Regarding the question of whether the static resource files of the 'AnQiCMS' project can still be accessed via CDN after it stops?This question, as an experienced website operations expert, I am well aware that it involves multiple aspects such as website architecture, content distribution mechanism, and CDN working principles.To accurately answer this question, we need to delve deeply into how AnQiCMS manages static resources and how CDN interacts with these resources from two perspectives. First

2025-11-06