Add configurations backup. (#5780) (#7390)

This commit is contained in:
Nicolò Maio 2023-04-12 17:01:08 +02:00 committed by GitHub
parent 5bc4e4c35a
commit 574e941947
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 445 additions and 15 deletions

View file

@ -0,0 +1,24 @@
--
-- (C) 2013-23 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/system_config/?.lua;" .. package.path
-- ##############################################
local backup_config = require("backup_config")
local rest_utils = require("rest_utils")
-- ##############################################
local rc = rest_utils.consts.success.ok
local epoch_list = backup_config.list_backup()
if epoch_list then
rest_utils.answer(rc, epoch_list)
end
-- ##############################################