|
| 1 | +# Backup and Restore |
| 2 | + |
| 3 | +INAV Configurator can automatically back up your configuration before flashing firmware and offer to restore it afterwards. When upgrading across major versions (e.g. 7.x → 8.x → 9.x), settings are automatically migrated to the new firmware format. |
| 4 | + |
| 5 | +For manual CLI-based backup and restore, see the [CLI documentation](Cli.md#backup-via-cli). |
| 6 | + |
| 7 | +## Automatic Backup & Restore During Firmware Flash |
| 8 | + |
| 9 | +### What happens automatically |
| 10 | + |
| 11 | +1. **Before flashing** (with or without Full Chip Erase enabled): Your current CLI configuration (`diff all`) is automatically captured and saved to the backup directory. |
| 12 | +2. **After flashing**: Depending on the situation, the Configurator offers to restore your settings if Full Chip Erase was enabled: |
| 13 | + |
| 14 | +| Scenario | Behavior | |
| 15 | +|----------|----------| |
| 16 | +| **Patch update** (e.g. 8.0.0 → 8.0.1) | Auto-restore offered immediately | |
| 17 | +| **Minor update** (e.g. 8.0.0 → 8.1.0) | Auto-restore offered immediately | |
| 18 | +| **Major upgrade** (e.g. 7.x → 8.x) with migration profile available | Migration preview shown — confirm to restore with converted settings | |
| 19 | +| **Major upgrade** without migration profile | Warning shown — restore still possible but some settings may fail | |
| 20 | +| **Major downgrade** (e.g. 9.x → 7.x) | Auto-restore blocked — manual restore only (settings may be incompatible) | |
| 21 | +| **Local firmware file** (loaded from disk) | No auto-restore offered — backup is still saved | |
| 22 | +| **Flash without Full Chip Erase** | Backup taken, no restore offered | |
| 23 | + |
| 24 | +### Migration Preview |
| 25 | + |
| 26 | +When updating across major versions (e.g. 7.x → 9.x), the Configurator shows a **migration preview overlay** before restoring. This lists: |
| 27 | + |
| 28 | +- **Removed settings** — settings that no longer exist in the new firmware (will be skipped) |
| 29 | +- **Renamed settings** — settings whose name changed (automatically converted) |
| 30 | +- **Renamed commands** — CLI commands that were renamed (automatically converted) |
| 31 | +- **Value replacements** — setting values that changed meaning (automatically converted) |
| 32 | +- **Setting remappings** — numeric IDs that were renumbered (automatically converted) |
| 33 | +- **Warnings** — settings whose semantics changed and require manual review |
| 34 | + |
| 35 | +You can review all changes before confirming or cancelling the restore. |
| 36 | + |
| 37 | +Multi-step migrations are handled automatically. For example, a 7.x → 9.x upgrade applies migration profiles in sequence (7→8, then 8→9). |
| 38 | + |
| 39 | +## Manual Backup & Restore |
| 40 | + |
| 41 | +The Firmware Flasher tab provides three buttons: |
| 42 | + |
| 43 | +- **Backup Config** — saves your current CLI configuration to a file (opens save dialog) |
| 44 | +- **Restore Config** — loads a backup file and restores it to your flight controller |
| 45 | + - If the backup is from a different major version, the migration preview is shown first |
| 46 | + - If no migration profile exists for the version gap, a warning is shown but you can still proceed |
| 47 | +- **Open Backups Folder** — opens the backup directory in your file manager |
| 48 | + |
| 49 | +For CLI-based backup and restore procedures, see [Backup via CLI](Cli.md#backup-via-cli) and [Restore via CLI](Cli.md#restore-via-cli). |
| 50 | + |
| 51 | +## Backup File Location |
| 52 | + |
| 53 | +Backups are stored in your OS-specific application data directory: |
| 54 | + |
| 55 | +| OS | Path | |
| 56 | +|----|------| |
| 57 | +| **Windows** | `%APPDATA%/inav-configurator/backups/` | |
| 58 | +| **macOS** | `~/Library/Application Support/inav-configurator/backups/` | |
| 59 | +| **Linux** | `~/.config/inav-configurator/backups/` | |
| 60 | + |
| 61 | +Use the **Open Backups Folder** button in the Firmware Flasher tab to open this directory. |
| 62 | + |
| 63 | +## Backup File Naming |
| 64 | + |
| 65 | +| Type | Format | |
| 66 | +|------|--------| |
| 67 | +| Auto-backups | `UPDATE_inav_backup_{version}_{board}_{YYYY-MM-DD_HHMMSS}.txt` | |
| 68 | +| Manual backups | `inav_backup_{version}_{board}_{YYYY-MM-DD_HHMMSS}.txt` | |
| 69 | + |
| 70 | +Auto-backups are pruned automatically — only the 10 most recent are kept. Files you rename are never pruned. |
| 71 | + |
| 72 | +## Backup File Format |
| 73 | + |
| 74 | +Backup files are plain-text CLI dumps with a metadata header: |
| 75 | + |
| 76 | +``` |
| 77 | +# INAV Backup |
| 78 | +# Version: 8.0.0 |
| 79 | +# Board: SPEEDYBEEF405V4 |
| 80 | +# Date: 2026-04-11T10:30:00.000Z |
| 81 | +# Craft: MyQuad |
| 82 | +# |
| 83 | +# INAV/SPEEDYBEEF405V4 8.0.0 Apr 1 2026 / 12:00:00 (abc1234) |
| 84 | +# GCC-13.2.1 |
| 85 | +# ... |
| 86 | +set gyro_main_lpf_hz = 110 |
| 87 | +set acc_hardware = AUTO |
| 88 | +... |
| 89 | +``` |
| 90 | + |
| 91 | +You can open and edit these files with any text editor. |
| 92 | + |
| 93 | +## Restore Error Handling |
| 94 | + |
| 95 | +If errors occur during restore (e.g. unknown settings, invalid values): |
| 96 | + |
| 97 | +- An error dialog shows the affected lines |
| 98 | +- You can choose: |
| 99 | + - **Save anyway** — saves the successfully applied settings and reboots |
| 100 | + - **Abort** — discards all changes and exits CLI mode |
| 101 | + |
| 102 | +## Tips |
| 103 | + |
| 104 | +- **Always flash with Full Chip Erase** when upgrading to a new version. This ensures clean defaults and triggers automatic backup and restore. |
| 105 | +- **Review migration previews carefully** — especially the warnings section, which highlights settings whose meaning may have changed. |
| 106 | +- **Keep manual backups** before major upgrades. While auto-backup handles this, having an extra copy in a known location gives peace of mind. |
| 107 | +- **Use `diff` over `dump`** for backups. The `diff` format only stores settings that differ from defaults, which makes restoring safer across versions. The auto-backup feature already uses `diff all`. |
0 commit comments