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 = ''