Import & Backup

Import & Backup

The Import & Backup feature allows you to export all your Beanstats data to a JSON file and import it on another device. This enables device migration, data sharing, and manual backups.

Overview

The backup system provides:

  • Full data export: All beans, brews, methods, equipment, and freeze entries
  • Selective import: Choose what data types to import
  • Duplicate detection: Skip items that already exist (by UUID)
  • Relationship preservation: Maintains links between brews, beans, methods, and equipment

Creating a Backup

Access

Navigate to Settings > Data > Export > Beanstats

Export Options

OptionDefaultDescription
Include Flow DataYesInclude weight samples from scale-connected brews
Include ImagesNoInclude photos (significantly increases file size)
Include ArchivedYesInclude archived beans, methods, and equipment

Preset Configurations

  • Standard: Flow data yes, images no, archived yes
  • Full: Everything included (largest file size)
  • Minimal: No flow data, no images, no archived items (smallest file size)

Restoring a Backup

Access

Navigate to Settings > Data > Import > Beanstats

Import Options

OptionDefaultDescription
Skip DuplicatesYesSkip items that already exist by UUID
Import BeansYesImport coffee beans
Import Home BrewsYesImport home brews
Import Cafe BrewsYesImport cafe brews
Import Brew MethodsYesImport brew methods
Import EquipmentYesImport equipment
Import Freeze EntriesYesImport freeze entries
Skip ArchivedNoSkip archived items

Import Order

Data is imported in dependency order to ensure relationships can be resolved:

  1. Equipment (no dependencies)
  2. Brew Methods (may reference equipment)
  3. Beans with varieties (no dependencies)
  4. Freeze Entries (reference beans)
  5. Home Brews (reference beans, methods, equipment)
  6. Cafe Brews (no dependencies)

After import, bean weights are recalculated from linked brews and freeze entries.

Duplicate Detection

Items are matched by their unique identifier (UUID):

  • If an item with the same UUID exists, it’s skipped (when Skip Duplicates is enabled)
  • The existing item is used for relationship linking
  • This allows safe re-import of the same backup

Use Cases

Device Migration

  1. Create a backup on your old device
  2. Transfer the JSON file to your new device (AirDrop, Files, email)
  3. Import on your new device before iCloud sync completes

Manual Backup

  1. Create periodic backups
  2. Store JSON files in a secure location (iCloud Drive, Dropbox, etc.)
  3. Restore if data is ever lost

Sharing Data

  1. Create a backup with your desired options
  2. Share the JSON file with another user
  3. They import it into their Beanstats

Data Format

Backups are JSON files with this structure:

{
  "metadata": {
    "exportedAt": "2026-01-17T12:00:00Z",
    "appVersion": "3.1.0",
    "backupVersion": "1.0",
    "deviceName": "Marcel's iPhone",
    "counts": {
      "beans": 25,
      "homeBrews": 150,
      "cafeBrews": 10,
      "brewMethods": 5,
      "equipment": 8,
      "freezeEntries": 3
    }
  },
  "beans": [...],
  "homeBrews": [...],
  "cafeBrews": [...],
  "brewMethods": [...],
  "equipment": [...],
  "freezeEntries": [...]
}

Notes

Image Handling

Images are stored as base64-encoded strings when Include Images is enabled. This can significantly increase file size:

  • A typical 1MB image becomes ~1.33MB in base64
  • Consider disabling images for large backups

Weight Samples

Flow data (weight samples from scale-connected brews) can add significant data:

  • A 30-second brew at 10Hz generates ~300 samples
  • Consider the Minimal preset if file size is a concern

What’s NOT Backed Up

Certain computed values are not backed up because they’re recalculated after import:

  • Used weight (recalculated from brews)
  • Frozen weight (recalculated from freeze entries)
This backup feature exports your full Beanstats data. For simpler brew-only exports, see Export.