Skip to content
Rowsafe
Docs

Backups and point-in-time recovery

Backups plus a continuous change log let you restore to any second.

A nightly dump only takes you back to last night. Rowsafe keeps two things so you can go back to any second:

  1. Backups: a copy of the whole database, on a schedule.
  2. A change log: every change, archived to your bucket within about a minute.

To restore, Rowsafe starts from a backup and replays the log to the second you pick. That's Rewind.

Backup types

TypeWhat it copiesDefault schedule
FullEverythingSundays 01:00 UTC
DifferentialWhat changed since the last full backupMonday to Saturday 01:00 UTC
IncrementalWhat changed since the last backup of any typeOn demand only

Backups are compressed and encrypted on your server. Your bucket only holds ciphertext.

Run one now: rowsafe backup app (full) or rowsafe backup app --type diff.

The recovery window

You can restore to any moment from the start of the oldest kept full backup to the last archived change. The dashboard and rowsafe status app show where it starts.

  • Retention counts full backups: default 2, about two weeks. Change it (1 to 52) in the database's settings or with rowsafe set app --retention-full 4.
  • Old backups and their change log are removed for you. Don't add a bucket lifecycle rule that deletes objects: it breaks restores.

How much can you lose?

At most about a minute of changes, usually less.

Older setups archive every 5 minutes. Health shows "Backups can be up to 5 minutes behind"; Apply fix changes it without a restart.

If archiving stops (for example rotated bucket keys), a critical alert fires within about 10 minutes and the database is no longer protected.

Restoring

On the database's Rewind tab, pick any second in the window or a Mark, then:

  • Restore a copy next to production, compare, and bring back lost rows. Production keeps running.
  • Rewind the whole database, for the worst case. Undo for 7 days.

Server lost? Restore by hand onto a new one with pgBackRest. All three: Restore a database. Proof checks every week that restores work.

By database

BackupsChange logRestore to
PostgreSQLpgBackRest: weekly full, daily differentialthe WAL (details)any second, or a Mark
MySQL, MariaDBXtraBackup or mariadb-backup: weekly full, daily differentialthe binary log (details)any second, or a Mark
MongoDBmongodump: a full backup every daythe oplog (details)any second, or a Mark
ClickHouseClickHouse's own BACKUP: weekly full, hourly differentialnonea backup (one every hour), or a Mark (details)
Redis, Valkeya full snapshot (RDB), sent as to a new replicaevery change, from the agent attached as a replica (details)about a second, or exactly a Mark
OpenSearchown snapshots: every 5 minutes (only what's new), a full one every daynonea snapshot, or a Mark (details)
Qdrantown snapshots, every 15 minutes (only changed collections)nonea snapshot, or a Mark (details)
Meilisearchown snapshot, every 15 minutes when something changednonea snapshot, or a Mark (details)
  • OpenSearch, Qdrant and Meilisearch: owners can set every 5, 15 or 30 minutes, or hourly, in Settings.
  • A whole rewind stops PostgreSQL, MySQL and MariaDB briefly. The others keep running.
Edit on GitHub