Your data lives in this browser, in a single tab's localStorage. If you switch browsers, clear site data, or move to a new machine, you'll want a backup. The format is plain JSON — open it, read it, edit it, send it to your own cloud — vialfile never touches it.
Download backup
Snapshots all three logs (injections, side-effects, bloodwork) into a single timestamped JSON file. Save it somewhere durable — Dropbox, iCloud, an email to yourself, a thumb drive.
Restore from backup
Pick a previously-downloaded vialfile-backup-*.json file. Merge keeps existing entries; rows whose id (or peptide, for bloodwork) already exists are skipped. Replace wipes existing data first — useful when re-importing onto a fresh browser.
Danger zone
Wipe one section at a time. Backups are not retroactive — export first if you might want it back. Cleared sections do not affect the others.
Backup & restore FAQ
What's in the backup file?
A single JSON object with four top-level fields: version (always "vialfile-backup-v1" for this format), exportedAtIso (timestamp), injections, sideeffects, and bloodwork. Each list mirrors what's in your browser's localStorage exactly — no derived fields, no analytics tags. You can open it in any text editor.
Merge or replace — which one do I want?
Merge is the safer default: it adds rows you don't already have and skips ones you do (matched on id for injections + side-effects, on peptide for bloodwork). Use it when restoring onto a browser that already has some data. Replace wipes all three logs first and then imports — use it when restoring onto a clean install or if you want to roll back to an older snapshot.
What if some entries in the backup file are corrupt?
Per-entry validation runs on import. A row that fails (bad peptide id, bad route, bad severity, bad timestamp) is skipped and reported in the "skipped" list below the import button — the rest of the import continues. The whole file only fails if it's not valid JSON or the version doesn't match.
Can I edit the backup JSON before re-importing?
Yes — that's a feature, not a bug. The schema is the same one validated by the four log pages, so any edit that would have been valid via the UI will validate on import too. If you delete or rename a peptide that vialfile doesn't know, that row gets skipped (other rows still import).
Is there cloud sync or a "send to vialfile" option?
No, and there won't be in v1. The whole point of local storage is that your peptide protocol stays on your machine — adding a server would defeat the privacy story. If you want off-machine durability, save the backup file to Dropbox / iCloud / Google Drive, or email it to yourself. The file is small (typically <100 KB) and human-readable.