mysqldump and mariadb-dump
Logical dumps of MySQL and MariaDB. Use --single-transaction for consistent InnoDB backups without locking, compress the output, and stream it straight to the storage server over SSH so nothing sits on the database disk.
A dump file on the same disk as the database is not a backup. Send nightly dumps, physical backups and WAL archives to a separate storage server, encrypted and versioned, so a dropped table, a corrupted disk or a hacked host is a restore job rather than the end of the business.
Up to 80 GB of live data compresses to about 27 GB per dump. Thirty daily dumps need roughly 800 GB, which fits on 1 TB with room for binary logs.
Order Storage S1It is common to find a cron job writing mysqldump output to /var/backups on the very server that runs MySQL. When that server is compromised, the attacker deletes both. When the provider loses the volume, both go together. When a developer runs an UPDATE without a WHERE clause on Friday evening, the only copy may be last night, if anyone checked that last night worked.
An off-server backup target fixes the first two problems, and versioned retention fixes the third. Logical dumps from mysqldump, mariadb-dump or pg_dump are easy to restore table by table. Physical backups from Mariabackup, Percona XtraBackup or pgBackRest are faster for big databases. Adding binary logs or PostgreSQL WAL archiving lets you replay changes to a point just before the mistake.
Be clear about what this storage is for. These plans use high-capacity SATA disks, which suit sequential backup writes and long retention. They are not built for the random input and output that a busy production database needs. Keep the live database on NVMe, and use the storage server as the place backups land, get checked and wait for the day you need them.
A dump in the home directory of the database server disappears with the server. Disk failure, a lost VPS, or an attacker with root access removes the database and its only backup in one go.
A full disk, a lock timeout or an expired password can leave a truncated .sql file that looks fine by name and size. Without a check on exit codes and a test restore, nobody notices until the file is needed.
A bad import or a buggy release can corrupt rows days before anyone spots it. If you only keep one dump and it is overwritten every night, the clean copy has already been replaced by the damaged one.
Database dumps contain everything: customer names, phone numbers, password hashes and payment references. Copying them around unencrypted, or leaving them in a web-readable folder, turns a backup into a data breach.
You install and configure these yourself, on the database host and on the storage server, with full root access on the storage side.
Logical dumps of MySQL and MariaDB. Use --single-transaction for consistent InnoDB backups without locking, compress the output, and stream it straight to the storage server over SSH so nothing sits on the database disk.
Physical hot backups of InnoDB data files while the server keeps running. Much faster to restore than a dump for databases of tens or hundreds of gigabytes. Combine with binary logs for point-in-time recovery.
The standard PostgreSQL logical backup tools. The custom format (-Fc) compresses well and lets pg_restore pull back a single table. Run pg_dumpall --globals-only as well, so roles and permissions are not forgotten.
Full, differential and incremental PostgreSQL backups with WAL archiving and point-in-time recovery. The storage server can act as a dedicated repository host over SSH, with repository encryption and retention rules set in one config file.
Wraps any dump in encrypted, deduplicated snapshots. Pipe a dump into restic backup --stdin and keep 14 daily, 8 weekly and 12 monthly copies with a single forget --prune command, without storing every night in full.
Enter the combined on-disk size of your live databases. We assume compressed full dumps at about a third of that size, with 30 daily copies kept and no deduplication.
This is an estimate: compression ratios differ a lot between databases, and incremental tools like pgBackRest or restic usually need far less space than 30 full dumps.
0 of 8 done. Tick them off as you go.
Databases behind Kenyan shops, SACCO systems and school portals hold phone numbers, ID numbers and payment references. Under the Data Protection Act, 2019, backups of that data need the same care as the live copy, so encrypt it and restrict who can reach it.
If your application runs with a foreign cloud provider, a backup server with a different provider gives you a copy outside that account. A billing dispute, a suspended account or a provider outage then does not leave you without your own data.
Restoring a large database to a laptop in the office can take hours on a typical line. Restore to a server in the same data centre or another VPS instead, and check your upload and download speeds before you plan a restore drill from the office.
Plans from KES 2,000 a month, paid by M-Pesa or card.
Size your server