Backup and restore: move between installs and database types (Postgres ↔ SQLite) #96
Labels
No labels
bug
docs
duplicate
enhancement
help wanted
invalid
nice-to-have
pre-1.0
question
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/lamplighter#96
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Jeremy (Nov 28): build a way to migrate between installs or database types. The most flexible way is a backup/restore covering everything in the database, done from the UI after the app has started.
What it does
users_tokens) — everyone signs in again after a restore.Format
.tar.gz(or zip) withmanifest.json(app version, schema migration version, source adapter, created_at, table row counts) and one JSON(L) file per table. DB-agnostic JSON, not SQL dumps, so it loads into either adapter.Secrets
Stored secrets are encrypted with a key from this install's
secret_key_base(Lamplighter.Vault), so they can't be copied as is. On backup, decrypt them and encrypt the backup's secrets with a passphrase the admin types (key from the passphrase, e.g. PBKDF2/Argon2 via stdlib/:crypto); on restore, decrypt with the passphrase and re-encrypt with the new install's Vault. A wrong passphrase fails cleanly and changes nothing.Safety
Done