Skip to content

Commit

Permalink
Update index.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Jul 3, 2024
1 parent 9737d65 commit 994bc4a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions plugins/mysql/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -3492,12 +3492,14 @@ def doFullSyncUser(version=''):

time_s = time.time()
if not os.path.exists(bak_file):
if isSimpleSyncCmd(cmd):
dmp_option += " --master-data=1 --apply-slave-statements --include-master-host-port "
else:
dmp_option += ' '
dmp_option = ' '
if mw.inArray(mdb8,version):
# --compression-algorithms
dmp_option += " --source-data=1 --apply-replica-statements --include-source-host-port "
else:
dmp_option += " --master-data=1 --apply-slave-statements --include-master-host-port --compress "

dump_sql_data = getServerDir() + "/bin/mysqldump --single-transaction --default-character-set=utf8mb4 --compress -q " + dmp_option + " -h" + ip + " -P" + \
dump_sql_data = getServerDir() + "/bin/mysqldump --single-transaction --default-character-set=utf8mb4 -q " + dmp_option + " -h" + ip + " -P" + \
port + " -u" + user + " -p'" + apass + "' --ssl-mode=DISABLED " + sync_db + " > " + bak_file
print(dump_sql_data)
time_s = time.time()
Expand Down

0 comments on commit 994bc4a

Please sign in to comment.