pull/310/head
midoks 2 years ago
parent c0a981b5a1
commit 75e181116e
  1. 2
      class/core/crontab_api.py
  2. 9
      plugins/backup_ftp/index.py

@ -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)

@ -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 + \

Loading…
Cancel
Save