Skip to content
Rowsafe
Docs

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 -- --account

It 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:

  1. Your bucket. Paste the bucket URL, access key ID and secret. It tests the bucket and tells you if something is wrong.
  2. The encryption passphrase. It generates one and shows it once. Save it, then type its last 4 characters.
  3. Your database. It finds PostgreSQL and suggests a name. Press Enter.
  4. 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
ContinuouslyRewind: every change saved, at most about a minute behind
Sundays 01:00Full backup
Monday to Saturday 01:00Differential backup
Sundays 21:15Proof: a restore test (or click Run Proof now after the first backup)
Every minutePulse: 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 login

Run 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 findings

Add another server over SSH, nothing to copy: rowsafe hosts add [email protected] (how).

Edit on GitHub