diff --git a/class/core/crontab_api.py b/class/core/crontab_api.py index bcd171491..b74a51dcc 100755 --- a/class/core/crontab_api.py +++ b/class/core/crontab_api.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) diff --git a/plugins/backup_ftp/index.py b/plugins/backup_ftp/index.py index be4ba8ee6..560b32d0a 100755 --- a/plugins/backup_ftp/index.py +++ b/plugins/backup_ftp/index.py @@ -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 + \