This commit is contained in:
midoks
2022-12-19 18:10:57 +08:00
parent c0a981b5a1
commit 75e181116e
2 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -377,7 +377,7 @@ class crontab_api:
stype = request.form.get('type', '')
bak_data = []
if stype == 'site' or stype == 'database' or stype.find('database_') > -1 or stype == 'path':
if stype == 'site' or stype == 'sites' or stype == 'database' or stype.find('database_') > -1 or stype == 'path':
hookPath = mw.getPanelDataDir() + "/hook_backup.json"
if os.path.exists(hookPath):
t = mw.readFile(hookPath)
+4 -5
View File
@@ -196,15 +196,14 @@ def backupAllFunc(stype):
os.system(cmd)
# 开始执行上传信息
if stype == 'database':
bk_prefix = prefix_dict[stype]
else:
plugin_name = stype.replace('database_', '')
bk_prefix = plugin_name + '/db'
bk_prefix = prefix_dict[stype]
bk_name = stype
if stype.find('database_') > -1:
bk_name = 'database'
plugin_name = stype.replace('database_', '')
bk_prefix = plugin_name + '/db'
find_path = mw.getBackupDir() + '/' + bk_name + '/' + bk_prefix + '_' + name
find_new_file = "ls " + find_path + \