Quickstart
From nothing to a restorable backup of a Postgres database.
View as MarkdownThis walks the local path: a worker on your own machine, so the database credential never leaves your network. It takes about ten minutes.
1. Create a workspace
Sign up and create one. A workspace is the tenant: members, permissions, quotas and billing all belong to it, and nothing crosses between workspaces. No card is required, and a new workspace starts with credit against real usage.
2. Install the CLI
curl -fsSL https://saved.sh/cli.sh | sh
sctl loginsctl login uses a device code. It prints a code, you approve it in the browser, and the
session lands in a local config file. Every later command acts on exactly one workspace, the
one your session is scoped to.
sctl workspace list
sctl workspace switch <name>3. Provision a worker
A worker is a credential, not a machine. Provisioning gives you a config file to put on the host that can reach your database.
sctl worker provision prod-worker-1Then install and run the worker binary on that host:
curl -fsSL https://saved.sh/worker.sh | sh
saved-worker --config ./config.yamlThe worker credential is shown once. It is what lets a machine claim work in your
workspace, so treat it like a database password, and if it leaks, rotate it with
sctl worker rotate rather than deleting the worker.
4. Generate an encryption key
Backups are encrypted before they leave the machine, with a key we never see.
gpg --quick-generate-key "backups@example.com" default default never
gpg --armor --export backups@example.com > ./keys/prod.ascKeep the private half somewhere you will still have it after the incident that makes you need it. We hold only the public key. If you lose the private key, your backups are unreadable by you and by us.
5. Declare the backup
Write it in a file and apply it, rather than clicking through a form:
workers:
- name: prod-worker-1
backups:
- name: prod-db
kind: local
source_type: postgres
worker: prod-worker-1
schedule: "0 2 * * *"
compression: true
retention:
keep_last: 10
expire_after: 90d
encryption:
public_key: ./keys/prod.ascsctl apply -f saved.yamlapply reconciles what the file declares. It never deletes what the file omits. Removing
a backup is sctl backup delete, deliberately, so a typo in a filename cannot destroy a
retention policy.
6. Run it now
Don't wait for 02:00 to find out whether it works.
sctl backup trigger $BACKUP_ID
sctl run list --backup $BACKUP_ID7. Prove you can get it back
A backup you have never restored is a hypothesis.
sctl artifact list --backup $BACKUP_ID
createdb restore_test
sctl restore postgres <artifact-id> --host localhost --database restore_testRestore is client-side: the artifact is downloaded and decrypted on your machine, with your private key. We are not in the path and could not be.