Skip to main content

Backups for a small startup: what to keep and how to test a restore

Most small startups have backups. Far fewer have ever restored one. Without that test, you only find out whether the backup works on the day you need it.

This guide is for the first-time CTO of a 2-10 person team: what to back up, how often, where to keep it, and the 30-minute restore test that tells you it works.

Disclosure: we build DollarDeploy, a control plane that deploys and operates apps on servers you own, backups included. The plan below works with any setup. Where DollarDeploy covers a step, we say so, and where it does not, we say that too.

Why it matters

Most data loss comes from routine mistakes, not disasters. A migration that drops a column, a script run against production instead of staging, a full disk that corrupts a write, a teammate who deletes the wrong folder.

The cost is customer trust, not just time. A small product can survive an hour of downtime. Losing a day of customer data is much harder to explain.

Nobody owns it by default. Without a DevOps hire, backups land on the CTO, usually as a cron job someone wrote once and never checked again.

What to back up

Start from the question: what can't you rebuild from git? Your code is in GitHub. Everything below is not.

  • Databases: PostgreSQL, MySQL or MariaDB, MongoDB. This is the one that matters most.
  • Redis, if it holds more than a cache: sessions, queues or rate limits you would miss after a restart.
  • Files your app writes: uploads, generated PDFs, SQLite files, anything in a local folder or a Docker volume.
  • Environment variables and secrets: keep them in a password manager too. A database dump does not help if nobody can find the database password.
  • Things you can skip: node_modules, build output, caches and temp folders. They come back with the next deploy.

How often, and how long to keep them

Pick the schedule from how much data you can afford to lose, not from what is convenient.

  • Daily, keep 7: covers "we broke something yesterday".
  • Weekly, keep 4: covers the bug nobody noticed for two weeks.
  • Monthly, keep 6: covers slow corruption and "what did this table look like in spring?".

If losing a day of data is too much (payments, bookings), add point-in-time recovery for that database. For most early products, daily is enough.

Where to keep them

Not only on the same server. A backup on the server it protects disappears with that server.

  • Off the server: S3-compatible object storage (AWS S3, Cloudflare R2, Google Cloud Storage, Backblaze B2 and others).
  • Separate credentials: the app should not hold keys that can delete its own backups.
  • Encrypted at rest by the storage provider, and only a few people with access.

The restore test

A backup you have not restored is a guess. Put 30 minutes in the calendar once a month.

  1. Take the latest backup of your main database and files.
  2. Restore it somewhere safe: a spare server, a second database on the same server, or your laptop. Never over production.
  3. Start the app against it and log in as a real user. Check that the newest records are there.
  4. Time it. How long did the restore take from "we need it" to "the app runs"? That number is your real recovery time.
  5. Write the steps down in your incident runbook, so the next person does not have to work them out under pressure.

If the test fails, you just found the problem on a quiet Tuesday instead of during an incident.

How DollarDeploy handles it

Backups are part of operating the app, so DollarDeploy runs them for you on servers you own.

  • One click or on a schedule. Back up a server or a single app by hand on every plan. Scheduled backups (daily, weekly and monthly, each with its own retention) are on paid plans, and old backups are deleted when they pass the retention you set.
  • Databases: a server backup dumps PostgreSQL (pg_dump per database) and Redis.
  • App files: an app backup archives the app's folder (without node_modules and temp folders) and its Docker Compose volumes. You can exclude more files in the app settings.
  • Anything else: the Custom backup prepare command runs before the archive. Use it for a SQLite copy, a mariadb-dump, or a mongodump into the app folder.
  • Storage: DollarDeploy's storage by default, or your own S3-compatible bucket (AWS, Google Cloud, Cloudflare) set in Settings.
  • Notifications: a message when a backup completes, and an alert when a backup task fails, to Slack, Telegram, Discord, email or a webhook.
  • Download: every backup can be downloaded from the Backups page.

The prepare command for a SQLite app, for example:

sqlite3 data/app.db ".backup data/app-backup.db"

Yes, but

Restore is a manual step today. DollarDeploy makes and keeps the backups, and you download them from the dashboard. Loading a dump back (psql or pg_restore for PostgreSQL, unpacking an archive into the app folder) is up to you. That is exactly why the monthly restore test matters.

Dumps are snapshots, not point-in-time recovery. A daily backup can lose up to a day of writes. If that is too much for one database, run a managed database with point-in-time recovery for it.

MariaDB and MongoDB need the prepare command. Server backups dump PostgreSQL and Redis on their own; for other databases, add the dump command to the app.

The bottom line

Back up what you can't rebuild from git, keep copies off the server, and restore one every month. The schedule is easy to automate; the restore test is the part that tells you it works.

Go deeper: Your first production incident: a runbook for a small team, Running production without a DevOps hire and Sharing passwords in a small startup.


Backups that run without you. DollarDeploy deploys your apps from GitHub to a server you own and runs the operations around them: scheduled database and file backups to S3-compatible storage, alerts when a backup or deploy fails, HTTPS, 30 days of logs and server updates. Nothing for you to maintain. Start free on DollarDeploy, no card needed.

All posts Share

Your app deserves a real URL. Ship it to production.