The application relates to the technical field of
database backup and synchronization, in particular to a
database master-slave file adaptive fast synchronization method, which comprises the following steps: performing difference evaluation based on the meta information of the
database master-slave files, directly adopting a
record-by-
record synchronization mode if the overall difference is too large, or entering an incremental synchronization mode; the incremental synchronization identifies inconsistent blocks by comparing the check values of the data blocks and counts the number of the inconsistent blocks; the
system respectively estimates the total time consumption of the two synchronization
modes according to performance parameters, the total
block number, the inconsistent
block number and the total
record number; a secondary decision is made by comparing the estimated time consumption, and the scheme with shorter time consumption is selected for execution; and the final consistency
verification is performed on the master
database file and the
backup database file. Through the multi-layer threshold value judgment and the dynamic time consumption
estimation model, the application intelligently selects the record-by-record synchronization or the block incremental synchronization strategy, guarantees the
data consistency, and significantly improves the efficiency of the database master-slave
file synchronization.