How to back up data for AnQiCMS project before stopping or deleting it to prevent any unexpected situations?

Calendar 👁️ 58

Retire with success, data as the foundation: Data backup strategy before the deactivation or deletion of the AnQiCMS project

As an experienced website operations expert, I know that each content management system carries not only text and images, but also the digital assets of corporate brand image, marketing wisdom, and even core business logic.For the familiar AnQiCMS (AnQiCMS) such an enterprise-level content management system based on Go language, which is known for its efficiency, security, and customizable, the value of the data it manages is self-evident.

When a decision is made to discontinue or completely delete an AnQiCMS project, our primary consideration is how to back up the data 'without a single failure' to prevent any unforeseen circumstances.This is not just a technical operation, but also a respect and protection for digital heritage.In the end, data is the lifeline of a website, whether it is for future data migration, compliance audits, or simply as a precious historical archive, a complete and reliable backup is crucial.

Next, let's discuss in detail how we should carry out a comprehensive data backup before the AnQiCMS project bids farewell to the stage.

The core artery: a full backup of the database

The powerful functions behind Anqi CMS are supported by the database.All the content of the website (articles, products, pages), user data, system configuration, SEO settings, category tags, comments and so on are safely stored in the database.Therefore, making a complete backup of the database is the core of the entire backup work.

AnQiCMS is usually paired with MySQL database during deployment. The most reliable way to backup MySQL is to usemysqldumpTool. This tool can export all the data, table structures, and stored procedures in a database into a single SQL file.

If you have manually deployed AnQiCMS on a Linux server and have installed MySQL directly, you can connect to the server via SSH and execute commands similar to the following:

mysqldump -u [数据库用户名] -p[数据库密码] [数据库名称] > /path/to/your/backup/anqicms_db_backup_$(date +%Y%m%d%H%M%S).sql

Be sure to set[数据库用户名]/[数据库密码]and[数据库名称]Replace with your actual information./path/to/your/backup/It is the directory where you want to store the backup files. For easy management, I am accustomed to adding a timestamp to the filename, so that I can clearly know the backup time.

If your AnQiCMS is deployed in a Docker container, such as through 1Panel or aaPanel installation, then the database usually runs in an independent Docker container. At this point, you need to find the ID or name of the MySQL container, then throughdocker execCommand to enter the container and execute backup:

  1. First, get the ID or name of the MySQL container:docker ps
  2. Then, execute the backup command (assuming the MySQL container is namedmysql):docker exec -it mysql mysqldump -u root -p[root密码] [数据库名称] > /path/to/your/backup/anqicms_db_backup_$(date +%Y%m%d%H%M%S).sql

This is something that needs to be noted,[root密码]Is the root user password you set when installing MySQL in Docker. The backup files will be saved on the host machine./path/to/your/backup/directory, not inside the container.

Chapter 2: Flesh丰满:Complete File System Copy

In addition to the database, the 'flesh' part of the AnQiCMS website - various static files and core configurations - is also indispensable.This mainly includes user-uploaded images, videos, attachments, and template files that you may have customized, as well as configuration files crucial for system operation.

  1. Uploaded Resources:Generally Located Under the AnQiCMS Installation Directory:/public/uploadsThese files carry the visual and auxiliary information of the website content and are indispensable.
  2. Website template files:Located under the AnQiCMS installation directory./template. If you have customized the default template, these files are the fruit of your labor.
  3. Core configuration file:Under the installation directory,config.jsonThe file, although many settings can be adjusted in the background, contains basic configurations such as database connections and port settings, which are crucial for system startup.

Backup these files, the most direct way is to package the entire AnQiCMS installation directory. In a Linux environment, you can usetarcommand to compress and package:

cd /path/to/your/anqicms/root/directory
tar -czvf anqicms_files_backup_$(date +%Y%m%d%H%M%S).tar.gz .

This command will package and compress all files and subdirectories under the current directory (i.e., the root directory of AnQiCMS) into one.tar.gzfile. Please make sure you run this command when,cdReached the root directory of AnQiCMS.

If you have configured external storage, such as cloud storage services, through the 'Resource Storage and Backup Management' feature of the AnQiCMS backend, then the website's images and other resources may already be stored remotely.In this case, you need to confirm whether the data in these external storage has also been safely backed up, or whether it is independent of the AnQiCMS project lifecycle.But even so, the local template file andconfig.jsonStill need to backup separately.

III. Special considerations in multi-site environments.

AnQiCMS is a major highlight with its powerful multi-site management capabilities.If you have built and managed multiple sites on an AnQiCMS instance, you need to be particularly careful when making backups.

According to the document, AnQiCMS multi-site deployment allows each site to have an independent database name and site root directory (for example/app/dev_anqicms.com)。This means:

  • Independent database backup:Each sub-site has its own database. You need to perform a database backup for each sub-site individually, just like backing up a single AnQiCMS project.
  • Independent site directory backup:Although the core program files may be shared, the specific data of each child site (such as cache, possibly existing independent configuration, or uploaded files) will be stored in its dedicated directory.You need to make sure that the files in these specific directories are also packed and backed up.For example, in the Docker multi-site configuration, the document mentions that the site root directory will be set to/app/Starting with the domain name replaced by underscores, such as/app/dev_anqicms.com.

Be sure to back up the data and files for each "independent operation" sub-site under a multi-site environment, ensuring that they are retained completely and independently.

The, verification and storage after backup

Just executing the backup command does not mean that you can rest easy. The validity of the backup file is crucial, and a proper storage strategy is also important.

  1. Backup file verification:After the backup is completed, I strongly recommend that you perform a simple verification of the backup file.For example, try to unzip the package and check if it contains the expected database files and directory structure.If conditions permit, even try to recover some data in an independent, temporary environment to ensure the integrity and availability of the backup.
  2. Multi-regional storage strategy:Avoid putting all your eggs in one basket. Store backup files in at least two different physical locations: one can be stored on another hard disk or network storage on the server (for quick recovery), and the other should be downloaded to a local computer or uploaded to a reliable cloud storage service (such as OSS, cloud disk, etc.).For extremely important data, offline storage can even be considered.Encrypting backup files can further enhance data security.

Conclusion

Stop or delete an AnQiCMS project, marking the end of a stage.At this significant point, a complete and reliable data backup is the best monument to our past efforts and a valuable asset left for future needs.It can not only help you avoid potential data loss risks, but also give you a sense of security and peace when the project is successfully completed.Let us develop good backup habits so that the value of digital assets can be sustained forever.


Frequently Asked Questions (FAQ)

Q1: Does the AnQiCMS backend have the 'Resource Storage and Backup Management' feature, is it sufficient to meet the complete backup needs before project suspension?

A1:The "Resource Storage and Backup Management" feature of AnQiCMS backend focuses on the storage configuration of website runtime resources and the backup and recovery of system data, which is very useful for data recovery and preventing data loss in daily operations.But for the "absolutely reliable" backup before the complete shutdown or deletion of the project, I suggest that you still combine manual backup of the database and the entire file system method.The background function may focus on content data and some settings, but manually packaging the entire installation directory can provide a more comprehensive protection, such as custom templates, server-level configurations, or certain log files.Manual backup gives you complete control and integrity over your data.

Q2: If I only need to backup the content of AnQiCMS articles, can I directly copy the tables in the database?archivesIs that okay?

A2:Technically speaking, you can directly copyarchivesThe table can indeed retrieve the content of the article. However, the content management of AnQiCMS is highly integrated. The article may be associated withcategories(Categories),tags(Tags),images(Image resources) and multiple tables. In addition, the image path in the article content usually points to/public/uploadsfiles in the directory. If you only copyarchivesThe table, without also backing up the associated category, tag data, and actual image files, the article is likely to be incomplete and missing images after recovery. Therefore, it is strongly recommended to follow the above method for the integrity of the content.

Related articles

Is there a special consideration for stopping the AnQiCMS project when the server memory is insufficient?

As an experienced website operations expert, I fully understand the importance of server resource health status for the stable operation of the website.When the server's memory indicator light turns red, it often means that the system is at the edge of sub-health or even danger.For a content management system like AnQiCMS, choosing to stop the project in such an emergency situation indeed involves some special considerations that are worth in-depth discussion.

2025-11-06

How can AnQiCMS be stopped and restarted correctly after changing the configuration (such as the port)?

As an experienced website operations expert, I am happy to elaborate on how to properly shut down and restart AnQiCMS after configuration changes (especially port changes).This is not only the key link in daily maintenance, but also the foundation to ensure the stable and efficient operation of the website.

2025-11-06

How to check if the `stop.sh` script of AnQiCMS has sufficient execution permissions?

As an experienced website operations expert, I know that a stable-running website cannot do without proper management of the background scripts.AnQiCMS thanks to its high efficiency and security features, is deeply loved by our operation staff.In routine maintenance, whether it is for version upgrades, configuration adjustments, or simple restart operations, we may need to use the system's built-in `stop.sh` and `start.sh` scripts.However, a seemingly simple operation may be hindered by a minor permission issue.

2025-11-06

Does stopping the AnQiCMS service affect the access to the back-end management interface?

Hello, as a senior website operations expert, I know that every technical detail may affect the stability and management efficiency of the website.Today, we will delve deeply into a core issue about AnQiCMS service: Will stopping the AnQiCMS service affect the access to the back-end management interface?The answer is affirmative: **Stopping the AnQiCMS service will directly result in the inability to access your website's front-end and back-end management interfaces.

2025-11-06

How to identify the PID of AnQiCMS process to manually stop or monitor?

As an expert who has been deeply engaged in website operation for many years, I am well aware that AnQiCMS, with its genetic code of Go language, performs excellently in terms of performance and security.However, even the most stable systems are bound to encounter scenarios that require manual intervention, whether it be for troubleshooting, resource optimization, or dealing with emergencies.At this time, accurately identifying and managing the PID (Process ID, process identifier) of the running AnQiCMS process is particularly crucial.Mastering this skill will enable you to handle complex problems with ease.

2025-11-06

What are the special guidelines when upgrading AnQiCMS from version V2.x to V3.x and stopping the old project?

As an experienced website operation expert, I have a deep understanding of the upgrade path from V2.x to V3.x of AnQiCMS and the operation considerations behind it.This version upgrade is not only an iteration of features, but also an optimization and modernization transformation of the underlying architecture.Faced with the discontinuation of the old version of the project, we are not simply taking it offline, but need a comprehensive and natural strategy to ensure the continuity of business and the integrity of data.The V3.x version of AnQiCMS, a high-performance architecture based on Go language, simplifies deployment

2025-11-06

After stopping the AnQiCMS project, do you need to manually clean up the cache data?

## After stopping the AnQiCMS project, do you need to manually clean up cache data?Professional interpretation and practical guide The start and stop of projects in the daily operation of a website is a common scene.For a CMS like AnQiCMS that is committed to providing efficient and customizable enterprise-level content management systems, its built-in caching mechanism is the key to ensuring the high performance of the website.However, when we need to stop the AnQiCMS project, a common question will arise: do I need to manually clean up cache data?

2025-11-06

How to ensure a safe interruption of ongoing operations (such as collection) when AnQiCMS stops?

As an experienced website operation expert, I know that every system start-up and shutdown operation affects the stability and data security of the site.Especially for tasks like content collection that require long-running operations and involve data writing, how to ensure safe interruption when stopping the CMS, to avoid data corruption or leaving behind zombie processes, this is indeed a concern for operators.AnQiCMS (AnQiCMS) is an efficient content management system developed based on the Go language, which considered these issues from the beginning of its design.

2025-11-06