Backups and disaster recovery for small teams

Decide how much data you can afford to lose, back up the right things, and prove you can restore them.

Three identical cream storage boxes, one kept apart on its own shelf

Every team says it has backups. Far fewer have restored one recently. A backup you have never tested is a hope, not a plan.

This guide is for small teams and solo developers who run a web app with a database and want a recovery plan that works on a bad day. You will learn how to decide what you can afford to lose, what to back up, how to dump PostgreSQL and MySQL correctly, and how to write a short runbook.

None of this needs enterprise tooling. It needs a few decisions written down and a habit of testing.

RPO and RTO: two numbers to decide first

Recovery point objective (RPO) is how much data you can afford to lose, measured in time. If you back up once a day, your worst case is losing almost a day of changes.

Recovery time objective (RTO) is how long you can afford to be down while you recover.

Decide both per system, in business terms. A blog can probably lose a day of drafts and be down for a few hours. An online shop may only accept losing an hour of orders. Those answers drive everything else: how often you back up, where copies live and how much automation you need.

Be honest about the cost. Tighter targets mean more frequent backups, more storage and more practice.

The 3-2-1 rule

The 3-2-1 backup rule: 3 copies, 2 media, 1 off-site
Three copies of your data, on two different types of storage, with one copy off-site.

The 3-2-1 rule is a simple, durable guideline:

  • 3 copies of your data: the live copy plus two backups.
  • 2 different types of storage, so one failure mode cannot take out both. For cloud apps, this often means the provider's backup system plus a separate object storage account.
  • 1 copy off-site, away from the server and ideally with a different provider or account.

The point is independence. Two copies on the same disk, or in the same account with the same password, can disappear together.

What to back up (and what not to)

Back up data, not things you can rebuild.

  • Databases: the most important item for almost every app.
  • User uploads and files the app writes: images, documents, generated invoices.
  • Configuration you cannot recreate: environment variable names and where each value comes from. Store the secret values themselves in a password manager, not a backup file.
  • DNS records: export a copy of your zone so you can rebuild it quickly.

Your code should already live in Git with a remote host such as GitHub, which is its own backup. Build output, dependency folders and caches can be regenerated and do not need backing up.

Database dumps done properly

Copying a database's files while it is running can produce a corrupt backup. Use the database's own dump tools, which take a consistent snapshot.

PostgreSQL

Use the custom format (-Fc), which is compressed and lets you restore selectively:

Terminal
pg_dump -Fc --no-owner -d "$DATABASE_URL" -f app-$(date +%F).dump

Check the file is readable by listing its contents:

Terminal
pg_restore -l app-2026-12-04.dump | head

Restore into an empty or test database:

Terminal
pg_restore --no-owner --clean --if-exists -d "$TARGET_DATABASE_URL" app-2026-12-04.dump

Use a pg_dump version at least as new as the server. Older client versions refuse to dump newer servers.

MySQL and MariaDB

For InnoDB tables, --single-transaction takes a consistent snapshot without locking the tables:

Terminal
mysqldump --single-transaction --routines --triggers --no-tablespaces \
  -h db.example.com -u app_user -p app_db | gzip > app-$(date +%F).sql.gz

Restore with:

Terminal
gunzip < app-2026-12-04.sql.gz | mysql -h db.example.com -u app_user -p app_db

--single-transaction only gives a consistent view for transactional tables, so convert any old MyISAM tables to InnoDB.

Encrypt backups

A database dump contains everything: customer details, password hashes, orders. Treat it as sensitive as the live database.

Encrypt before the file leaves the machine. With age, a small modern encryption tool, you encrypt to a public key and keep the private key somewhere safe and separate:

Terminal
age -r "$AGE_PUBLIC_KEY" -o app-2026-12-04.dump.age app-2026-12-04.dump
age -d -i backup-key.txt -o app-2026-12-04.dump app-2026-12-04.dump.age

Store the decryption key outside the backup system, for example in a password manager that more than one person can access. A backup you cannot decrypt is as useless as no backup.

Retention

Keep enough history to recover from problems you notice late. Data corruption or an accidental deletion might go unnoticed for a week.

A common pattern is grandfather-father-son: keep daily backups for a week or two, weekly ones for a month or two, and monthly ones for a year. Adjust to your RPO, your storage budget and any legal duties around how long you may keep personal data.

Ransomware and immutable copies

Ransomware and compromised credentials can delete or encrypt backups as well as live data, if they live in the same place and the same credentials can reach both.

General defences:

  • Keep at least one copy where your app's credentials cannot delete it.
  • Use storage that supports immutability or object lock, so copies cannot be changed or deleted until a set date.
  • Give backup jobs write-only access where the storage allows it.
  • Protect backup accounts with strong, unique passwords and two-factor authentication.

Testing restores

Schedule a restore test, at least quarterly and after any major change. Restore into a separate database or app, never over production, then check that:

  • The restore completes without errors.
  • Row counts for key tables look right.
  • The app starts and you can log in and view recent records.
  • You record how long it took. That is your real RTO.

Backups on Launchpad

If your app runs on Launchpad, backups run daily. Each one copies the app's saved files (its /data folder) and the PostgreSQL and MySQL databases connected to it. Copies are encrypted with a key of your own account and stored separately from the server your apps run on.

Code is not included because it is rebuilt from GitHub, your upload or the template on every deploy. Redis is not backed up either, since it holds caches and queues. Starter keeps 7 days of backups and Pro keeps 14.

To restore, open the app, go to Backups and click Restore. Before restoring, a backup of the app as it is at that moment is taken and listed as Before a restore, so you can undo the restore. The back up and restore guide has the full steps.

Daily backups mean a worst-case RPO of up to a day. For data you cannot afford to lose, keep your own additional copy outside the platform as well, for example a WordPress backup plugin that sends copies to your own storage, or an export feature in your app that writes encrypted files to a separate storage account. That gives you the off-site, independent copy the 3-2-1 rule asks for.

Step by step: write a DR runbook

  1. List each system: app, database, file storage, DNS, email.
  2. For each, write its RPO, RTO and where its backups live.
  3. Write the restore steps for each, with exact commands or dashboard clicks.
  4. Note where credentials and decryption keys are kept, and who can reach them.
  5. Add contacts: your hosting provider's support, your domain registrar, key people.
  6. Run a restore test and update the document with what you learned.

A simple template to copy:

Text
SYSTEM: Main web app
OWNER: Name (backup: Name)
RPO: 24 hours    RTO: 2 hours
BACKUPS: Platform daily backups (14 days) + weekly encrypted export to separate storage
RESTORE STEPS:
  1. Confirm the scope of the problem and stop further damage.
  2. Restore the latest good backup into the app.
  3. Check key tables, log in, place a test order.
  4. Tell customers via the status page.
KEYS AND CREDENTIALS: Team password manager, "Backups" vault
LAST TESTED: 2026-12-04 (took 35 minutes)

Common mistakes

  • Never testing a restore. Fix: schedule a restore test and time it.
  • Copying raw database files from a running server. Fix: use pg_dump or mysqldump --single-transaction.
  • Backups in the same account as production. Fix: keep one copy in separate storage with separate credentials.
  • Losing the encryption key. Fix: store it in a shared password manager, separately from the backups.
  • Backing up code but not uploads. Fix: list every place the app writes data and include each one.

Security notes

  • Encrypt backups at rest and in transit.
  • Limit who can download or restore backups; a dump is a full copy of your customers' data.
  • Use two-factor authentication on every account that can reach backups.
  • Follow your data retention duties and delete old backups that you no longer need to keep.
  • Never paste database credentials into scripts committed to Git; read them from environment variables.

Troubleshooting

SymptomCauseFix
pg_dump: error: aborting because of server version mismatchClient older than the serverInstall a pg_dump matching or newer than the server version
Access denied; you need (at least one of) the PROCESS privilege(s) when dumpingMySQL 8 dumps tablespace info by defaultAdd --no-tablespaces
Restore errors about missing rolesDump includes ownership from another serverDump or restore with --no-owner
Backup file is tiny or emptyJob failed silently, or wrong database nameCheck the job's exit code and alert on failures
Cannot decrypt an old backupKey rotated or lostKeep old keys available for as long as the backups they protect

Frequently asked questions

How often should I back up?

Match it to your RPO. Daily suits many small sites. Busy shops or apps with constant writes may need more frequent backups, or a managed database with point-in-time recovery.

Are snapshots the same as backups?

A disk snapshot is useful, but it usually lives with the same provider and account as the server. Treat it as one copy, not the whole plan.

Do I need to back up a static site?

Usually not, if its source is in Git. Redeploying rebuilds it. Back up anything it depends on that is not in the repository.

Where should the off-site copy go?

Somewhere independent of your main platform: a separate storage provider or account, with its own credentials and, ideally, immutability turned on.

Next steps

Decide your RPO and RTO, set up automatic backups with at least one independent copy, and test a restore this month. The runbook takes an hour to write and saves many more on a bad day.

Share this articleLinkedIn (opens in a new tab)X (opens in a new tab)Facebook (opens in a new tab)
Was this article helpful?

Get new guides in your inbox.

One email a month. Unsubscribe anytime.