The only test that counts
A backup has one job: to become your site again after something goes wrong. It is not judged by whether the file exists. It is judged by whether you can turn it back into a working site, and the only way to know is to do it.
What people actually back up
Most sites back up the database and nothing else. The database is usually the smallest and least fragile part.
- The database. Rows, settings, users. Essential, and the part everyone
remembers.
- Uploaded files. Every image and document a user or an editor added. Often
larger than the database and usually forgotten.
- Configuration. Environment variables, mail settings, DNS records, cron
jobs, the certificates and their renewal. These live outside the site and outside the backup, and they are what make a restore take two days instead of two hours.
A backup of the database alone restores a site with no images and no configuration, which is not the site.
Test it on a different machine
The test that finds real problems is restoring somewhere that is not the original. Restoring onto the same server proves the archive opens; restoring onto a clean machine proves the backup is complete. The difference is the configuration, the file paths and the credentials, and they only reveal themselves when the original is not there to fill the gaps.
The questions the test answers
- How long does a restore take? This is your real downtime, and it is usually
longer than the outage you were planning for.
- What is missing? You will find something. Better now than during an incident.
- Who can do it? If the answer is one person, that is a risk. If it is nobody
who is currently reachable, that is a bigger one.
- How far back does it go? A daily backup means you can lose a day. Decide
whether that is acceptable before you need to.
Keep more than one
A backup next to the thing it backs up is not a backup; a single mistake removes both. Keep a copy somewhere else, and keep more than one point in time, because the failure you are protecting against is often one that was copied into the backup before anyone noticed.
Then set a date to restore it again. A backup is not a task you complete, it is a claim you keep testing.
Next in Host Better