Quickstart
Protect your first PostgreSQL database in about 10 minutes.
Create a bucket, run one command on your server, answer a few questions. Nothing changes until you say yes. New words are in the Glossary.
You need:
- A Linux server (Debian 12/13 or Ubuntu 22.04/24.04) running PostgreSQL 13 to 18, with
sudo. - A storage bucket: Cloudflare R2 (10 GB free), Backblaze B2, Amazon S3, Wasabi, DigitalOcean Spaces or any S3-compatible storage.
- A few seconds of downtime for one PostgreSQL restart, now or later.
Other setups use the same command: Docker, MySQL and MariaDB, MongoDB, ClickHouse, Redis and Valkey, OpenSearch, Qdrant, Meilisearch.
Production database?
Follow Adopt an existing database instead. It adds preflight checks and a rollback plan.
Create an account
Sign up. The Free plan covers one server with up to three databases, every feature included.
Create a bucket and an access key
Create a private, empty bucket (for example app-rowsafe) and an access key limited to that bucket only. Keep at hand:
- the bucket URL, for example
https://<account-id>.r2.cloudflarestorage.com/app-rowsafe - the access key ID
- the secret
Where to find them, per provider: Set up backup storage.
Run the installer on the database server
curl -fsSL https://rowsafe.sh | sudo sh -s -- --accountIt prints a link. Open it, check the code matches your terminal, pick your organization and click Approve. (Without --account, Rowsafe runs on the server on its own, with no dashboard: Rowsafe on your server. sudo rowsafe login connects it later.)
From the dashboard
Servers → Add a server gives the same command with a one-time token in it. Nothing to approve.
Then answer its questions:
- Your bucket. Paste the bucket URL, access key ID and secret. It tests the bucket and tells you if something is wrong.
- The encryption passphrase. It generates one and shows it once. Save it, then type its last 4 characters.
- Your database. It finds PostgreSQL and suggests a name. Press Enter.
- The plan. It shows what it will change and asks
Turn on backups for app now? [Y/n].
Save the passphrase before you continue
Put it in your password manager now. Without it, no backup can be restored, and nobody can recover it, Rowsafe included.
Keys and passphrase stay on the server, in /etc/rowsafe/agent.env. Rowsafe never sees them.
Restart PostgreSQL, now or later
Backups need one PostgreSQL restart. It takes seconds; open connections drop and your apps reconnect.
Answer y to Restart PostgreSQL now?. You'll see:
✓ app is protected. The first full backup is running.It also asks two questions:
- Restart from the dashboard? Adds a Restart PostgreSQL now button. It only restarts when someone clicks and confirms.
- Manage PgBouncer? For connection pooling. Nothing installs until someone turns pooling on.
Done. The database shows up in the dashboard under Databases.
What happens next
Rowsafe now runs by itself. The first full backup starts right away.
| When (UTC) | What |
|---|---|
| Continuously | Rewind: every change saved, at most about a minute behind |
| Sundays 01:00 | Full backup |
| Monday to Saturday 01:00 | Differential backup |
| Sundays 21:15 | Proof: a restore test (or click Run Proof now after the first backup) |
| Every minute | Pulse: health checks and alerts, plus an email every Monday |
- Two full backups are kept: about two weeks to restore to any second. Change it in the database's settings or with
rowsafe set. - A recent backup plus a passing Proof means protected.
- Turn on alerts: Settings → Alerts and notifications (email, Slack, Discord, Teams, PagerDuty, Opsgenie, Telegram, ntfy, webhooks: Monitoring and alerts).
Install the CLI and log in
Optional, for scripts, CI and AI agents. On your own computer (macOS or Linux, no sudo):
curl -fsSL https://rowsafe.sh/cli | sh
rowsafe loginRun the installer again to update. More ways to install.
rowsafe status app # is it protected?
rowsafe proof app # run Proof now
rowsafe pulse app # health score and findingsAdd another server over SSH, nothing to copy: rowsafe hosts add [email protected] (how).
What Rowsafe does for you
What runs by itself, and what you do when something breaks.
Your first restore
Delete practice rows on purpose, then bring them back.
Restore a database
Rewind to any second. Read it before you need it.
Marks
Mark a moment before a migration.
AI agents
Guard: coding agents set a Mark before risky changes.
Troubleshooting
Common errors and fixes.