Tutorials overview
These tutorials are end-to-end backup recipes. Each one walks through producing a consistent dump of a specific database, verifying it, optionally restoring it, and uploading it to Lighthouse. Use the scheduling guide after the one-off flow works.
How the tutorials fit togetherโ
Every database backup follows the same two-stage shape:
โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Stage 1 โ Create a dump โ โโโถ โ Stage 2 โ Upload snapshot โ
โ (per-database guide) โ โ (per-database guide) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
app.dump / app.sql ./db-dumps โโโถ snapshot
- Stage 1 is database-specific. Pick your database below.
- Stage 2 uses the same minimal Go SDK
Backup()call in every database tutorial. - Scheduling is optional. When you are ready, use Automated backup with scheduling to wrap the dump and upload in cron or a systemd timer.
All dumps land in a single ./db-dumps directory using a stable filename that you overwrite each run. The SDK then uploads that directory as an incremental snapshot.
Pick your databaseโ
| Database | Dump tool | Guide |
|---|---|---|
| ๐ PostgreSQL | pg_dump | PostgreSQL |
| ๐ฌ MySQL / MariaDB | mysqldump | MySQL |
| ๐ชถ SQLite | sqlite3 .backup | SQLite |
| ๐ MongoDB | mongodump | MongoDB |
| โก Amazon DynamoDB | aws dynamodb | Amazon DynamoDB |
| ๐ชฃ Amazon S3 | aws s3 sync | Amazon S3 |
Then automate itโ
Once you can produce a dump by hand, wire it into the scheduled job:
โก๏ธ Automated backup with scheduling โ a dump script + SDK uploader + cron/systemd timer for a nightly backup.
Before you startโ
You'll need (once):
-
A Lighthouse account and workspace โ Web Portal & Free Workspace.
-
An API key scoped
backup:write,backup:read,snapshots:readโ API Keys. -
The BaaS Go SDK installed (for the upload step):
go get github.com/lighthouse-web3/baas-go-sdk@latest
Export your credentials so every tutorial can reuse them:
export LH_API_KEY="lh_xxxxxxxxxxxxxxxxxxxxxxxx"
export LH_WORKSPACE_ID="550e8400-e29b-41d4-a716-446655440000"