Should the backup take the uploaded images and static files together?
Whether to package the uploaded pictures and static files together, the answer is that data and files must be taken. The gap left by only backing up the database is very specific: after the recovery, the list of articles still exists, and the pictures, attachments, and style files in the main text all point to invalid addresses, making the page look like it has been emptied.The scope of backup should cover both data and static files.——AnQi CMS backup and recovery is inherently done by including 'static files' in the data, which is equivalent to narrowing the scope by half when only the database is exported.
What does it mean when there are missing images after recovery?
Images and attachments are stored in the upload directory as files, and only path references are saved in the database. When backing up separately, the data side has recovered records, but there is no corresponding content on the file side, and the references fall into empty positions.
There are three levels of phenomena: thumbnail issues first, large area occupation on the list page; the main text pictures fail to load; when the static resources of templates and scripts are missing, the page structure itself becomes scattered. The missing categories are different, and the troubleshooting directions are also different - the first two point to the upload directory, and the third points to the template and static resource directory.
Two types of content to include in the backup
| Category | What is included | The phenomenon after missing | Recovery action |
|---|---|---|---|
| data | Articles and categories, tags, users and permissions, site configuration | Back-end blank, column structure lost | Return according to the backup file |
| Upload file | Images, attachments, generated thumbnails | Main text pictures and list thumbnails broken links | Restore upload directory |
| Templates and static resources | Template files, style scripts, and other display resources | Page styles are混乱、modules do not display | Restore template directory and regenerate the page |
When recording the backup range, write the actual location of the site deployment directory and the upload directory in the description. For those deployed with Docker images, confirm that these directories are mounted to the external volume of the container—the image is backed up without including runtime data; for those deployed with Baota panel or aaPanel, the site directory and database backup are two entries, it is easy to click only one of them. It is also recommended to keep such information as the default listening port in the operation and maintenance records, so as to facilitate the verification of reverse proxy configuration during recovery.
The Recycle Bin and backup are not the same thing.
The document status is divided into formal documents, drafts, pending release, and recycling bin, deleting a formal document is to move it to the recycling bin instead of physical deletion, which can be restored. This mechanism solvessingle document deletion error, it is not a site-wide failure: the recycling bin only covers the deleted documents within the site, not the database damage, directory clearing, disk failure and other situations, and does not cover uploaded files either
Taking the recycling bin as a backup is the most common misunderstanding in operation and maintenance records
How to determine the frequency and retention strategy
It's more convenient to set updates by volume rather than by calendar: leave one copy before and after batch imports, revisions, and full-site replacements, and leave them regularly according to the release rhythm. As for the number of copies to keep, just enough to 'be able to revert to the last known normal state' is enough. Too many copies will increase the probability of selecting the wrong file when recovering.
Leave a record of each backup: including which directories, whether it contains uploaded files, who executed it, and how the verification results were. Without this record, when a problem occurs, it is impossible to determine which version to use.
Four steps of recovery exercise
- Build an empty site using the latest backup in an isolated environment, do not try directly in the production environment;
- Open the homepage and read three to five articles with images, focusing on the pictures, attachment downloads, and list thumbnails;
- Go to the backend to confirm the structure of the column, users and permissions, and whether the template can be rendered normally;
- Write down the missing items, fill them back into the backup range, and run it again until there are no missing items.
The frequency of exercises depends on the speed of content changes. Long-term backup without recovery is equivalent to leaving the question of 'whether it can be used' until the day of the real event.
Common questions
Question: The images already have an object storage backup, do you still need to keep a copy in the on-site backup?The answer is: We need to see if the recovery path can be completed independently. If the recovery needs to pull the database and external storage at the same time, we need to confirm that the time points on both sides are consistent, otherwise the references will be misaligned.
Question: If only the template is changed, do we need a full backup?The answer is: At least leave a copy of the template directory with the timestamp of the current data. There is no comparable status before the upgrade, and we can only guess when rolling back.
Question: Where can I find the deleted articles by mistake?The answer is: First check in the recycle bin, formal document deletion is moved to the recycle bin; if there is nothing in the recycle bin, restore according to the backup time point.