Should static files be taken along with the backup, and which items should be verified during the recovery exercise?
Should static files be taken along with the backup, which items should be verified in the recovery exercise, and the conclusion is that the range should be taken together and the verification should be carried out by category according to the address. AnQiCMS's backup and recovery supports the data range that includes static files, which means that the site assets such as images are already in the backup location; if only the database is exported, the text of the restored site will still be there, but the images referenced in the detail pages, the generated pages, and the upload directory will all be empty at the same time, this kind of gap is not visible in daily life, only after replacing the machine or mistakenly deleting it.
What will be missed if only the data is backed up?
The database carries the entry itself: title, content, field values, and category归属. Static files carry things beyond the content - uploaded images and attachments, staticized products generated by templates, and files written during the site's runtime. They are backed up separately, and when restoring, it has to be done in two steps, with the second one being the easiest to forget.
There are three typical symptoms: detailed page images are all cracked, the list page style does not match the generated page, and files are missing in the upload directory on the backend, but the article records are still there. Seeing these three types, it is basically determined that the backup range only covers data.
How to determine the backup range?
Define by 'able to run independently after recovery,' rather than by 'how big this file is.' You can check according to the following four questions.
| Self-check item | Only prepare data | Data plus static files |
|---|---|---|
| Article main text and field values | In | In |
| Uploaded images and attachments | Not available, the reference will be empty after recovery | In |
| Generate pages and sitemap files | Not available, needs to be regenerated before submission | In |
| Actions required for recovery | Database import and secondary supplement file | Verification after one-time restoration according to the list |
There are also two things to keep in place: one is the sitemap, the address list should be able to be regenerated and submitted after restoration, otherwise the addresses in the new environment will not match the cognition of the side; the other is the destination of deleted records, formal document deletion is to move to the recycle bin instead of physical deletion, the content in the recycle bin after restoration is still in place, drafts and pending publication status are also retained separately, do not treat them as duplicated data to be re-imported.
Which items should be verified during the recovery exercise?
The purpose of the exercise is not to prove that the backup file exists, but to prove that it can be restored to an available site. The minimum verification list is five items, each of which must be opened to check, not just the home page.
First item list page: pagination can scroll to the end page, and the column attribution is correct. Second item detail page: the text is complete, images can be loaded, and custom fields have values. Third item site map: files can be accessed, and the number of addresses is consistent with the actual content level of the site. Fourth item backend entry: can log in, and permissions and roles are not misplaced due to restoration. Fifth item upload directory: upload a picture again in the restored environment, confirm that the write path is available, and the old picture can still be accessed.
The easiest to miss among the five items is the fifth item. The first four items can be verified by reading alone, but the fifth item requires writing, and in the production environment, it is most common to expose directory permissions and disk location issues at this
What are the differences between container deployment and panel deployment exercises?
The same backup has different recovery paths under two deployment methods, so they need to be practiced separately. For Docker image deployment, the recovery action falls on the image, mounted directory, and the data volume of the database container; if changed to a Baota panel and other types of visual management, the site directory, database instance, and pseudo-static rules are located in different positions, and it is easy to only move the directory and forget the rule file during recovery. Practice both paths once, note the location of each step, and you won't have to guess when a real problem occurs.
How to arrange the frequency and retention of drills?
Before versioning, upgrading, and migrating, perform a full backup each time, and daily updates are scheduled according to the site update frequency: sites updated multiple times a day should keep daily backups plus weekly backups, and sites with slow updates should keep weekly backups plus monthly backups. At least one "before change" backup should be retained to have a rollback target if the versioning fails. After each drill, record the results of the verification checklist in a line, noting the time, the day to which it was restored, and whether each of the five items passed. This record itself is the operation and maintenance ledger.
Common questions
Question: Can we only keep the database backup files, as they are very large?Can an additional lightweight data backup be saved for comparison, but the target that can be rolled back must be a complete backup containing static files, otherwise the restored site will be unusable.
Question: If all the images are stored in object storage, do you still need to backup?Answer: It is still necessary to confirm the independent backup strategy of the bucket. Off-site storage is not automatically included in the site backup, and the accessibility and path must be checked separately during recovery.
Question: How often should the exercises be conducted?Answer: At least once a quarter for a complete restore, plus one before each major change; backups that have never been exercised cannot be considered backups.