diff options
Diffstat (limited to 'modules/admin-mini')
-rw-r--r-- | modules/admin-mini/luasrc/controller/mini/system.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/admin-mini/luasrc/controller/mini/system.lua b/modules/admin-mini/luasrc/controller/mini/system.lua index 936d2634a..1a2628072 100644 --- a/modules/admin-mini/luasrc/controller/mini/system.lua +++ b/modules/admin-mini/luasrc/controller/mini/system.lua @@ -57,7 +57,8 @@ function action_backup() elseif backup then luci.util.perror(backup_cmd:format(_keep_pattern())) local backup_fpi = io.popen(backup_cmd:format(_keep_pattern()), "r") - luci.http.header('Content-Disposition', 'attachment; filename="backup.tar.gz"') + luci.http.header('Content-Disposition', 'attachment; filename="backup-%s-%s.tar.gz"' % { + luci.sys.hostname(), os.date("%Y-%m-%d")}) luci.http.prepare_content("application/x-targz") luci.ltn12.pump.all(luci.ltn12.source.file(backup_fpi), luci.http.write) elseif reset then |