From 9276e811c24cedc10c460257130d73fb217de952 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 22 Dec 2023 14:50:50 +0800 Subject: [PATCH] update --- plugins/mariadb/index.py | 2 ++ plugins/mysql/index.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index 3c299fe1e..b16820746 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -2672,6 +2672,8 @@ def doFullSyncUser(version=''): ip = data['ip'] bak_file = '/tmp/tmp.sql' + if os.path.exists(bak_file): + os.system("rm -rf " + bak_file) writeDbSyncStatus({'code': 0, 'msg': '开始同步...', 'progress': 0}) writeDbSyncStatus({'code': 1, 'msg': '远程导出数据...', 'progress': 10}) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index d58aa8f4d..4db972978 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -196,7 +196,7 @@ def makeInitRsaKey(version=''): datadir = getDataDir() except Exception as e: datadir = getServerDir() + "/data" - + mysql_pem = datadir + "/mysql.pem" if not os.path.exists(mysql_pem): rdata = mw.execShell( @@ -2946,6 +2946,8 @@ def doFullSyncUser(version=''): ip = data['ip'] bak_file = '/tmp/tmp.sql' + if os.path.exists(bak_file): + os.system("rm -rf " + bak_file) writeDbSyncStatus({'code': 0, 'msg': '开始同步...', 'progress': 0}) dmp_option = ''