Data backup and recovery on dedicated servers

A backup is a copy you can restore after something has gone wrong, kept somewhere the original problem cannot reach. Recovery is the tested process of getting back from that copy to a working service.

Is RAID a backup?

No. RAID keeps a server running when a disk fails, and models marked Soft RAID arrive with the system on an mdadm mirror for exactly that reason; the drive pair in Enterprise models can be mirrored the same way. But a mirror copies mistakes instantly: a deleted directory, a corrupted table or files encrypted by ransomware vanish from both disks at once. A backup is separate in time and place. It holds yesterday's version and last week's, on a different machine, so you can go back to before the problem.

What is the 3-2-1 rule?

Keep three copies of important data, on two different kinds of storage, with one copy off-site. On rented servers that typically means the live data, a backup on a second server in another data centre, and a third copy somewhere independent, such as an object store you already use or an office storage box. We do not sell a backup product, so the second server is one you rent, often a Storage model in another city.

CopyWhereProtects against
Live data on RAIDProduction serverA single disk failure
Nightly versioned backupSTORAGE-1 in another cityDeletion, corruption, server loss, site loss
Weekly independent copySeparate provider or officeAccount compromise, provider-wide issues

How should files be backed up?

With a deduplicating tool that encrypts on the client and keeps versions: restic and BorgBackup are the common open-source choices. Each run sends only changed chunks, so daily backups of a large server take minutes. Push over SSH or SFTP to a dedicated backup user on the target that can write but not delete old snapshots, or use append-only mode.

export BORG_REPO=ssh://bk_web01@203.0.113.40/srv/borg/web01
borg init -e repokey-blake2
borg create -s -C zstd,6 ::web01-{now:%Y%m%dT%H%M} /etc /home /var/www
borg prune --keep-daily 14 --keep-weekly 8 --keep-monthly 12

How are databases backed up?

Never by copying live data files. Use the database's own tools: a logical dump for portability, a physical base backup plus write-ahead logs for point-in-time recovery. For PostgreSQL, pgBackRest or a base backup with WAL archiving lets you restore to any second within your retention. For MariaDB and MySQL, mariadb-backup takes consistent hot copies. Our Ship database dumps to a second server guide shows the commands, and Rescue a database from a dead system covers emergencies.

How long should backups be kept?

Long enough to cover the slowest problem you could discover. Corruption or a quiet intrusion may go unnoticed for weeks, so daily copies for two weeks, weekly for two months and monthly for a year is a common starting scheme. Legal rules may require longer for some records and shorter for personal data; set retention per data class, not one rule for everything.

Why encrypt and isolate backups?

Because a backup holds everything an attacker wants, and because ransomware now looks for backups to destroy first. Encrypt on the client so the backup server never sees plain data, keep the key outside both servers, and make old snapshots impossible to delete from the production side. A backup server that only accepts connections from your hosts, with its own credentials and no shared admin key, turns a full compromise of production into a recoverable incident.

How do I know a backup works?

By restoring it. Schedule a restore test: pick a random snapshot, restore it to a scratch server or a directory, start the database from it and check row counts or a known record. Time the test; that number is your real recovery time. Many teams only learn that their backups were incomplete when they need them, and a monthly test prevents that.

restic -r sftp:bk_db02@203.0.113.41:/srv/restic/db02 restore latest --target /srv/restore-test --include /var/lib/postgresql/dumps
pg_restore --list /srv/restore-test/var/lib/postgresql/dumps/shop.dump | head

Which machine makes a good backup target?

Something with plenty of disk, housed in another city. STORAGE-1 holds 2x 480 GB SSD SATA (system) + 4x 14 TB HDD SAS, Soft RAID for $109.80 a month; STORAGE-2 2026 gives 2x 960 GB SSD NVMe (system) + 2x 24 TB HDD SAS, Soft RAID with a guaranteed 3 Gbps port for faster restores. Our Writing a disaster recovery plan article explains how backups fit into a full recovery plan.

Disk servers used as backup targets

ModelProcessorCoresMemoryDrivesPortPer month
STORAGE-1AMD Ryzen 7 Pro 3700832 GB2x 480 GB SSD SATA + 4x 14 TB HDD SAS1 Gbps unmetered$109.80
STORAGE-2 2024AMD EPYC 4344P832 GB2x 960 GB SSD NVMe + 2x 22 TB HDD SAS3 Gbps unmetered$187.80
STORAGE-2 2026AMD EPYC 4345P832 GB2x 960 GB SSD NVMe + 2x 24 TB HDD SAS3 Gbps unmetered$273.00
STORAGE-3 2024Intel Xeon Gold 6554S36128 GB2x 960 GB SSD NVMe + 24x 22 TB HDD SAS10 Gbps unmetered$1,037.40

Related pages

Ship database dumps to a second server

Schedule compressed, encrypted MariaDB or PostgreSQL dumps and send them to a Storage machine elsewhere, with retention and restore tests.

Read more

Backup and archive storage

Hard disk chassis from 44 TB to 576 TB raw for offsite backups, archives and object storage targets.

Read more

RAID levels explained

RAID 0, 1, 5, 6 and 10 compared with usable capacity worked out for our storage chassis.

Read more

Copy data between servers with rsync

Move or mirror data from one machine to another over SSH with rsync, keep permissions intact, resume big copies and do a final short sync.

Read more

Questions and answers

Is RAID enough to protect my data?

No. RAID survives a disk failure, but deletions, corruption and ransomware reach every disk at once. You also need versioned backups elsewhere.

Do you sell a backup storage service?

No. Rent a Storage line server in another data centre and send backups to it with tools such as restic or BorgBackup.

What is the 3-2-1 backup rule?

Three copies of data, on two kinds of storage, with one copy off-site. It protects against both hardware and site problems.

How often should I test restores?

Monthly is a good habit. Restore a random snapshot, check the data and time the process to know your real recovery time.

How do I protect backups from ransomware?

Encrypt on the client, keep keys off both servers and make old snapshots impossible to delete from the production machine.