Website backups: what to save and how to test recovery
Site backups are needed to return to a working state after an error, unsuccessful update, data corruption or server loss. The very fact of the archive’s existence does not answer the main question: will it be possible to restore the desired site and continue working.
A frequent problem is discovered too late: the copy contains photographs, but there is no enquiry database; the archive remains on an inaccessible disk; the instructions require access that only the former contractor had. Therefore, backup should be described as a complete process: composition, schedule, separate storage, control and trial recovery.
Below is a practical checklist for the site owner. It helps to coordinate requirements with the developer and support. Specific commands and storage methods depend on the design of the project; the same scheme for a landing page and an actively working client dashboard is usually not suitable.
1. Identify data you cannot afford to lose
First, list what changes on the site: texts, images, settings, requests, orders, documents, accounts and payment history. For each type of data, determine the acceptable time loss. If requests appear throughout the day, yesterday’s copy may not cover the needs of the business.
Specifically discuss acceptable downtime. Returning a small information site and restoring a service with a queue of tasks are operations of different complexity. Speed depends not only on the size of the archive, but also on the availability of a server, access, compatible versions of programs and clear instructions.
Describe the requirements in human terms: what new records cannot be lost and how long the business can operate without a website. After this, the technician selects the frequency, storage means and inspection procedure. The promise of “backups every day” without the composition and recovery procedure says too little about the result.
2. Keep database and file backups consistent
Typical WordPress requires both files and a database. This is specifically emphasized in the Official WordPress Backup Guide. The files contain themes, plugins, downloads and configuration, and the database contains records, settings and other application data.
An arbitrary site may have important data located outside the public folder: client documents, a separate database, downloaded materials, processing tasks or configuration of background processes. The composition of the copy must be obtained from the actual structure of the project. Copying only the directory that is accessible through the domain does not guarantee completeness.
The files and database should be saved as a consistent set. Actively changing data may require a special mode or consistent snapshot mechanism. For example, the command wp db export is intended to export the WordPress database; By itself, it does not save images and site files. Write down exactly what is included in each archive.
3. Store a copy away from the production server
A copy on the same server is convenient for a quick rollback, but shares some of the risks with the site: disk failure, loss of access, erroneous deletion or compromise. You need a separate copy in another location, the availability of which does not depend on the production server.
If you choose storage on a computer, check that the files are actually received. A turned off PC, lack of internet, or a full disk may interrupt the transfer. The job schedule does not confirm that the latest copy actually ended up on the device. For another server or cloud storage, transmission control and access verification are also required.
The archive may contain personal data and service configuration. Don’t post it to a public link in your site folder. Limit access to storage, protect copies, and provide separate access to decryption tools. In an emergency, they must be accessible to an authorized person.
4. Choose backup frequency and retention
The frequency is determined by changes and acceptable data loss. For a rarely updated portfolio and a system with constant orders, the requirements are different. You also need a separate recovery point before updating, migrating, or making major edits, even if the next scheduled copy is due later.
Don’t limit yourself to just the latest archive: an error may be noticed after several copy runs. Coordinate multiple points for different periods and retention periods, taking into account volume, cost and data requirements. Do not set retention automatically indefinitely.
Rotation should remove old versions after a new set has been successfully created and verified. If a new copy fails, the last usable version should be retained. Do not include a folder of previous archives inside each new archive: this quickly wastes space and complicates recovery.
5. Verify completion and integrity
The process must have a clear outcome: successful, error, or not completed. Start and end times, list of components, file sizes, and result of transfer to external storage are useful. An archive that is too small or an expected component is missing requires verification, even if the command completed without error.
The checksum helps verify that the file has not changed during transmission. Checking the archive structure and reading the contents reveals some of the damage. But these checks do not prove that the database is imported, the application is launched and users receive their data. This requires a separate trial recovery.
Provide notification of failure and if the last successful copy is too old. If no one receives or understands such messages, automation can only create a sense of security for a long time. It is convenient to include control issues in agreements on site support after launch.
6. Restore a copy in a test environment
Test the recovery in a separate test environment. We need compatible versions of programs, a new test base and independent storage paths. Don’t import a sample copy on top of a live site just for the sake of testing, as you may lose more recent changes.
Before launching the restored application, disable real emails, bot messages, payments, webhooks, and background jobs that might impact clients. Close your environment from outsiders and search indexing. Changing the domain alone is not enough: addresses of external services and active integration settings may remain in the database.
Record how long the restoration took, what actions were needed and what data was missing. The result is useful when the procedure can be repeated by another authorized specialist. If a test requires undocumented manual corrections, they must be included in the instructions or the cause must be corrected.
7. Check the site after rollback
The open main page is only the beginning of the test. Verify key records, images, documents and settings. Log in with a test account, check permissions and access to files. For a store or account, it is important to see related entities, and not just the number of rows in the database.
- Open the main pages and check the design.
- Check the login and sharing of access between users.
- Compare several records and related attachments.
- Perform a test operation without actual sends and payments.
- Check application errors and background processes.
- Make sure that the state of the data corresponds to the selected point restoration.
For a project with forms, a technical checklist before launching the site will be useful. After the actual recovery, they decide separately how to take into account new requests and operations that appeared later than the saved copy.
8. Document what to do when recovery fails
In the instructions, indicate the location of the copies, the person responsible, the method of obtaining access and the recovery procedure. Passwords and keys should not be placed in a regular document with instructions. It is enough to designate the protected storage location and who has the right to gain access.
Describe who makes the decision to rollback, how the desired version is selected, and how the current state is saved before replacement. The damaged system may also contain fresh data necessary for investigation or transfer. Rolling back without preliminary assessment can add losses.
The check should be repeated after significant changes in the architecture and composition of the data. The result should be a confirmed ability to restore the desired version of the site, and not just a message about the successful creation of the archive.
Describe in the brief the site and the data that is important to save – this will help agree on the composition of the copies, separate storage and verification of recovery.