🛡️
Hosting

Is your hosting backup enough? The 3-2-1 rule in practice

16.11.2026
← All articles

Many site owners relax when they hear "the host keeps backups". Host-side backups are genuinely useful for restoring an accidentally deleted file or rolling back a failed update. But if every copy lives in one place, with one provider and often under one account, they don't protect against certain risks. That is why backup professionals have long recommended a simple rule: 3-2-1.

What 3-2-1 means

Keep at least three copies of your data, on at least two different kinds of storage, with at least one copy offsite. It isn't tied to any product; it is simply a way to make sure one event can't destroy every copy at once.

Rule partMeaningSmall-site example
3 copiesThe original plus two backupsLive site, daily archive on hosting, external copy
2 kinds of storageCopies don't share one device or systemHosting disk plus cloud storage or an office PC
1 offsite copyAt least one copy somewhere elseCloud or external drive outside the hosting

Backups that only live inside the hosting account partly cover the first two rows, but not the offsite copy, and that last copy is what saves you in the worst cases.

When hosting-only backups fail you

If an attacker gets the panel or FTP password, they can delete or encrypt both the site and the backups stored in the same account. If malware or data corruption goes unnoticed for weeks, every copy with short retention already contains the damaged version. And if the account is suspended over a missed payment, or a former developer held the access, getting a copy quickly becomes hard. A copy in your own hands is always available.

A simple scheme for a small site

Copy one is the live site, copy two is a daily archive on the hosting, and copy three is those archives stored outside it. With SSH and cron available, store database credentials in ~/.my.cnf so they aren't in the script:

[client]
user=baza_user
password=BAZA_PAROLI

Then a script dumps the database, archives the files and removes archives older than seven days:

#!/bin/bash
# ~/bin/backup.sh
D=$(date +%F)
mkdir -p ~/backups
mysqldump --single-transaction baza_nomi | gzip > ~/backups/db-$D.sql.gz
tar -czf ~/backups/files-$D.tar.gz -C ~/www example.uz
find ~/backups -type f -name '*.gz' -mtime +7 -delete

--single-transaction exports InnoDB tables consistently without stopping the site. Restrict permissions and schedule it:

chmod 600 ~/.my.cnf
chmod 700 ~/bin/backup.sh
# cron: every day at 03:30
30 3 * * * $HOME/bin/backup.sh

Archives live in ~/backups, outside the web root, so they can't be downloaded through a browser.

Pulling the third copy offsite

From an office or home computer running Linux, macOS or WSL on Windows, rsync pulls only new files:

rsync -avz user@example.uz:backups/ ~/sayt-backup/

The external machine pulls the copy rather than the host pushing it, so even a compromised hosting account can't reach those files. Without SSH, a backup plugin's cloud storage feature does the same job.

Example: an accounting firm in Namangan

An accounting firm in Namangan runs a client portal on example.uz and relied only on host backups. Malware on an employee's PC stole the FTP password and site files were modified; it was noticed two weeks later, when plugin backups were already infected. The firm then set up the daily script above plus a morning rsync to an office PC with three months of retention. sayt.uz customers can check how backups and SSH work on their hosting via the cabinet or technical support.

A backup isn't a backup until you've restored it

A dump can be empty, an archive incomplete or a key folder excluded. At least once a quarter, restore the latest copy to a local server or a test subdomain so you know the procedure and trust the copy.

Related articles

📦 Hosting Plan Terms Explained: Disk, Inodes, CPU, RAM and Processes 🔑 Enabling SSH on your hosting and connecting with a key 🛠️ Corrupted MySQL Table: How to Check and Repair It 🧩 Garbled characters on your site: causes and fixes for broken encoding
🌐 Language
🇺🇿 O'zbek 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓