Should the backup take the uploaded images and static files together?

📅 October 9, 2026 Eye 10

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

  1. Build an empty site using the latest backup in an isolated environment, do not try directly in the production environment;
  2. Open the homepage and read three to five articles with images, focusing on the pictures, attachment downloads, and list thumbnails;
  3. Go to the backend to confirm the structure of the column, users and permissions, and whether the template can be rendered normally;
  4. 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.

Related articles

When automatic updates are enabled, what is the difference between the default behavior of major and minor versions?

When automatic updates are enabled, there is a big difference in the default orientation between major and minor versions: An official operation manual of a mainstream program states that most sites default to enabling automatic updates, covering four categories: core, plugins, themes, and translation files. Since version 5.6, new installations have default automatic updates for both minor and major versions. For enterprise sites, a more stable compromise is to automatically update minor versions, manually evaluate major versions, and confirm the backup range before the upgrade to include both data and static files.

2026-10-09

How should the filing number be handled when changing servers or access providers?

How to handle the filing number when changing the server of the website, the judgment standard is whether the access provider has changed: When changing the access provider, the access filing should be handled at the new access provider, and the change of materials for the same subject should go through the change filing and require bureau review. This article clarifies two actions, the impact on access during the review period, and the most easily overlooked one when multiple sites share a domain name.

2026-10-09

The difference between panel one-click deployment and command line deployment, where are the differences in daily maintenance actions

Use the same program to deploy with one click on the panel or configure layer by layer with the command line, only once during the installation stage, the difference lies in the four daily actions of adding new sites, certificate renewal, log rotation and backup recovery. This article compares the workload of two paths for each action and explains why it is necessary to compare the environment first before comparing the data when migrating.

2026-10-09

After enabling reverse proxy, the visitor's source address is not accurate, which request header should be added.

After reverse proxy, the source address becomes the address of the proxy server, because the proxy defaults to not transmitting the original Host and Connection headers. The required request headers are Host and X-Forwarded-For: the former passes the original domain name through a variable, and the latter appends the client address. When multiple sites share a single entry point, a missing Host can cause a site error, and the port mapping relationships should also be recorded in the deployment document.

2026-10-09

Static resources added version number still hit the old cache, how should the cache header be written?

Adding version number still hits old files, usually because the response header and filename strategy are not matched: max-age is calculated from the moment the response is generated on the source site instead of the moment it is received, without must-revalidate after expiration, it may continue to reuse outdated copies; s-maxage only manages shared caching and overrides max-age; immutable should be used with version numbers to avoid unnecessary conditional requests. The cache duration for page content and static resources should be configured separately.

2026-10-09

Should compression be done in the program or in the Web server, and should static files be pre-compressed?

Dynamic compression consumes CPU each time a request is made and is limited by minimum length and type list; pre-compression shifts the cost to the publishing stage, sending the existing .gz file directly, but ensuring that the modification time of the original file matches that of the compressed file. The two layers are not substitutes: the content management program is responsible for generation, and the web server is responsible for choosing the sending method based on the client and type, with the help of caching and reverse proxy layers to achieve stable loading speed benefits.

2026-10-09

Certificates are valid for ninety days and automatically renewed, where should this be configured?

The default validity period of the HTTPS certificate is ninety days, and renewal should not wait until the browser alarms. Automatic renewal should be as a fixed scheduled task in the deployment process, after the certificate is issued and before the service is reloaded, and it is recommended to trigger once every sixty days. To confirm that it has been renewed, you need to check the actual expiration date of the online certificate, and also check the old address redirection and mixed content, and keep a backup before changing the certificate.

2026-10-10

Which parts need to be changed when replacing HTTP with HTTPS, including the internal addresses and redirections?

Changing from HTTP to HTTPS is not just about installing certificates. It also involves: the 301 redirect rules for old addresses, hardcoded absolute addresses within the site, the protocol in the sitemap and robots, pseudo-static and standard address configuration, as well as hard-coded links in navigation and single-page applications. The recommended sequence is to first handle certificates and redirects, then perform bulk replacements, and finally update the checklist files and review mixed content.

2026-10-10