Skip to content

fix(backup): accept PGP files in cluster restore - #1443

Closed
Platypuschan wants to merge 1 commit into
NethServer:mainfrom
Platypuschan:fix-restore-gpg-file-check
Closed

Platypuschan wants to merge 1 commit into
NethServer:mainfrom
Platypuschan:fix-restore-gpg-file-check

Conversation

@Platypuschan

Copy link
Copy Markdown

A cluster backup file created on a Debian 13 node was refused by retrieve-cluster-backup with "not_valid_gpg_file", because the newer file(1) calls the encrypted file "PGP" instead of "GPG". NethServer/dev#8410

The check now accepts both words, and the error report no longer fails when the backup is fetched from a URL. Nothing else changes.

How to test

  • On a Debian 13 node without a cluster, run retrieve-cluster-backup with a cluster backup file and its password: before, it fails with "not_valid_gpg_file"; now it is accepted.
  • Repeat on Rocky Linux 9: still accepted. A file that is not encrypted is still refused.

See also


Generated by Hermes Agent:claude-sonnet-5-5 with nethserver-pr

The retrieve-cluster-backup action checks the output of file(1)
for the word "GPG". Newer versions of file(1) print "PGP" for the
same encrypted file, as on Debian 13, so a valid cluster backup
was refused with "not_valid_gpg_file".

Accept both words. Also avoid a KeyError in the error report when
the backup is fetched from a URL instead of an uploaded file.

Assisted-by: Hermes Agent:claude-sonnet-5-5
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