by GorkhaTech Team
Published 03 December 2026
Most business owners assume their website is backed up somewhere. Often it is, partly. The trouble shows up on the worst possible day: a hacked plugin, a failed update, or a hosting account that gets closed. That is when people discover the backup was missing the database, or was stored on the same server that just went down, or simply would not restore. This guide explains what a complete backup contains, how often to make one, where to keep it, and how to run a test restore so you know it works before you need it.
A website is not one thing. It is several pieces that have to come back together. If any piece is missing, you may get a site that looks broken, has lost recent orders, or cannot be reached at all. A complete backup covers four areas.
The DNS piece surprises people because it is not on the server at all. But if your hosting changes or someone deletes a record by mistake, a saved copy lets you rebuild email and web routing in minutes instead of guessing.
The right schedule depends on how much work you can afford to lose. Ask a simple question: if the site failed right now, how far back could we go without real harm? That answer sets your frequency.
Also decide how long to keep old copies. Keeping several daily backups plus a few weekly and monthly ones helps when a problem, such as malware, went unnoticed for a while and the newest backups are already infected.
A backup stored on the same server as the website protects you from almost nothing. If the server fails, is compromised or the hosting account is suspended, the backup goes with it. A widely used guideline is the 3-2-1 rule: keep three copies of your data, on two different types of storage, with one copy offsite.
If your host or a plugin handles backups automatically, that is a fine starting point. Just confirm it covers both files and database, and add one copy that lives somewhere you control. For developers managing a Linux server with a MySQL database, a basic manual backup looks like this:
DATE=$(date +%F)
tar -czf site-files-$DATE.tar.gz /var/www/example
mysqldump --single-transaction -u backup_user -p example_db | gzip > site-db-$DATE.sql.gzThe first command bundles and compresses the site folder. The second exports the database into a compressed SQL file. Both files then need to be copied offsite.
A backup you have never restored is a hope, not a plan. Schedule a test restore every few months and after any major change to your site or hosting. Do it on a staging site, which is a private copy of your website used for testing, never on the live site.
For the database step on the server example above, importing a compressed backup into a staging database looks like this:
gunzip < site-db-2024-01-15.sql.gz | mysql -u staging_user -p staging_dbFinally, check your DNS notes against what your DNS provider currently shows. If records have changed since you last saved them, update your copy.
A useful backup has four parts (files, database, configuration and DNS records), runs on a schedule that matches how often your site changes, and lives somewhere other than your web server. Most importantly, it has been restored at least once on purpose, so the real emergency is a routine you have already practiced. If you would like help setting up backups or running your first test restore, contact GorkhaTech.