Skip to content

feat(backup-and-restore): consume the my backup API#746

Draft
edospadoni wants to merge 1 commit into
mainfrom
feat/backup-my-api
Draft

feat(backup-and-restore): consume the my backup API#746
edospadoni wants to merge 1 commit into
mainfrom
feat/backup-my-api

Conversation

@edospadoni
Copy link
Copy Markdown
Member

@edospadoni edospadoni commented Apr 23, 2026

Summary

Switches the Backup/Restore views off the legacy backupd shape and onto the my-native JSON produced by collect, following the appliance-side cutover in NethServer/nethsecurity#1609.

  • Backup listing types + templates now read uploaded_at (RFC3339) and filename; the epoch created / name fields are gone.
  • DownloadBackupModal parses uploaded_at and reduces it to an epoch-second integer for the generated file name, dodging the colons that crash some filesystems.
  • DeleteBackupModal checks the normalized {message: 'success'} reply.
  • RunBackupModal wires @secondary-click so the Close button actually closes the modal (only the "x" worked before).
  • BackupContent refreshes the backups store after SetPassphraseDrawer succeeds, so the "Passphrase not configured" warning and the disabled Run-backup state flip without a full page reload.
  • RestoreContent: when the selected backup (or uploaded file) ends in .gpg, the Passphrase field drops its Optional tag and becomes required with validation focus, since the restore would otherwise fail mid-flight on GPG decrypt.

Blocking / coordination

Warning

Do not merge this PR until the appliance-side cutover lands.
The new my-native JSON shape is produced only once the companion cutover (NethServer/nethsecurity#1609) is deployed on the appliance; on a device still talking to backupd, the old fields (created, name) are missing and the views break.

Requires in order:

  1. feat(backup): configuration backup service (collect ingest + backend UI API) my#81 (my backend + collect + UI + security hardening + DELETE route) merged and deployed to production.
  2. feat(ns-plug): dual-send backup to my-new proxy nethsecurity#1608 (dual-send) merged and released.
  3. feat(migration): move to new my nethsecurity#1609 (full cutover of remote-backup + ns.backup onto my) merged and released.
  4. This PR merged and released together with the cutover so the appliance UI matches the new payload shape.

Tracking issue: NethServer/my#83.

Switches the Backup/Restore views off the legacy backupd shape and
onto the my-native JSON produced by collect.

- Backup listing types + templates now read uploaded_at (RFC3339) and
  filename; the epoch-seconds `created` / `name` fields are gone.
- DownloadBackupModal parses uploaded_at as an ISO string and reduces
  it to an epoch-second integer for the generated filename, dodging
  the colons that crash some file systems.
- DeleteBackupModal checks the normalized {message: 'success'} reply.
- RunBackupModal wires @secondary-click so the Close button actually
  closes the modal (the "x" was the only working path before).
- BackupContent refreshes the backups store after SetPassphraseDrawer
  succeeds, so the "Passphrase not configured" warning and the
  disabled Run-backup state flip without a full page reload.
- RestoreContent: when the selected backup (or uploaded file) ends
  in .gpg the Passphrase input loses its "Optional" tag and becomes
  required with validation focus, since the restore will otherwise
  fail on GPG decrypt mid-flight.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant