In the daily operation of website management, system upgrades are undoubtedly an important link to maintain the health, safety of the website and obtain new functions.However, the upgrade process is not always smooth sailing, and occasionally, unexpected events may occur, such as the failure of the AnQiCMS system upgrade.When faced with a failed upgrade situation, quickly and safely rolling back to a stable version and stopping the affected services is a crucial step that requires calm handling by a senior operations expert.

Preparation before the upgrade: laying the foundation for safe rollback

As a senior operator, we fully understand the principle of 'prevention is better than cure'.Before any upgrade operation in AnQiCMS, regardless of the size of the version update, a strict preparatory process must be carried out, which is the foundation to ensure that a safe rollback can be performed if the upgrade fails.

first, A complete backup of the existing system filesIt is of the utmost importance. This includes all the files of your AnQiCMS application, especially the main program files (anqicmsoranqicms.exe), configuration files (config.json)、template files located/templatedirectory) and all uploaded static resource files (may be located/public/static/Or other custom directory).It is recommended to package and compress the entire AnQiCMS deployment directory and store it in a safe location, preferably on a storage medium isolated from the production environment.

secondly,backup your databaseis crucial. AnQiCMS in项目优势.mdEmphasizing the importance of "resource storage and backup management", which directly relates to the ability to quickly recover in the event of data loss or failure.During the upgrade process, the database structure or data content may change.Therefore, before upgrading, it is necessary to perform a complete export of the database to ensure that all data points have recoverable copies.

Finally,Understand the potential impact of the upgrade. Check the update log of AnQiCMS (changelog.mdUnderstand what core features, data structures, or configuration files may have been modified in the new version.This can help you predict risks and check specifically during rollback.If conditions permit, simulating an upgrade on a non-production environment (such as a test server) is a practice to verify the stability of the upgrade package and the effectiveness of the rollback process.

Identify upgrade failure: symptoms and clues

After the upgrade operation is completed, if the system behaves abnormally, there are usually several obvious symptoms that indicate that the upgrade may have failed:

  • The front end of the website cannot be accessed or displays an error:The user encounters a 500 error, a blank page, chaotic page elements, or incomplete content display when accessing the website.
  • AnQiCMS admin interface abnormal: Failed to log in to the background, or the function is disordered or the page layout is misaligned after logging in.
  • Service process crashes or frequently restarts:The deployment environment displays the AnQiCMS core service process (anqicmsUnable to start or crash repeatedly.
  • System log error:Check the AnQiCMS runtime log file on the server (for example, through)start.shGenerated at script startup.running.logThe file or system log will show a large number of error messages related to the upgrade.

Once any of the above situations occur, the upgrade should be immediately judged as failed, and efforts should be made to roll back.

Securely stop the current service: Avoid confusion and secondary damage

Before performing any rollback operation, the primary task is to safely and thoroughly stop the AnQiCMS service currently running.This can effectively prevent the service from continuing to run in an unstable state, which may lead to data corruption or further deterioration of user experience.

1. Deploy through panel management tools (such as Baota, 1Panel, aaPanel):

If you are deploying AnQiCMS (such as) using visual panels like Baota, 1Panel, or aaPanel via Docker or Go project methoddocker-1panel.md/docker-bt.mdAs stated, stopping the service is the most direct.

  • Enter your panel management interface, find the corresponding AnQiCMS service or Docker container.
  • There will usually be a prominent “Stop” or “Stop” button. Clicking it will automatically execute the stop process operation.
  • Confirm that the service status has changed to “Stopped”.

2. Command-line Deployment (Linux):

For users who directly deploy AnQiCMS on Linux servers using the command line (such asinstall.mdAs described), you can stop the service in the following way:

  • Use the stop script:If you set it during deployment:stop.shScript(start.mdThis provides an example), this is the most recommended way. Enter the installation directory of AnQiCMS and execute./stop.sh. This script will find and terminate the AnQiCMS process.
  • Manually search and terminate the process:If notstop.shIf the script or script execution fails, you need to manually locate the AnQiCMS process and terminate it.
    • First, find the port that the AnQiCMS service is listening on (default is8001such asinstall.mdandfaq.mdas mentioned).
    • Uselsof -i:{端口号}command to find the process ID (PID) that is using the port. For example,lsof -i:8001.
    • Use after obtaining the PID,kill -9 {PID}Forcefully terminate the process with the command. For example,kill -9 7621.

3. Deployment in Windows environment:

When developing or testing locally on Windows, stopping the AnQiCMS service is usually completed through Task Manager:

  • PressWin键 + ROpen the 'Run' window, entertaskmgrOpen Task Manager.
  • Find in the "Processes" or "Details" tab.anqicms.exeProcess.
  • Select the process and click "End Task"