Possible Approaches
- Writing a JSON API to manage Heimdall
- Export/Import a list of items on a per-user basis
- Backup/Restore state of entire application
Choice: backup/restore user, settings, and items state.
- Covers both advanced, declarative use-case and less technical users with same code.
Spec
Backup / Restore should include:
- All users
- Each user's settings
- each user's items (tags and application bookmarks)
- All the user-generated images referenced by a setting or item. We should not back up built-in images from (eg) a supported app.
Backup and restore should be resilient to changes in Heimdall's schema, but shouldn't block evolution of Heimdall. It's a best-effort process.
- Include Heimdall version number in the backup so we can warn if version differs between the backup file and this version of Heimdall
- The process should not attempt to deal with changes to supported apps. If an app is no longer supported, bummer, but whatever. We drop the class/app_id and move on
User story: technical user wants to automate configuring Heimdall
- Trigger a restore from a config management tool like Ansible, Chef, etc.
- Could be a CLI tool or a location designated in a env variable.
User story: a tutorial user wants to restore Heimdall after switching machines
- Prefers a web UI to a CLI or filesystem shenanigans
- easy to upload or download a backup file.
Nice-to-haves
Consider these for future improvements: