feat(ns-plug): dual-send backup to my-new proxy#1608
Open
edospadoni wants to merge 1 commit intomainfrom
Open
Conversation
Adds a second upload to https://my.nethesis.it/proxy/backup after remote-backup finishes its upload to backupd.nethesis.it. Same transitional pattern already used by send-heartbeat and send-inventory: the proxy accepts the existing system_id:secret Basic Auth pair and translates it into the my-new system_key:system_secret on its way to the new collect endpoint, so no UCI or registration change is needed on the appliance. Gated to enterprise subscriptions via `TYPE = enterprise` to stay in sync with the other dual-send scripts. Best-effort (`|| :`): a proxy outage does not block the primary upload that already completed against backupd, and the md5 marker is still updated so the same backup is not re-uploaded the next night. X-Filename is propagated so the user-facing filename ends up as S3 object metadata on my-new. Refs: NethServer/my#82 NethServer/my#83
28 tasks
b5b223b to
9473670
Compare
This was referenced Apr 23, 2026
20 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a second upload to
https://my.nethesis.it/proxy/backupinsidesend-backup, afterremote-backupfinishes uploading to the legacybackupd.nethesis.it. Mirrors the transitional pattern already in place forsend-heartbeatandsend-inventory.Context
The new my.nethesis.it platform ships a first-class configuration-backup subsystem (ingest on
collect, managed reads onbackend, S3-compatible storage) — see the referenced issues. During the migration window NethSecurity keeps uploading to the legacy backupd and dual-sends to my-new via a translation proxy (nethinfrarole). The proxy accepts the existingsystem_id:secretBasic Auth pair and translates it into the my-newsystem_key:system_secretas it forwards the request tocollect, so nothing changes on the appliance in terms of UCI config or registration.What changes
packages/ns-plug/files/send-backup:remote-backup uploadcompletes successfully, ifns-plug.config.type == enterprisethe script POSTs the same encrypted blob (viacurl --data-binary @$BACKUP.gpg) tohttps://my.nethesis.it/proxy/backupusing HTTP Basic auth withsystem_id:secretfrom UCI.X-Filenameis propagated so the user-facing filename ends up as S3 object metadata on my-new.|| :): a proxy outage does not block the primary upload already completed against backupd, and the md5 marker is still updated so the same backup is not re-uploaded the next night.Same guard style as the other dual-send scripts — enterprise-only, same
-m 900 --retry 3 -L -scurl flags.Not included
Refs: NethServer/my#82 NethServer/my#83