diff --git a/class/core/crontab_api.py b/class/core/crontab_api.py index e23e7a9be..c3d97bf90 100755 --- a/class/core/crontab_api.py +++ b/class/core/crontab_api.py @@ -377,8 +377,7 @@ class crontab_api: stype = request.form.get('type', '') bak_data = [] - - if stype == 'sites' or stype == 'database' or stype.find('database_') > -1 or stype == 'path': + if stype == 'sites' or stype == 'database' or stype.find('database_') > -1 or stype == 'path' or stype == 'logs': 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 55c67be77..be4ba8ee6 100755 --- a/plugins/backup_ftp/index.py +++ b/plugins/backup_ftp/index.py @@ -196,20 +196,23 @@ def backupAllFunc(stype): os.system(cmd) # 开始执行上传信息 - if stype == 'database': - db_prefix = prefix_dict[stype] + bk_prefix = prefix_dict[stype] else: plugin_name = stype.replace('database_', '') - db_prefix = plugin_name + '/db' + bk_prefix = plugin_name + '/db' + + bk_name = stype + if stype.find('database_') > -1: + bk_name = 'database' - find_path = mw.getBackupDir() + '/database/' + db_prefix + '_' + name + find_path = mw.getBackupDir() + '/' + bk_name + '/' + bk_prefix + '_' + name find_new_file = "ls " + find_path + \ "_* | grep '.gz' | cut -d \ -f 1 | awk 'END {print}'" filename = mw.execShell(find_new_file)[0].strip() if filename == "": - print("not find upload file!") + mw.echoInfo("not find upload file!") return False ftp = FtpPSClient()