zerobyte icon indicating copy to clipboard operation
zerobyte copied to clipboard

feat: Add configuration export functionality with flexible options

Open tvarohohlavy opened this issue 3 weeks ago • 3 comments

feat: Add configuration export functionality with flexible options

Summary

Adds the ability to export ZeroByte configuration as JSON files for backup, migration, or Infrastructure as Code (IaC) workflows.

Features

  • Export dialogs for full configuration export
  • Flexible export options:
    • Include/exclude database IDs, timestamps, runtime state (status, last backup info, health checks)
    • Secrets handling: exclude, keep encrypted, or export as cleartext
    • Recovery key export
    • Password hash export for user migration

Changes

  • New ExportDialog UI component
  • API endpoint at /api/v1/config/export with query parameter support
  • Export buttons added to:
    • Settings page (full config)
  • Updated README with export documentation

Notes

  • Runtime state fields are excluded by default to produce cleaner IaC-friendly exports
  • Encrypted fields are auto-detected using cryptoUtils.isEncrypted()
  • ~~Volume secrets are not encrypted in DB at the moment, needs to be done in separate PR~~
  • Future enhancement: password-protected ZIP export (deferred)
  • Future enhancement: config backup automation (deferred)
  • Future enhancement: config import via UI (deferred)
  • Config import via json submitted as separate PR: https://github.com/nicotsx/zerobyte/pull/93

Related Issues

  • https://github.com/nicotsx/zerobyte/issues/13

Summary by CodeRabbit

  • New Features

    • Export Configuration: new Settings dialog to download your full configuration as JSON, with options for metadata, secrets handling (exclude/encrypted/cleartext), include recovery key and password-hash — password verification required.
    • Reorder Backup Schedules: ability to reorder backup schedules for customized organization.
  • Documentation

    • Added user-facing instructions for the export workflow to the README.

✏️ Tip: You can customize this high-level summary in your review settings.

tvarohohlavy avatar Dec 01 '25 10:12 tvarohohlavy