From ed6261e23b9568b9eb820a4bd70b016d0f110956 Mon Sep 17 00:00:00 2001 From: Giacomo Sanchietti Date: Tue, 19 May 2026 16:46:10 +0200 Subject: [PATCH 1/2] fix(remote-backup): improve backup name Use a mnemonic name for backup instead of a random name derived from temporary file. --- packages/ns-plug/files/remote-backup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ns-plug/files/remote-backup b/packages/ns-plug/files/remote-backup index 6acad8298..cd96bb739 100755 --- a/packages/ns-plug/files/remote-backup +++ b/packages/ns-plug/files/remote-backup @@ -59,9 +59,11 @@ case "$cmd" in # proxy, same pattern used by send-heartbeat / send-inventory. # To be removed once the migration is complete. if [ "$TYPE" = "enterprise" ]; then + ext=".$(basename $file | cut -d '.' -f2)" + date="-$(date +%Y-%m-%d)" curl $curl_args -X POST \ -H "Content-Type: application/octet-stream" \ - -H "X-Filename: $(basename "$file")" \ + -H "X-Filename: backup$date$ext" \ --data-binary "@$file" https://my.nethesis.it/proxy/backup >/dev/null || : fi exit $rc From 480d6e05f9617e4f96eb90336d91c8d2538ea2b8 Mon Sep 17 00:00:00 2001 From: Giacomo Sanchietti Date: Wed, 20 May 2026 07:49:15 +0200 Subject: [PATCH 2/2] Apply suggestion from @edospadoni Co-authored-by: Edoardo Spadoni --- packages/ns-plug/files/remote-backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ns-plug/files/remote-backup b/packages/ns-plug/files/remote-backup index cd96bb739..123f882ac 100755 --- a/packages/ns-plug/files/remote-backup +++ b/packages/ns-plug/files/remote-backup @@ -63,7 +63,7 @@ case "$cmd" in date="-$(date +%Y-%m-%d)" curl $curl_args -X POST \ -H "Content-Type: application/octet-stream" \ - -H "X-Filename: backup$date$ext" \ + -H "X-Filename: backup$date$ext" \ --data-binary "@$file" https://my.nethesis.it/proxy/backup >/dev/null || : fi exit $rc