Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/ns-plug/files/remote-backup
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading