The invention provides a historical
library synchronization method and
system based on a
power grid platform. The method comprises the following steps: a synchronous sending
server receives
sql data sent by a data change source through a message
bus, and forwards the data to a write archive log thread and a TCP sending thread; the archive log writing thread stores the data into an archive log, and the TCP sending thread sends the data to a synchronous receiving
server through a TCP link; the synchronous receiving
server receives the data, forwards the data to a standby
database writing and archiving log thread and a
database interface, executes a storage operation and stores the data into an archiving log; when the synchronous receiving
server side recovers from the fault state, a data state
recovery message is sent to the synchronous sending
server side, the synchronous sending
server side retrieves unsynchronized data from the archived log and sends the unsynchronized data to the synchronous receiving server side through the TCP link, and the synchronous receiving server side stores the archived log and executes storage operation. According to the invention, the real-time performance, the reliability and the safety of the data are ensured.