Skip to content

Commit

Permalink
导出优化
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Mar 5, 2023
1 parent 5016aed commit 3e244ed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion plugins/mysql-apt/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2474,7 +2474,8 @@ def doFullSyncUser(version=''):

if not os.path.exists(bak_file):
dump_sql_data = getServerDir() + "/bin/mysqldump " + dmp_option + " --force --opt --default-character-set=utf8 --single-transaction -h" + ip + " -P" + \
port + " -u" + user + " -p" + apass + " " + sync_db + " > " + bak_file
port + " -u" + user + " -p" + apass + \
" --ssl-mode=DISABLED " + sync_db + " > " + bak_file
mw.execShell(dump_sql_data)

writeDbSyncStatus({'code': 2, 'msg': '本地导入数据...', 'progress': 40})
Expand Down
3 changes: 2 additions & 1 deletion plugins/mysql-yum/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2434,7 +2434,8 @@ def doFullSyncUser(version=''):

if not os.path.exists(bak_file):
dump_sql_data = getServerDir() + "/bin/mysqldump " + dmp_option + " --force --opt --default-character-set=utf8 --single-transaction -h" + ip + " -P" + \
port + " -u" + user + " -p" + apass + " " + sync_db + " > " + bak_file
port + " -u" + user + " -p" + apass + \
" --ssl-mode=DISABLED " + sync_db + " > " + bak_file
mw.execShell(dump_sql_data)

writeDbSyncStatus({'code': 2, 'msg': '本地导入数据...', 'progress': 40})
Expand Down
6 changes: 4 additions & 2 deletions plugins/mysql/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2665,8 +2665,10 @@ def doFullSyncUser(version=''):
writeDbSyncStatus({'code': 1, 'msg': '远程导出数据...', 'progress': 20})

if not os.path.exists(bak_file):
dump_sql_data = getServerDir() + "/bin/mysqldump " + dmp_option + " --force --opt --default-character-set=utf8 --single-transaction -h" + ip + " -P" + \
port + " -u" + user + " -p\"" + apass + "\" " + sync_db + " > " + bak_file
dump_sql_data = getServerDir() + "/bin/mysqldump " + dmp_option + " --force --opt --default-character-set=utf8 --single-transaction -h" + ip + " -P" + \
port + " -u" + user + " -p\"" + apass + \
"\" --ssl-mode=DISABLED " + sync_db + " > " + bak_file
# print(dump_sql_data)
mw.execShell(dump_sql_data)

writeDbSyncStatus({'code': 2, 'msg': '本地导入数据...', 'progress': 40})
Expand Down

0 comments on commit 3e244ed

Please sign in to comment.