From 96c231234907d7849d2fc90c4a3bf4202b29f71d Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Sat, 14 Mar 2026 13:19:05 +0200 Subject: [PATCH] Fix to improve the name of the downloaded backup file #2570 --- backup-config/index.cgi | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/backup-config/index.cgi b/backup-config/index.cgi index 5880dc566..e45c9cc79 100755 --- a/backup-config/index.cgi +++ b/backup-config/index.cgi @@ -60,12 +60,11 @@ print &ui_tabs_end_tab(); # Show immediate form print &ui_tabs_start_tab("tab", "backup"); -my $filename = 'webmin-backup-config-on-'; -my $hostname = &get_system_hostname(); +my $hostname = &get_system_hostname() || "localhost"; $hostname =~ s/\./-/g; -$filename .= $hostname; -$filename .= "-".strftime("%Y-%m-%d-%H-%M", localtime); -print &ui_form_start("backup.cgi/$filename.tgz", "post"); +my $filename = $hostname."+configuration_backup-webmin-". + strftime("%Y-%m-%d-%H-%M", localtime); +print &ui_form_start("backup.cgi/$filename.tar.gz", "post"); print &ui_table_start($text{'index_header'}, undef, 2); my @dmods = split(/\s+/, $config{'mods'} || "");