CN115277679B - File synchronization method and system - Google Patents

File synchronization method and system Download PDF

Info

Publication number
CN115277679B
CN115277679B CN202210910978.6A CN202210910978A CN115277679B CN 115277679 B CN115277679 B CN 115277679B CN 202210910978 A CN202210910978 A CN 202210910978A CN 115277679 B CN115277679 B CN 115277679B
Authority
CN
China
Prior art keywords
synchronous
file
instruction
task
synchronization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210910978.6A
Other languages
Chinese (zh)
Other versions
CN115277679A (en
Inventor
吴灿强
孙贝
李光耀
杨施俊
刘瑶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hillstone Networks Co Ltd
Original Assignee
Hillstone Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hillstone Networks Co Ltd filed Critical Hillstone Networks Co Ltd
Priority to CN202210910978.6A priority Critical patent/CN115277679B/en
Publication of CN115277679A publication Critical patent/CN115277679A/en
Application granted granted Critical
Publication of CN115277679B publication Critical patent/CN115277679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a file synchronization method and a system. The method comprises the following steps: the synchronous source server sends a port opening instruction and a process starting instruction to the receiving end server through the task manager, wherein the port opening instruction is used for indicating to open a communication port between the receiving end server and the synchronous source server, and the process starting instruction is used for indicating to start a backup receiving program; under the condition that response information of instruction completion returned by the receiving end server is received, controlling a backup tool to execute a file synchronization task in a task list through a task manager; after the backup tool executes all the file synchronization tasks in the task list, a port closing instruction and a process closing instruction are sent to the receiving end server through the task manager. According to the method and the device, the problems that in the related art, when file synchronization is carried out through the rsync tool, the stability of the synchronization process is poor and potential safety hazards exist are solved.

Description

File synchronization method and system
Technical Field
The present application relates to the field of file synchronization technologies, and in particular, to a method and a system for file synchronization.
Background
File synchronization is an important processing procedure in data processing, and in the related art, the rsync backup tool can be used for realizing real-time file synchronization, and then the synchronization result is checked according to the checking tool of the file check code.
However, on one hand, the rsync tool does not have a security authentication function, and the receiving end is required to expose the path and the port to the outside through the rsync tool to realize synchronization, so that a certain potential safety hazard exists. On the other hand, the method can only verify that the file is successful or failed in synchronization, cannot ensure that the synchronization task is completed, and certainly fails when being interfered by uncontrollable factors such as network interruption or scene demand factors such as multithreading simultaneous initiation request.
Other file synchronization methods also appear in the related art, specifically, statistics is performed on file information contained in the folder to be synchronized to obtain a first file list; synchronizing the files from the pre-synchronization storage address to the post-synchronization storage address through the rsync tool, and counting file information contained in the synchronized file folder to obtain a second file list; and matching the first file list with the second file list to determine whether file synchronization is completed.
However, although the method can ensure that the file under the synchronous folder is synchronized to the receiving end and check whether the synchronous result is normal or not, the synchronous process completely depends on the rsync tool, but the rsync tool does not provide the guarantee in reliability and safety, and the reliability of the synchronous task cannot be ensured. If there are many files under the synchronization folder or there are a large number of files in the synchronization folder, the whole synchronization process takes a relatively long time, and the synchronization process may be interrupted or error caused by interference of many factors in the process.
Aiming at the problems that the stability of the synchronization process is poor and potential safety hazards exist when file synchronization is carried out through an rsync tool in the related art, no effective solution is proposed at present.
Disclosure of Invention
The application provides a file synchronization method and a file synchronization system, which are used for solving the problems that the stability of a synchronization process is poor and potential safety hazards exist when file synchronization is carried out through an rsync tool in the related technology.
According to one aspect of the present application, a method of file synchronization is provided. The method comprises the following steps: the method comprises the steps that a synchronous source server sends a port opening instruction and a process starting instruction to a receiving end server through a task manager, wherein the synchronous source server is provided with a backup tool, the receiving end server is provided with a backup receiving program, the port opening instruction is used for indicating to open a communication port between the receiving end server and the synchronous source server, and the process starting instruction is used for indicating to start the backup receiving program; under the condition that instruction completion response information returned by the receiving end server is received, a task manager is used for controlling a backup tool to execute a file synchronization task in a task list, wherein the instruction completion response information is used for indicating that port opening instructions and process starting instructions are executed, and the file synchronization task indicates that a file is synchronized from a synchronization source server to the receiving end server; after the backup tool executes all the file synchronization tasks in the task list, a port closing instruction and a process closing instruction are sent to the receiving end server through the task manager, wherein the port closing instruction is used for indicating closing of the communication port, and the process closing instruction is used for indicating closing of the backup receiving program.
Optionally, after the backup tool performs all the file synchronization tasks in the task list, sending, by the task manager, a port shutdown instruction and a process shutdown instruction to the receiving end server includes: under the condition that the task manager detects that the backup tool sequentially executes file synchronization tasks in the task list, respectively sending a synchronization result checking instruction to the receiving end server, wherein the synchronization result checking instruction is used for indicating whether the file synchronization tasks are executed successfully or not; after the synchronous source server receives response information returned by the receiving end server aiming at each synchronous result checking instruction, a port closing instruction and a process closing instruction are sent to the receiving end server through the task manager.
Optionally, the method further comprises: after a control instruction is sent to a receiving end server through a task manager, under the condition that no response information is received within a preset time period, the control instruction is issued again until the response information is received, or until the issuing times of the control instruction reach the preset times, wherein the control instruction is one of the following instructions: port open instruction, process start instruction, synchronization result check instruction.
Optionally, before the synchronization source server sends the port opening instruction and the process starting instruction to the receiving end server through the task manager, the method further includes: and receiving a file synchronization request sent by the target application program through the task manager, generating at least one file synchronization task according to the file synchronization request, and recording information of the file synchronization task to obtain a task list.
Optionally, the method further comprises: after the synchronous source server is started, calculating the time difference between the synchronous request time stamp of each file synchronous task and the current time according to a preset period, and judging whether the time difference exceeds a time threshold; under the condition that the time difference value exceeds a time threshold value, determining that the file synchronization task fails; and determining the state of the file synchronization task based on the execution information of the file synchronization task under the condition that the time difference value does not exceed the time threshold value.
Optionally, determining the state of the file synchronization task based on the execution information of the file synchronization task includes: acquiring a first mark of a file synchronization task, wherein the first mark is used for indicating whether a synchronization source server completes file synchronization through a backup tool; if the first mark indicates that the backup tool does not complete file synchronization, confirming that the file synchronization task is in a synchronous file state; acquiring a second mark of a file synchronization task under the condition that the first mark indicates that the backup tool completes file synchronization, wherein the second mark is used for indicating whether a synchronization source server sends a synchronization result checking instruction to a receiving end server or not; under the condition that the second mark indicates that a synchronous result checking instruction is sent, determining that the state of the file synchronous task is normal; and under the condition that the second mark indicates that the synchronous result checking instruction is not sent, determining that the state of the file synchronous task is abnormal, re-executing the file synchronous task, and resetting the first mark and the second mark of the file synchronous task.
Optionally, the method further comprises: after the synchronous source server is started, judging whether a file synchronous task exists in the task list, and executing the steps that the synchronous source server sends a port opening instruction and a process starting instruction to the receiving end server when the file synchronous task exists in the task list.
According to another aspect of the present application, another method of file synchronization is provided. The method comprises the following steps: the receiving end server receives a port opening instruction and a process starting instruction sent by the synchronous source server through the proxy module, wherein the synchronous source server is provided with a backup tool for synchronizing files from the synchronous source server to the receiving end server, and the receiving end server is provided with a backup receiving program for receiving the files transmitted by the backup tool; opening a communication port between a receiving end server and a synchronous source server based on a port opening instruction, starting a backup receiving program based on a process starting instruction, and sending instruction completion response information to the synchronous source server, wherein the instruction completion response information is used for indicating that the port opening instruction and the process starting instruction are executed completely; and receiving the synchronous file sent by the backup tool through the backup receiving program, closing the communication port of the backup tool and closing the backup receiving program under the condition that the port closing instruction and the process closing instruction sent by the synchronous source server are detected.
Optionally, receiving, by the backup receiving program, the synchronization file sent by the backup tool includes: receiving a synchronization result checking instruction sent by a synchronization source server, and calculating a check code of the received synchronization file; acquiring a check code of a synchronous file in a current synchronous task recorded in a task list, and comparing the calculated check code with the check code recorded in the task list; and storing the synchronous file to a path indicated by the current synchronous task under the condition that the calculated check code is the same as the recorded check code, and sending response information of a synchronous result checking instruction to the synchronous source server.
Optionally, after comparing the calculated check code with the check code recorded in the task list, the method further includes: and deleting the received synchronous file under the condition that the calculated check code is different from the recorded check code.
According to another aspect of the present application, a file synchronization system is provided. The system comprises: the system comprises a synchronous source server, a task manager and a backup tool, wherein the task manager and the backup tool are operated, the backup tool is used for executing a file synchronization task, the task manager is used for indicating a communication port between a receiving end server and the synchronous source server to be started before the file synchronization task is executed and indicating the receiving end server to start a backup receiving program, and the task manager is also used for indicating the receiving end server to close the communication port between the receiving end server and the synchronous source server after the file synchronization task is executed and indicating the receiving end server to close the backup receiving program; the receiving end server is operated with an agent module and a backup receiving program, the agent module is used for starting a communication port between the receiving end server and the synchronous source server according to the instruction of the task manager, and starting the backup receiving program, the backup receiving program is used for receiving files transmitted by the backup tool after starting, and the agent module is also used for closing the communication port between the receiving end server and the synchronous source server according to the instruction of the task manager, and closing the backup receiving program.
According to another aspect of the present application, a document synchronization apparatus is provided. The device comprises: the system comprises a first sending unit, a second sending unit and a process starting unit, wherein the first sending unit is used for sending a port opening instruction and a process starting instruction to a receiving end server through a task manager by utilizing a synchronous source server, the synchronous source server is provided with a backup tool, the receiving end server is provided with a backup receiving program, the port opening instruction is used for indicating to open a communication port between the receiving end server and the synchronous source server, and the process starting instruction is used for indicating to start the backup receiving program; the execution unit is used for controlling the backup tool to execute a file synchronization task in the task list through the task manager under the condition that instruction completion response information returned by the receiving end server is received, wherein the instruction completion response information is used for indicating that the port opening instruction and the process starting instruction are executed, and the file synchronization task indicates that a file is synchronized from the synchronization source server to the receiving end server; the second sending unit is used for sending a port closing instruction and a process closing instruction to the receiving end server through the task manager after the backup tool executes all the file synchronization tasks in the task list, wherein the port closing instruction is used for indicating closing of the communication port, and the process closing instruction is used for indicating closing of the backup receiving program.
According to another aspect of the present application, another document synchronization apparatus is provided. The device comprises: the first receiving unit is used for receiving a port opening instruction and a process starting instruction sent by the synchronous source server through the proxy module, wherein the synchronous source server is provided with a backup tool for synchronizing files from the synchronous source server to the receiving end server, and the receiving end server is provided with a backup receiving program for receiving the files transmitted by the backup tool; the second execution unit is used for opening a communication port between the receiving end server and the synchronous source server based on the port opening instruction, starting a backup receiving program based on the process starting instruction, and sending instruction completion response information to the synchronous source server, wherein the instruction completion response information is used for indicating that the port opening instruction and the process starting instruction are executed; the second receiving unit is used for receiving the synchronous file sent by the backup tool through the backup receiving program, closing the communication port of the backup tool and closing the backup receiving program under the condition that the port closing instruction and the process closing instruction sent by the synchronous source server are detected.
According to another aspect of the embodiment of the present invention, there is also provided a computer storage medium for storing a program, where the program controls a device in which the computer storage medium is located to execute a file synchronization method when running.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device including a processor and a memory; the memory has stored therein computer readable instructions, and the processor is configured to execute the computer readable instructions, wherein the computer readable instructions execute a file synchronization method when executed.
Through the application, the following steps are adopted: the method comprises the steps that a synchronous source server sends a port opening instruction and a process starting instruction to a receiving end server through a task manager, wherein the synchronous source server is provided with a backup tool, the receiving end server is provided with a backup receiving program, the port opening instruction is used for indicating to open a communication port between the receiving end server and the synchronous source server, and the process starting instruction is used for indicating to start the backup receiving program; under the condition that instruction completion response information returned by the receiving end server is received, a task manager is used for controlling a backup tool to execute a file synchronization task in a task list, wherein the instruction completion response information is used for indicating that port opening instructions and process starting instructions are executed, and the file synchronization task indicates that a file is synchronized from a synchronization source server to the receiving end server; after the backup tool executes all the file synchronization tasks in the task list, a port closing instruction and a process closing instruction are sent to the receiving end server through the task manager, wherein the port closing instruction is used for indicating closing of the communication port, and the process closing instruction is used for indicating closing of the backup receiving program, so that the problems that the stability of the synchronization process is poor and potential safety hazards exist when the file synchronization is carried out through the rsync tool in the related technology are solved. Thereby achieving the effect of improving the file synchronization security.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application, illustrate and explain the application and are not to be construed as limiting the application. In the drawings:
FIG. 1 is a schematic diagram of a file synchronization system provided according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an alternative file synchronization system provided in accordance with an embodiment of the present application;
FIG. 3 is a flow chart of a method of file synchronization provided in accordance with an embodiment of the present application;
FIG. 4 is a flow chart of another method of file synchronization provided in accordance with an embodiment of the present application;
FIG. 5 is a flow chart of an alternative file synchronization method provided in accordance with an embodiment of the present application;
FIG. 6 is a flow chart of an alternative file synchronization method provided in accordance with an embodiment of the present application;
FIG. 7 is a schematic diagram of a file synchronization device according to an embodiment of the present application;
fig. 8 is a schematic diagram of another file synchronization device according to an embodiment of the present application.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
For convenience of description, the following will describe some terms or terms related to the embodiments of the present application:
rsync: and a data mirror image backup tool under the linux system. Remote Sync, which uses a fast incremental backup tool, can be synchronized remotely, support local replication, or synchronize with other SSH, rsync hosts.
Example 1
According to an embodiment of the present application, a file synchronization system is provided.
FIG. 1 is a schematic diagram of a file synchronization system according to an embodiment of the present application. As shown in FIG. 1, the system includes
The synchronization source server 101 is operated with a task manager and a backup tool, wherein the backup tool is used for executing a file synchronization task, the task manager is used for instructing the receiving end server 102 to start a communication port with the synchronization source server 101 before the file synchronization task is executed and instructing the receiving end server 102 to start a backup receiving program, and the task manager is also used for instructing the receiving end server 102 to close the communication port with the synchronization source server 101 after the file synchronization task is executed and instructing the receiving end server 102 to close the backup receiving program.
The receiving end server 102 is operated with a proxy module and a backup receiving program, the proxy module is used for starting a communication port between the receiving end server 102 and the synchronous source server 101 according to the instruction of the task manager, starting the backup receiving program, the backup receiving program is used for receiving files transmitted by the backup tool after starting, and the proxy module is also used for closing the communication port between the receiving end server 102 and the synchronous source server 101 according to the instruction of the task manager, and closing the backup receiving program.
It should be noted that, the number of the synchronization source servers 101 and the number of the receiving end servers 102 are not limited, and the synchronization source servers 101 and the receiving end servers 102 may be one-to-many, many-to-one, or many-to-many, that is, one synchronization source server 101 may synchronize files with a plurality of receiving end servers 102 at the same time, and one receiving end server 102 may also receive the synchronization files from a plurality of synchronization source servers 101 at the same time.
The synchronous source server 101 and the receiving end server 102 perform data transmission through a communication channel through secure authentication, the communication channel needs to be established and maintained depending on other services and applications, in one embodiment, an HTTPS secure authentication interaction channel is established between the synchronous source server 101 and the receiving end server 102, the synchronous source server 101 issues an instruction to the receiving end server 102 through an HTTPS channel, and the receiving end server 102 returns an instruction completion result to the synchronous source server 101 through the HTTPS channel. It should be noted that the communication channel of this embodiment includes, but is not limited to, HTTPS connection.
In an alternative embodiment, as shown in fig. 2, the sync source server 101 runs and maintains a sync task manager and a backup tool, where the sync task manager is a functional application module, and resides and runs on the sync source server 101 in a system background process or a system service, and opens a part of ports to receive a file synchronization request sent by a target application program (an upper application system in fig. 2), and the backup tool may be an rsync tool, and execute a file synchronization task indicated by the synchronization request through the rsync tool.
The receiving end server 102 runs and maintains a proxy module (sync task receiving end proxy), which is a function application module, and a receiving end program of a backup tool, and provides a function portal to an operating system of the receiving end server 102 in response to a request from the HTTPS security authentication channel. The backup receiving program may be a receiving end program of the rsync tool, and receives a file transmitted by the rsync tool, and forwards the file to a designated path, thereby completing a file synchronization task.
It should be noted that, the upper layer application includes, but is not limited to, any functional module or application capable of initiating a request, and may run on any server, as shown in fig. 2, where the upper layer application may run on a server other than the synchronization source server 101 and the receiving end server 102, and the upper layer application may also run on the synchronization source server 101 or the receiving end server 102, where the request form is not specified, and may be an HTTP request or another request, depending on the design and implementation of the manner in which the synchronization task manager receives the request command.
In the process of executing file synchronization tasks, a synchronization task manager maintains a synchronization task list, and controls an agent module of a receiving end to complete synchronization preparation work and ending work in a matched mode through issuing a synchronization control command, a retransmission mechanism of the synchronization work is achieved by assisting in synchronization task monitoring, and quick synchronization of large files is achieved by means of an rsync tool. The synchronization task list records file related information currently being synchronized, including a file name, a file MD5, a file size, and the like, a source storage path of the file, a storage path of the file at the receiving end, and a synchronization initiation timestamp.
The synchronous task receiving end proxy also maintains a synchronous task list, the synchronous task receiving end proxy receives a synchronous control command issued by the synchronous task manager, completes specific operation according to the command, is responsible for managing the rsync tool receiving end process, thereby the rsync tool receiving end process receives a synchronous file from the synchronous task manager, and feeds back the synchronous progress condition after checking the synchronous result, wherein the synchronous task list records the file related information, the source storage path, the receiving end file storage path, the synchronous source server 101IP address and the like of the file currently being synchronized, and the file related information comprises a file name, a file MD5, a file size and the like.
Note that, the IP address of the synchronization source server 101 may be recorded in plural numbers, and corresponds to a synchronization request for the same file initiated from a different synchronization source server 101. Multiple file storage paths may also be recorded, corresponding to the need for synchronizing the same file to different paths from different synchronization tasks. Under the above circumstances, the synchronization file is transferred between servers only once by means of the rsync tool, and is stored in the transfer path after synchronization, and then copied to different storage paths by the transfer path, that is, the same file is realized only once by synchronization, so that the reliability of file synchronization is further improved.
Based on the reusability of the rsync tool, the sync task manager can maintain and process multiple sync tasks, and the sync task receiving end proxy can also process the receiving process of multiple sync files at the same time. For the synchronous task manager, the criterion of the same synchronous task is that the file names, the file sizes, the file MD5, the IP address of the receiving end server 102 and the storage paths of the receiving end files corresponding to the two tasks are the same. For the synchronous task receiving end proxy, the criterion of the same synchronous task is that the file names, the file sizes, the file MD5, the IP address of the synchronous source server 101 and the storage paths of the received files corresponding to the two tasks are the same. It should be noted that, the storage manner of the synchronous task list includes, but is not limited to, a file, but no matter which manner is used for storing, the operation of the synchronous task list is mutually exclusive, that is, only one synchronous task can be read or written at a time.
In addition, it should be noted that, in this embodiment, a file with a file size exceeding 100GB is referred to as a large file, and the file synchronization method in this embodiment is provided for the problem that the time consumed for synchronizing such a file by HTTP or the like may be long, and the synchronization process is easy to be disconnected, but this embodiment is also applicable to synchronization of files with other sizes.
By the embodiment, before executing the file synchronization task, the receiving end server 102 is opened to start a communication port with the synchronization source server 101, and a process of backing up the receiving program is started, after executing the file synchronization task, the receiving end server 102 is closed to start a communication port with the synchronization source server 101, and the process of starting up the backup receiving program is closed, so that the receiving end server 102 is ensured not to expose an unnecessary port to the outside when no synchronization task exists, not to start an unnecessary process, and not to be in a state easy to attack, thereby improving the security of the receiving end server 102.
Example 2
According to an embodiment of the application, a file synchronization method is provided.
Fig. 3 is a flowchart of a file synchronization method according to an embodiment of the present application. As shown in fig. 3, the method comprises the steps of:
In step S301, the synchronization source server sends a port opening instruction and a process starting instruction to the receiving end server through the task manager, wherein the synchronization source server is provided with a backup tool, the receiving end server is provided with a backup receiving program, the port opening instruction is used for indicating to open a communication port between the receiving end server and the synchronization source server, and the process starting instruction is used for indicating to start the backup receiving program.
Specifically, the synchronization source server is a server for executing file synchronization, the synchronization task manager is a functional application module, and the synchronization task manager resides and operates on the synchronization source server in a system background process or a system service mode, the backup tool can be an rsync tool, and the communication port between the receiving end server and the synchronization source server is a host port used on the receiving end server when the rsync tool performs file synchronization.
Under the condition that a file synchronization request sent by a target application program is received, the synchronization task manager sends a port opening instruction and a process starting instruction to the receiving end server, wherein the port opening instruction enables the receiving end server to open an rsync tool to synchronize a communication port in a firewall rule mode and the like, so that the synchronization source server can send files to the receiving end server by means of the rsync tool later, and the process starting instruction enables the receiving end server to operate the receiving end program of the rsync to receive the synchronization files.
In step S302, under the condition that the instruction completion response information returned by the receiving end server is received, the task manager controls the backup tool to execute the file synchronization task in the task list, where the instruction completion response information is used to indicate that the port opening instruction and the process starting instruction are executed, and the file synchronization task indicates that the file is synchronized from the synchronization source server to the receiving end server.
Specifically, after receiving the port opening instruction, the receiving end server checks whether the firewall rule of the receiving end server releases the host port synchronously used by the rsync tool, if so, the receiving end server does not need to operate, and if not, the receiving end server configures the related rule release port. After receiving the process starting instruction, the receiving end server checks whether the process of the receiving end program running the rsync tool is started or not, if so, the operation is not needed, and if not, the process of the receiving end program of the rsync tool is started. Under the condition that the host port used by the rsync tool is released and the process of the receiving end program of the rsync tool is started, the receiving end server returns instruction completion response information to the synchronization source server, and the synchronization source server can start executing file synchronization tasks.
Step S303, after the backup tool executes all the file synchronization tasks in the task list, a port closing instruction and a process closing instruction are sent to the receiving end server through the task manager, wherein the port closing instruction is used for indicating to close the communication port, and the process closing instruction is used for indicating to close the backup receiving program.
Specifically, the file synchronization task in the task list may include a plurality of files, the file synchronization task executed by the rsync tool refers to a process of synchronizing the files to the receiving end server, the process of synchronizing the files lasts for a period of time, the time consumption is different due to network factors and the size of the files, after the rsync tool is called by the synchronization source server to start synchronization, the result feedback of the rsync tool can be received by the synchronization source server, after the file synchronization task is executed, a successful execution result can be obtained, and a failure execution result can also be obtained.
After the task manager knows that all file synchronization tasks in the task list are executed, a port closing instruction and a process closing instruction are sent to the receiving end server, the receiving end server responds to the port closing instruction to close a host port synchronously used by the rsync tool, so that the receiving end server does not expose an unnecessary port to the outside when no synchronization task exists, the receiving end server responds to the process closing instruction to close a process of a receiving end program of the rsync tool, the on-demand starting process is also in safety consideration, and the receiving end server does not start an unnecessary process as far as possible, so that the receiving end server is not easy to be in an easily attacked state, and the safety of the receiving end server is improved.
According to the file synchronization method provided by the embodiment of the application, a port opening instruction and a process starting instruction are sent to a receiving end server through a task manager by a synchronization source server, wherein the synchronization source server is provided with a backup tool, the receiving end server is provided with a backup receiving program, the port opening instruction is used for indicating to open a communication port between the receiving end server and the synchronization source server, and the process starting instruction is used for indicating to start the backup receiving program; under the condition that instruction completion response information returned by the receiving end server is received, a task manager is used for controlling a backup tool to execute a file synchronization task in a task list, wherein the instruction completion response information is used for indicating that port opening instructions and process starting instructions are executed, and the file synchronization task indicates that a file is synchronized from a synchronization source server to the receiving end server; after the backup tool executes all the file synchronization tasks in the task list, a port closing instruction and a process closing instruction are sent to the receiving end server through the task manager, wherein the port closing instruction is used for indicating closing of the communication port, and the process closing instruction is used for indicating closing of the backup receiving program, so that the problems that the stability of the synchronization process is poor and potential safety hazards exist when the file synchronization is carried out through the rsync tool in the related technology are solved. Thereby achieving the effect of improving the file synchronization security.
Optionally, before the synchronization source server sends the port opening instruction and the process starting instruction to the receiving end server through the task manager, the method further includes: and receiving a file synchronization request sent by the target application program through the task manager, generating at least one file synchronization task according to the file synchronization request, and recording information of the file synchronization task to obtain a task list.
Specifically, the synchronization task list in the synchronization source server records file related information of the file synchronization request, a receiving end server IP, a source storage path of the file, a receiving end file storage path, and a synchronization initiation timestamp, where the file related information includes a file name, a file MD5, a file size, and the like. Meanwhile, the synchronous source server also sends information such as a file synchronous request to the receiving end server, the receiving end server also generates a synchronous task list according to the received information, and the file related information, a source storage path of the file, a storage path of the receiving end file, an IP address of the synchronous source server and the like which are currently in synchronization are recorded, wherein the file related information comprises a file name, a file MD5, a file size and the like. According to the synchronous task list of the comparison synchronous source server and the receiving end server, whether the same task exists or not can be judged, and therefore conflicts in the file synchronization process are prevented.
In order to ensure the integrity of the synchronous data after the completion of the execution of the synchronous task, optionally, in the file synchronization method provided in the embodiment of the present application, after the backup tool completes all the file synchronization tasks in the task list, sending, by the task manager, a port closing instruction and a process closing instruction to the receiving end server includes: under the condition that the task manager detects that the backup tool sequentially executes file synchronization tasks in the task list, respectively sending a synchronization result checking instruction to the receiving end server, wherein the synchronization result checking instruction is used for indicating whether the file synchronization tasks are executed successfully or not; after the synchronous source server receives response information returned by the receiving end server aiming at each synchronous result checking instruction, a port closing instruction and a process closing instruction are sent to the receiving end server through the task manager.
Specifically, after the rsync tool finishes the file synchronization task each time, the task manager sends a synchronization result checking instruction to the receiving end server, and the receiving end server calculates the received MD5 value of the synchronization file and compares the MD5 value with the MD5 value recorded in the synchronization task list. And under the condition that the MD5 values are the same, the files are successfully synchronized, the synchronized files are copied to each appointed path, response information of synchronization completion is returned to the synchronization source server, and records related to the synchronization task are cleared from the synchronization task list. And under the condition that the MD5 values are different, the file synchronization failure is indicated, the receiving end node server deletes the synchronization file with the synchronization error, and response information of the synchronization failure is returned to the synchronization source node server.
Further, after receiving the response information fed back by the receiving end node server, the synchronization source server sends a port closing instruction and an rsync receiving end process closing instruction to the receiving end server, the receiving end server checks whether other synchronization tasks are still in progress in the synchronization task list, and under the condition that no other synchronization tasks are in progress, the receiving end node server closes a host port used by rsync synchronization according to relevant firewall rules, finds an rsync receiving end process and closes the process.
In this embodiment, the synchronization source server informs the receiving end server of the end of file synchronization through the synchronization result checking instruction, and enables the receiving end server to check the integrity of the synchronized file, so as to avoid inconsistent conditions after file synchronization caused by factors such as network fluctuation, data packet loss, and the like.
In order to solve the problem of failure in issuing the instruction due to the influence of transient network fluctuation and the like, optionally, in the file synchronization method provided in the embodiment of the present application, the method further includes: after a control instruction is sent to a receiving end server through a task manager, under the condition that no response information is received within a preset time period, the control instruction is issued again until the response information is received, or until the issuing times of the control instruction reach the preset times, wherein the control instruction is one of the following instructions: port open instruction, process start instruction, synchronization result check instruction.
Specifically, the time of issuing the control command again may be equal or unequal, for example, when the first control command fails to issue, the issuing of the second identical command may be delayed for a certain time, for example, 3s, if no response information is still received, the issuing of the third identical command may be delayed for a certain time, for example, 5s, and if no response information is still received, the issuing of the synchronous control command is determined to fail. For convenience of description, the instruction issue mentioned below indicates such a mechanism. The embodiment issues the synchronous control command through the automatic retry mechanism, thereby solving the problem of failure in issuing the control command caused by network fluctuation and other conditions.
If the synchronization source server executes the file synchronization task, the task is interrupted due to power failure, and optionally, in the file synchronization method provided in the embodiment of the present application, the method further includes: after the synchronous source server is started, judging whether a file synchronous task exists in the task list, and executing the steps that the synchronous source server sends a port opening instruction and a process starting instruction to the receiving end server when the file synchronous task exists in the task list.
Specifically, when the synchronous source server starts to suggest, checking whether a task record exists in the synchronous task list, and restarting the synchronous process for each task one by one if the task record exists, so that the problem that the file fails to be successfully synchronized under the condition that the synchronous task is interrupted due to abnormal reasons is avoided.
If the file synchronization task exists in the task list for a long time, the file synchronization task may have an exception, and optionally, in the file synchronization method provided in the embodiment of the present application, the method further includes: after the synchronous source server is started, calculating the time difference between the synchronous request time stamp of each file synchronous task and the current time according to a preset period, and judging whether the time difference exceeds a time threshold; under the condition that the time difference value exceeds a time threshold value, determining that the file synchronization task fails; and determining the state of the file synchronization task based on the execution information of the file synchronization task under the condition that the time difference value does not exceed the time threshold value.
Specifically, in order to monitor the synchronous tasks, the synchronous task manager records execution state information for each synchronous task, determines the state of the file synchronous task according to the execution state information, and cleans the execution state information along with cleaning of the synchronous task list, namely, cleans after the receiving end server returns a response of synchronous completion.
For example, the execution state information includes a synchronization request timestamp, where the synchronization request timestamp represents a system time when the synchronization task manager receives a synchronization request of an upper service, and it is determined at regular time whether a difference between the synchronization request timestamp of each task in the synchronization task list and a current system time exceeds a set threshold, if so, it indicates that a synchronization request corresponding to a file synchronization task is overtime, it determines that the task fails, and if not, it further determines a completion condition of the file synchronization task.
Optionally, in the file synchronization method provided in the embodiment of the present application, determining the state of the file synchronization task based on the execution information of the file synchronization task includes: acquiring a first mark of a file synchronization task, wherein the first mark is used for indicating whether a synchronization source server completes file synchronization through a backup tool; if the first mark indicates that the backup tool does not complete file synchronization, confirming that the file synchronization task is in a synchronous file state; acquiring a second mark of a file synchronization task under the condition that the first mark indicates that the backup tool completes file synchronization, wherein the second mark is used for indicating whether a synchronization source server sends a synchronization result checking instruction to a receiving end server or not; under the condition that the second mark indicates that a synchronous result checking instruction is sent, determining that the state of the file synchronous task is normal; and under the condition that the second mark indicates that the synchronous result checking instruction is not sent, determining that the state of the file synchronous task is abnormal, re-executing the file synchronous task, and resetting the first mark and the second mark of the file synchronous task.
Specifically, the execution state information may further include a first flag and a second flag, where the first flag is a sync end flag of a sync source end rsync, which indicates that the sync task manager has completed synchronizing a file to the target server through the rsync tool, and when the running of the rsync command is ended, the flag is set to "yes"; the second mark is a mark for sending a synchronous result checking instruction, which indicates that the synchronous task manager successfully informs a synchronous task receiving end agent on the target server of checking the synchronous task result, and the mark is set as yes after the synchronous result checking instruction is sent successfully.
And judging whether a synchronous request corresponding to the file synchronous task is overtime or not, judging whether a synchronous source side rsync synchronous end mark of the task is marked as 'yes', if not marked as 'yes', indicating that the current task is still in a synchronous file state, ending the monitoring of the synchronous task of the present round, if marked as 'yes', judging whether a synchronous result checking instruction mark issued by the task is marked as 'yes', if marked as 'yes', indicating that the state of the task is normal, ending the monitoring of the synchronous task of the present round, if not marked as 'yes', indicating that the synchronous task is abnormal, restarting the synchronous process of the task, and resetting the synchronous source side rsync synchronous end mark of the task and synchronous result checking instruction mark information issued.
Example 3
According to an embodiment of the present application, another file synchronization method is provided.
Fig. 4 is a flowchart of a file synchronization method according to an embodiment of the present application. As shown in fig. 4, the method comprises the steps of:
in step S401, the receiving end server receives, through the proxy module, a port opening instruction and a process starting instruction sent by the synchronization source server, where the synchronization source server is provided with a backup tool for synchronizing a file from the synchronization source server to the receiving end server, and the receiving end server is provided with a backup receiving program for receiving the file transmitted by the backup tool.
Specifically, the receiving end server is a server for receiving the file synchronization result, and the proxy module is a function application module, and provides a function entry for an operating system of the receiving end server to respond to a request from the HTTPS security authentication channel. The backup tool may be an rsync tool, and the backup receiving program may be a receiving end program of the rsync tool.
Under the condition that a file synchronization request sent by a target application program is received, a synchronization task manager sends a port opening instruction and a process starting instruction to a receiving end server, wherein the port opening instruction enables the receiving end server to open an rsync tool synchronization communication port, and the process starting instruction enables the receiving end server to operate the rsync receiving end program.
Step S402, a communication port between a receiving end server and a synchronous source server is opened based on a port opening instruction, a backup receiving program started based on a process starting instruction is started, and instruction completion response information is sent to the synchronous source server, wherein the instruction completion response information is used for indicating that the port opening instruction and the process starting instruction are executed.
Specifically, after receiving the port opening instruction, the receiving end server checks whether the firewall rule of the receiving end server releases the host port synchronously used by the rsync tool, if so, the receiving end server does not need to operate, and if not, the receiving end server configures the related rule release port. After receiving the process starting instruction, the receiving end server checks whether the process of the receiving end program running the rsync tool is started or not, if so, the operation is not needed, and if not, the process of the receiving end program of the rsync tool is started. And under the condition that the host port used by the rsync tool is released and the process of the receiving end program of the rsync tool is started, the receiving end server returns instruction completion response information to the synchronous source server.
Step S403, receiving, by the backup receiving program, the synchronization file sent by the backup tool, and closing the communication port of the backup tool and closing the backup receiving program when detecting the port closing instruction and the process closing instruction sent by the synchronization source server.
Specifically, after all file synchronization tasks are executed, the synchronization source server sends a port closing instruction and a process closing instruction to the receiving end server, and the receiving end server responds to the port closing instruction to close a host port synchronously used by the rsync tool, so that the receiving end server does not expose an unnecessary port to the outside when no synchronization task exists, and responds to the process closing instruction to close a process of a receiving end program of the rsync tool, the process is started as required, the receiving end server is also in safety consideration, and the unnecessary process is not started as far as possible, so that the receiving end server is not easy to be in an easily attacked state, and the safety of the receiving end server is improved.
According to the file synchronization method, a receiving end server receives a port opening instruction and a process starting instruction sent by a synchronization source server through an agent module, wherein the synchronization source server is provided with a backup tool for synchronizing a file from the synchronization source server to a receiving end server, and the receiving end server is provided with a backup receiving program for receiving the file transmitted by the backup tool; opening a communication port between a receiving end server and a synchronous source server based on a port opening instruction, starting a backup receiving program based on a process starting instruction, and sending instruction completion response information to the synchronous source server, wherein the instruction completion response information is used for indicating that the port opening instruction and the process starting instruction are executed completely; the synchronous file sent by the backup tool is received through the backup receiving program, the communication port of the backup tool is closed under the condition that the port closing instruction and the process closing instruction sent by the synchronous source server are detected, and the backup receiving program is closed, so that the problems that the stability of the synchronous process is poor and potential safety hazards exist when the file is synchronized through the rsync tool in the related technology are solved. Thereby achieving the effect of improving the file synchronization security.
Optionally, in the file synchronization method provided in the embodiment of the present application, receiving, by the backup receiving program, the synchronization file sent by the backup tool includes: receiving a synchronization result checking instruction sent by a synchronization source server, and calculating a check code of the received synchronization file; acquiring a check code of a synchronous file in a current synchronous task recorded in a task list, and comparing the calculated check code with the check code recorded in the task list; and storing the synchronous file to a path indicated by the current synchronous task under the condition that the calculated check code is the same as the recorded check code, and sending response information of a synchronous result checking instruction to the synchronous source server.
Specifically, the check code may be an MD5 value of the file, after the rsync tool finishes the file synchronization task each time, the task manager sends a synchronization result checking instruction to the receiving end server, the receiving end server calculates the MD5 value of the received synchronization file, compares the MD5 value with the MD5 value recorded in the synchronization task list, indicates that the file is successfully synchronized when the MD5 value is the same, copies the synchronization file to each designated path, returns response information of synchronization completion to the synchronization source server, and clears the record related to the synchronization task from the synchronization task list.
Optionally, in the file synchronization method provided in the embodiment of the present application, after comparing the calculated check code with the check code recorded in the task list, the method further includes: and deleting the received synchronous file under the condition that the calculated check code is different from the recorded check code.
Specifically, the check code may be an MD5 value of the file, the receiving end server calculates the MD5 value of the received synchronization file, compares the MD5 value with the MD5 value recorded in the synchronization task list, indicates that the file synchronization fails under the condition that the MD5 values are different, deletes the synchronization file with the synchronization error, and returns response information of the synchronization failure to the synchronization source node server, so that the synchronization source node server timely acquires the file synchronization condition, and re-executes the file synchronization, thereby ensuring the reliability of the file synchronization.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
Example 4
According to an embodiment of the application, another file synchronization method is also provided.
Fig. 5 is a schematic diagram of file synchronization from one synchronization source server to one receiver server, and fig. 6 is a schematic diagram of file synchronization from two synchronization source servers to one receiver server. As shown in fig. 5 or 6, the file synchronization method includes:
1. under the condition that the receiving end server is ready to work, returning response information of 'ready to work and capable of being synchronized' to the synchronous source server;
2. the synchronous source server sends an open port instruction and a start rsync receiving end process instruction to the receiving end server;
3. the receiving end server checks whether the firewall rules of the receiving end server are released from the host port used by rsync synchronization, if not, the relevant rule release port is configured, and if so, the operation is not needed;
4. the receiving end server checks whether the receiving end server itself starts up to run the rsync receiving end process, if not, the rsync receiving end process is started up through the command of the rsync tool itself, if so, the operation is not needed;
5. the receiving end server returns a response of 'instruction completion' to the synchronous source server;
6. The synchronous source server synchronizes the file to the receiving end server by means of the rsync tool, the synchronization process can last for a period of time, the specific time consumption is different due to network factors and the size of the file, and the synchronous source server can receive the result feedback of the rsync tool, and success or failure can be achieved;
7. after the file synchronization is finished, the synchronization source server sends a synchronization result checking instruction to the receiving end server;
8. the receiving end server calculates the MD5 value of the received synchronous file, compares the MD5 value with the MD5 value recorded in the synchronous task list, if the MD5 value is different, the receiving end server deletes the error synchronous file, and the receiving end node server returns a response of 'synchronization failure' to the synchronous source node server, and restarts the file synchronization process; if the synchronous files are the same, the synchronous files are successfully synchronized, and the synchronous files are copied to the designated paths;
9. the receiving end server clears records related to the synchronous task from the synchronous task list;
10. the receiving end server returns a response of 'synchronization completion' to each synchronization source server;
11. the synchronous source server sends a port closing instruction and an rsync receiving end process closing instruction to the receiving end server;
12. The receiving end server checks whether other synchronous tasks are still in progress in the synchronous task list, if not, the receiving end server deletes relevant firewall rules to close a host port used by rsync synchronization, finds a rsync receiving end process and closes the process; if yes, the receiving end server returns a response of 'synchronization ending' to each synchronization source server, wherein the response carries sign information related to the synchronization task to distinguish which task is synchronously ended;
13. the synchronous source server clears the record related to the synchronous task from the synchronous task list, and the synchronous task ends until the synchronous task ends;
14. the receiving end server returns a response of 'synchronization failure' to the synchronization source server, the file synchronization process is restarted, and the synchronization task ends.
According to the embodiment, on one hand, the synchronous task manager informs the target server to start the corresponding host port and operate the related service program before starting the synchronous process, and after the synchronous task is finished, the synchronous task receiving end proxy judges whether other synchronous tasks are in execution or not, and if not, the host port is actively closed and the related service program is stopped. The host port of the synchronous target server does not need to be opened for a long time, and related service programs do not need to be kept running for a long time, so that the safety of the receiving end server in the synchronous process is ensured.
On the other hand, after the synchronization process is finished, the synchronization task manager actively informs the synchronization task receiving end agent to check the integrity of the synchronization file, and ensures that the file synchronization is correct. The agent of the synchronous task receiving end feeds back to the synchronous task manager after the file is checked for errors, and the synchronous task manager restarts the synchronous process, so that the accuracy of the synchronous process is ensured.
On the other hand, in particular in the scene of long time consumption and easy fluctuation of large file synchronization, the synchronous task can be restarted by itself until the file synchronization is completed correctly, no special processing of upper layer business is needed, and meanwhile, reliability and safety guarantee are provided for some scenes which have to realize the file synchronization by means of an rsync tool.
Example 5
The embodiment of the application also provides a file synchronization device, and the file synchronization device of the embodiment of the application can be used for executing the file synchronization method provided by the embodiment of the application. The following describes a file synchronization device provided in an embodiment of the present application.
Fig. 7 is a schematic diagram of a file synchronization device according to an embodiment of the present application. As shown in fig. 7, the apparatus includes: a first transmitting unit 701, a first executing unit 702, and a second transmitting unit 703.
Specifically, the first sending unit 701 is configured to send, by using the synchronization source server, a port opening instruction and a process start instruction to the receiving end server through the task manager, where the synchronization source server is installed with a backup tool, the receiving end server is installed with a backup receiving program, the port opening instruction is used to instruct to open a communication port between the receiving end server and the synchronization source server, and the process start instruction is used to instruct to start the backup receiving program.
The first execution unit 702 is configured to control, by using the task manager, the backup tool to execute a file synchronization task in the task list when receiving an instruction completion response message returned by the receiving end server, where the instruction completion response message is used to indicate that both the port open instruction and the process start instruction are executed, and the file synchronization task indicates that a file is synchronized from the synchronization source server to the receiving end server.
The second sending unit 703 is configured to send, to the receiving end server through the task manager, a port closing instruction and a process closing instruction after the backup tool performs all the file synchronization tasks in the task list, where the port closing instruction is used to instruct closing of the communication port, and the process closing instruction is used to instruct closing of the backup receiving program.
The file synchronization device provided by the embodiment of the application is configured to send, through the first sending unit 701, a port opening instruction and a process starting instruction to a receiving end server through a task manager by using a synchronization source server, where the synchronization source server is installed with a backup tool, the receiving end server is installed with a backup receiving program, the port opening instruction is used for indicating to open a communication port between the receiving end server and the synchronization source server, and the process starting instruction is used for indicating to start the backup receiving program; the first execution unit 702 is configured to control, by using the task manager, the backup tool to execute a file synchronization task in the task list when receiving an instruction completion response message returned by the receiving end server, where the instruction completion response message is used to indicate that both the port opening instruction and the process starting instruction are executed, and the file synchronization task indicates that a file is synchronized from the synchronization source server to the receiving end server; the second sending unit 703 is configured to send, to the receiving end server through the task manager, a port closing instruction and a process closing instruction after the backup tool finishes executing all the file synchronization tasks in the task list, where the port closing instruction is used to instruct closing of the communication port, and the process closing instruction is used to instruct closing of the backup receiving program, so that the problem that in the related art, when file synchronization is performed through the rsync tool, the stability of the synchronization process is poor and there is a potential safety hazard is solved, and further an effect of improving the security of file synchronization is achieved.
Optionally, in the file synchronization apparatus provided in the embodiment of the present application, the second sending unit 703 includes: the first sending module is used for respectively sending a synchronous result checking instruction to the receiving end server under the condition that the task manager detects that the backup tool sequentially executes the file synchronous tasks in the task list, wherein the synchronous result checking instruction is used for indicating whether the file synchronous tasks are executed successfully or not; and the second sending module is used for sending a port closing instruction and a process closing instruction to the receiving end server through the task manager after the synchronous source server receives response information returned by the receiving end server aiming at each synchronous result checking instruction.
Optionally, in the file synchronization device provided in the embodiment of the present application, the device further includes: the instruction issuing unit is used for issuing the control instruction again under the condition that the response information is not received within the preset time after the control instruction is sent to the receiving end server through the task manager, until the response information is received, or until the issuing times of the control instruction reach the preset times, wherein the control instruction is one of the following instructions: port open instruction, process start instruction, synchronization result check instruction.
Optionally, in the file synchronization device provided in the embodiment of the present application, the device further includes: and the third sending unit is used for receiving a file synchronization request sent by the target application program through the task manager before the synchronous source server sends a port opening instruction and a process starting instruction to the receiving end server through the task manager, generating at least one file synchronization task according to the file synchronization request, and recording information of the file synchronization task to obtain a task list.
Optionally, in the file synchronization device provided in the embodiment of the present application, the device further includes: the computing unit is used for computing the time difference between the synchronization request time stamp of each file synchronization task and the current time according to a preset period after the synchronization source server is started, and judging whether the time difference exceeds a time threshold; the first determining unit is used for determining that the file synchronization task fails under the condition that the time difference value exceeds a time threshold value; and a second determining unit configured to determine a state of the file synchronization task based on the execution information of the file synchronization task in a case where the time difference value does not exceed the time threshold.
Optionally, in the file synchronization device provided in the embodiment of the present application, the second determining unit includes: the first acquisition module is used for acquiring a first mark of a file synchronization task, wherein the first mark is used for indicating whether a synchronization source server completes file synchronization through a backup tool; the first determining module is used for confirming that the file synchronization task is in a synchronous file state under the condition that the first mark indicates that the backup tool does not complete file synchronization; the second acquisition module is used for acquiring a second mark of the file synchronization task under the condition that the first mark indicates that the backup tool completes file synchronization, wherein the second mark is used for indicating whether the synchronization source server sends a synchronization result checking instruction to the receiving end server or not; the second determining module is used for determining that the state of the file synchronization task is normal under the condition that the second mark indicates that the synchronization result checking instruction is sent; and the third determining module is used for determining that the state of the file synchronization task is abnormal, re-executing the file synchronization task and resetting the first mark and the second mark of the file synchronization task under the condition that the second mark indicates that the synchronization result checking instruction is not sent.
Optionally, in the file synchronization device provided in the embodiment of the present application, the device further includes: and the judging unit is used for judging whether a file synchronization task exists in the task list or not after the synchronous source server is started, and executing the step that the synchronous source server sends a port opening instruction and a process starting instruction to the receiving end server when the file synchronization task exists in the task list.
The file synchronization device includes a processor and a memory, the first transmitting unit 701, the first executing unit 702, the second transmitting unit 703, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the problems that the stability of the synchronization process is poor and potential safety hazards exist when the file synchronization is carried out through the RSYNC tool in the related technology are solved by adjusting the kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
Example 6
The embodiment of the application also provides a file synchronization device, and the file synchronization device of the embodiment of the application can be used for executing the file synchronization method provided by the embodiment of the application. The following describes a file synchronization device provided in an embodiment of the present application.
Fig. 8 is a schematic diagram of a file synchronization device according to an embodiment of the present application. As shown in fig. 8, the apparatus includes: a first receiving unit 801, a second executing unit 802, and a second receiving unit 803.
Specifically, the first receiving unit 801 is configured to receive, by using the proxy module, a port opening instruction and a process starting instruction sent by the synchronization source server, where the synchronization source server is installed with a backup tool, and is configured to synchronize a file from the synchronization source server to the receiving end server, and the receiving end server is installed with a backup receiving program, and is configured to receive the file transmitted by the backup tool.
The second execution unit 802 is configured to open a communication port between the receiving end server and the synchronization source server based on the port opening instruction, start a backup receiving program based on the process starting instruction, and send instruction completion response information to the synchronization source server, where the instruction completion response information is used to indicate that both the port opening instruction and the process starting instruction are executed.
The second receiving unit 803 is configured to receive, by using the backup receiving program, the synchronization file sent by the backup tool, and close the communication port of the backup tool and close the backup receiving program when detecting a port closing instruction and a process closing instruction sent by the synchronization source server.
The file synchronization device provided in this embodiment of the present application is configured to receive, by using a first receiving unit 801, a port opening instruction and a process starting instruction sent by a synchronization source server through an agent module, where the synchronization source server is provided with a backup tool, and is configured to synchronize a file from the synchronization source server to a receiving end server, and the receiving end server is provided with a backup receiving program, and is configured to receive a file transmitted by the backup tool; the second execution unit 802 is configured to open a communication port between the receiving end server and the synchronization source server based on the port opening instruction, start a backup receiving program based on the process starting instruction, and send instruction completion response information to the synchronization source server, where the instruction completion response information is used to indicate that both the port opening instruction and the process starting instruction are executed; the second receiving unit 803 is configured to receive, by using the backup receiving program, the synchronization file sent by the backup tool, and close the communication port of the backup tool and close the backup receiving program when detecting a port closing instruction and a process closing instruction sent by the synchronization source server, thereby solving the problems that in the related art, when file synchronization is performed by using the rsync tool, the stability of the synchronization process is poor and potential safety hazards exist, and further achieving the effect of improving the security of file synchronization.
Optionally, in the file synchronization device provided in the embodiment of the present application, the second receiving unit 803 includes: the first receiving module is used for receiving the synchronous result checking instruction sent by the synchronous source server and calculating the check code of the received synchronous file; the third acquisition module is used for acquiring the check code of the synchronous file in the current synchronous task recorded in the task list and comparing the calculated check code with the check code recorded in the task list; and the storage module is used for storing the synchronous file to the path indicated by the current synchronous task and sending response information of the synchronous result checking instruction to the synchronous source server under the condition that the calculated check code is the same as the recorded check code.
Optionally, in the file synchronization device provided in the embodiment of the present application, the device further includes: and the deleting module is used for deleting the received synchronous file under the condition that the calculated check code is different from the recorded check code after comparing the calculated check code with the check code recorded in the task list.
The file synchronization device includes a processor and a memory, and the first receiving unit 801, the second executing unit 802, the second receiving unit 803, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the problems that the stability of the synchronization process is poor and potential safety hazards exist when the file synchronization is carried out through the RSYNC tool in the related technology are solved by adjusting the kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the application also provides a computer storage medium, which is used for storing the program, wherein the program is used for controlling equipment where the computer storage medium is located to execute a file synchronization method when running.
The embodiment of the application also provides an electronic device, which comprises a processor and a memory; the memory has stored therein computer readable instructions, and the processor is configured to execute the computer readable instructions, wherein the computer readable instructions execute a file synchronization method when executed. The electronic device herein may be a server, a PC, a PAD, a mobile phone, etc.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (8)

1. A method for synchronizing files, comprising:
after the synchronous source server is started, judging whether a file synchronous task exists in a task list, and under the condition that the file synchronous task exists in the task list, sending a port opening instruction and a process starting instruction to a receiving end server by the synchronous source server through a task manager, wherein the synchronous source server is provided with a backup tool, the receiving end server is provided with a backup receiving program, the port opening instruction is used for indicating to open a communication port between the receiving end server and the synchronous source server, and the process starting instruction is used for indicating to start the backup receiving program, wherein the synchronous source server supports synchronous files to a plurality of receiving end servers at the same time, and one receiving end server supports synchronous file from a plurality of synchronous source servers at the same time;
Under the condition that instruction completion response information returned by the receiving end server is received, controlling the backup tool to execute a file synchronization task in a task list through a task manager, wherein the instruction completion response information is used for indicating that the port opening instruction and the process starting instruction are executed, and the file synchronization task indicates that a file is synchronized from the synchronization source server to the receiving end server;
after the backup tool finishes executing all the file synchronization tasks in the task list, sending a port closing instruction and a process closing instruction to the receiving end server through the task manager, wherein the port closing instruction is used for indicating to close the communication port, the process closing instruction is used for indicating to close the backup receiving program, and sending the port closing instruction and the process closing instruction to the receiving end server through the task manager comprises: under the condition that the task manager detects that the backup tool sequentially executes the file synchronization tasks in the task list, respectively sending a synchronization result checking instruction to the receiving end server, wherein the synchronization result checking instruction is used for indicating whether the file synchronization tasks are executed successfully or not; after the synchronous source server receives response information returned by the receiving end server for each synchronous result checking instruction, the port closing instruction and the process closing instruction are sent to the receiving end server through the task manager; the response information is sent when the check code of the synchronous file in the current synchronous task recorded in the task list is calculated and the check code of the synchronous file received by the receiving end server is the same as the check code of the synchronous file in the current synchronous task after comparing the check code of the synchronous file recorded in the task list with the check code of the synchronous file received by the receiving end server.
2. The method according to claim 1, wherein the method further comprises:
after a control instruction is sent to the receiving end server through the task manager, under the condition that no response information is received within a preset time period, the control instruction is re-issued until the response information is received, or until the issuing times of the control instruction reach the preset times, wherein the control instruction is one of the following instructions: the port opening instruction, the process starting instruction and the synchronous result checking instruction.
3. The method of claim 1, wherein before the synchronization source server sends the port open instruction and the process start instruction to the sink server through the task manager, the method further comprises:
and receiving a file synchronization request sent by a target application program through the task manager, generating at least one file synchronization task according to the file synchronization request, and recording information of the file synchronization task to obtain the task list.
4. The method according to claim 1, wherein the method further comprises:
after the synchronous source server is started, calculating a time difference value between a synchronous request time stamp of each file synchronous task and the current time according to a preset period, and judging whether the time difference value exceeds a time threshold value;
Determining that the file synchronization task fails under the condition that the time difference value exceeds the time threshold value;
and determining the state of the file synchronization task based on the execution information of the file synchronization task under the condition that the time difference value does not exceed the time threshold value.
5. The method of claim 4, wherein determining the status of the file synchronization task based on the execution information of the file synchronization task comprises:
acquiring a first mark of the file synchronization task, wherein the first mark is used for indicating whether the synchronization source server completes file synchronization through the backup tool;
confirming that the file synchronization task is in a synchronous file state if the first mark indicates that the backup tool does not complete file synchronization;
acquiring a second mark of the file synchronization task under the condition that the first mark indicates that the backup tool completes file synchronization, wherein the second mark is used for indicating whether the synchronization source server sends a synchronization result checking instruction to the receiving end server;
determining that the state of the file synchronization task is normal under the condition that the second mark indicates that the synchronization result checking instruction is sent;
And if the second mark indicates that the synchronous result checking instruction is not sent, determining that the state of the file synchronous task is abnormal, re-executing the file synchronous task, and resetting the first mark and the second mark of the file synchronous task.
6. A method for synchronizing files, comprising:
after the synchronous source server is started, judging whether a file synchronous task exists in a task list, and under the condition that the file synchronous task exists in the task list, sending a port opening instruction and a process starting instruction to a receiving end server by the synchronous source server through a task manager, and receiving the port opening instruction and the process starting instruction sent by the synchronous source server by the receiving end server through a proxy module, wherein a backup tool is arranged on the synchronous source server and used for synchronizing a file from the synchronous source server to the receiving end server, a backup receiving program is arranged on the receiving end server and used for receiving the file transmitted by the backup tool, wherein the synchronous source server supports synchronous files to a plurality of receiving end servers at the same time, and one receiving end server supports synchronous files from the plurality of synchronous source servers at the same time;
Opening a communication port between the receiving end server and the synchronous source server based on the port opening instruction, starting the backup receiving program based on the process starting instruction, and sending instruction completion response information to the synchronous source server, wherein the instruction completion response information is used for indicating that the port opening instruction and the process starting instruction are executed;
receiving a synchronous file sent by the backup tool through the backup receiving program, closing a communication port of the backup tool and closing the backup receiving program under the condition that a port closing instruction and a process closing instruction sent by the synchronous source server are detected;
wherein, receiving, by the backup receiving program, the synchronization file sent by the backup tool includes: under the condition that the task manager detects that the backup tool sequentially executes file synchronization tasks in a task list, respectively sending a synchronization result checking instruction to the receiving end server, receiving the synchronization result checking instruction sent by the synchronization source server by the receiving end server, and calculating a check code of the received synchronization file; acquiring a check code of a synchronous file in a current synchronous task recorded in a task list, and comparing the calculated check code with the check code recorded in the task list; storing the synchronous file to a path indicated by the current synchronous task and sending response information of the synchronous result checking instruction to the synchronous source server under the condition that the calculated check code is the same as the recorded check code; and after the synchronous source server receives response information returned by the receiving end server for each synchronous result checking instruction, the port closing instruction and the process closing instruction are sent to the receiving end server through a task manager.
7. The method of claim 6, wherein after comparing the calculated check code with the check codes recorded in the task list, the method further comprises:
and deleting the received synchronous file under the condition that the calculated check code is different from the recorded check code.
8. A file synchronization system, comprising:
the synchronous source server is operated with a task manager and a backup tool, the backup tool is used for executing file synchronous tasks, the task manager is used for indicating a receiving end server to start a communication port between the receiving end server and the synchronous source server before the file synchronous tasks are executed and indicating the receiving end server to start a backup receiving program, after the synchronous source server is started, judging whether the file synchronous tasks exist in a task list, and under the condition that the file synchronous tasks exist in the task list, the synchronous source server sends a port opening instruction and a process starting instruction to the receiving end server through the task manager, under the condition that the instruction completion response information returned by the receiving end server is received, the task manager is used for controlling the backup tool to execute the file synchronous tasks in the task list, the instruction completion response information is used for indicating that the port opening instruction and the process starting instruction are executed, the file synchronization task indicates to synchronize a file from the synchronization source server to the receiving end server, the task manager is further used for indicating the receiving end server to close a communication port with the synchronization source server after the file synchronization task is executed, and indicating the receiving end server to close the backup receiving program, wherein the task manager is further used for indicating the receiving end server to close the communication port with the synchronization source server after the file synchronization task is executed, and indicating the receiving end server to close the backup receiving program comprises: under the condition that the task manager detects that the backup tool sequentially executes file synchronization tasks in a task list, respectively sending a synchronization result checking instruction to the receiving end server, wherein the synchronization result checking instruction is used for indicating whether the file synchronization tasks are executed successfully or not; after the synchronous source server receives response information returned by the receiving end server for each synchronous result checking instruction, a port closing instruction and a process closing instruction are sent to the receiving end server through the task manager, wherein the synchronous source server supports synchronous files to a plurality of receiving end servers at the same time, and one receiving end server supports synchronous files from a plurality of synchronous source servers at the same time;
The receiving end server is operated with a proxy module and the backup receiving program, the proxy module is used for starting a communication port between the receiving end server and the synchronous source server according to the instruction of the task manager and starting the backup receiving program, the backup receiving program is used for receiving files transmitted by the backup tool after starting, the proxy module is also used for closing the communication port between the receiving end server and the synchronous source server according to the instruction of the task manager and closing the backup receiving program, and the backup receiving program is used for receiving the files transmitted by the backup tool after starting and comprises the following steps: under the condition that the task manager detects that the backup tool sequentially executes file synchronization tasks in the task list, respectively sending a synchronization result checking instruction to the receiving end server, receiving the synchronization result checking instruction sent by the synchronization source server, and calculating a check code of the received synchronization file; acquiring a check code of a synchronous file in a current synchronous task recorded in a task list, and comparing the calculated check code with the check code recorded in the task list; storing the synchronous file to a path indicated by the current synchronous task and sending response information of the synchronous result checking instruction to the synchronous source server under the condition that the calculated check code is the same as the recorded check code; and after the synchronous source server receives response information returned by the receiving end server for each synchronous result checking instruction, the port closing instruction and the process closing instruction are sent to the receiving end server through a task manager.
CN202210910978.6A 2022-07-29 2022-07-29 File synchronization method and system Active CN115277679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210910978.6A CN115277679B (en) 2022-07-29 2022-07-29 File synchronization method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210910978.6A CN115277679B (en) 2022-07-29 2022-07-29 File synchronization method and system

Publications (2)

Publication Number Publication Date
CN115277679A CN115277679A (en) 2022-11-01
CN115277679B true CN115277679B (en) 2024-04-12

Family

ID=83747239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210910978.6A Active CN115277679B (en) 2022-07-29 2022-07-29 File synchronization method and system

Country Status (1)

Country Link
CN (1) CN115277679B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611758A (en) * 2012-03-30 2012-07-25 浪潮电子信息产业股份有限公司 Method for synchronizing clustered data by using load balancer
CN103645898A (en) * 2013-12-13 2014-03-19 浪潮电子信息产业股份有限公司 Automatic scripting tool
CN103713858A (en) * 2013-12-26 2014-04-09 乐视致新电子科技(天津)有限公司 Local log preservation method and device for electronic products
CN104468571A (en) * 2014-12-05 2015-03-25 上海斐讯数据通信技术有限公司 Configuration file backup and recovery method and system
CN104639536A (en) * 2015-01-05 2015-05-20 浪潮(北京)电子信息产业有限公司 Method and system for preventing network attack
CN105138915A (en) * 2015-08-07 2015-12-09 天脉聚源(北京)传媒科技有限公司 Process operation handling method and device
CN107196948A (en) * 2017-06-08 2017-09-22 上海中兴电力建设发展有限公司 Efficient application formula private security net transmission method and system based on energy internet
CN109144776A (en) * 2018-07-20 2019-01-04 新华三技术有限公司 Virtual machine image file processing method and processing device
CN110300105A (en) * 2019-06-24 2019-10-01 山东超越数控电子股份有限公司 A kind of remote cipher key management method of network cryptographic machine
CN111538637A (en) * 2020-04-27 2020-08-14 苏州浪潮智能科技有限公司 Method and system for automatically monitoring file synchronization result
CN111984465A (en) * 2020-07-28 2020-11-24 北京人大金仓信息技术股份有限公司 Database remote backup method, device, medium and electronic equipment
WO2021082675A1 (en) * 2019-10-31 2021-05-06 上海爱数信息技术股份有限公司 Database information backup method and recovery method, electronic device, and computer readable storage medium
CN112799786A (en) * 2021-02-02 2021-05-14 微民保险代理有限公司 Exit method, device, equipment and storage medium of micro-service instance
CN114048162A (en) * 2021-11-11 2022-02-15 四川泛华航空仪表电器有限公司 Xmodem protocol-based stream file transmission method
CN114244887A (en) * 2021-12-16 2022-03-25 中国联合网络通信集团有限公司 Channel management method and device and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AT512742A1 (en) * 2012-04-11 2013-10-15 Fts Computertechnik Gmbh Method and distribution unit for the reliable switching of synchronization messages
US11579985B2 (en) * 2019-05-31 2023-02-14 Acronis International Gmbh System and method of preventing malware reoccurrence when restoring a computing device using a backup image
EP4281875A4 (en) * 2021-01-25 2024-09-11 Computero Inc Data backup device

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611758A (en) * 2012-03-30 2012-07-25 浪潮电子信息产业股份有限公司 Method for synchronizing clustered data by using load balancer
CN103645898A (en) * 2013-12-13 2014-03-19 浪潮电子信息产业股份有限公司 Automatic scripting tool
CN103713858A (en) * 2013-12-26 2014-04-09 乐视致新电子科技(天津)有限公司 Local log preservation method and device for electronic products
CN104468571A (en) * 2014-12-05 2015-03-25 上海斐讯数据通信技术有限公司 Configuration file backup and recovery method and system
CN104639536A (en) * 2015-01-05 2015-05-20 浪潮(北京)电子信息产业有限公司 Method and system for preventing network attack
CN105138915A (en) * 2015-08-07 2015-12-09 天脉聚源(北京)传媒科技有限公司 Process operation handling method and device
CN107196948A (en) * 2017-06-08 2017-09-22 上海中兴电力建设发展有限公司 Efficient application formula private security net transmission method and system based on energy internet
CN109144776A (en) * 2018-07-20 2019-01-04 新华三技术有限公司 Virtual machine image file processing method and processing device
CN110300105A (en) * 2019-06-24 2019-10-01 山东超越数控电子股份有限公司 A kind of remote cipher key management method of network cryptographic machine
WO2021082675A1 (en) * 2019-10-31 2021-05-06 上海爱数信息技术股份有限公司 Database information backup method and recovery method, electronic device, and computer readable storage medium
CN111538637A (en) * 2020-04-27 2020-08-14 苏州浪潮智能科技有限公司 Method and system for automatically monitoring file synchronization result
CN111984465A (en) * 2020-07-28 2020-11-24 北京人大金仓信息技术股份有限公司 Database remote backup method, device, medium and electronic equipment
CN112799786A (en) * 2021-02-02 2021-05-14 微民保险代理有限公司 Exit method, device, equipment and storage medium of micro-service instance
CN114048162A (en) * 2021-11-11 2022-02-15 四川泛华航空仪表电器有限公司 Xmodem protocol-based stream file transmission method
CN114244887A (en) * 2021-12-16 2022-03-25 中国联合网络通信集团有限公司 Channel management method and device and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于TCP的跨网段文件传输;郑石平;冯学智;;计算机工程与设计;20070316(第05期);全文 *
基于Web的开放式架构下视频管理系统设计;金琳;严长虹;;现代电子技术(第17期);全文 *

Also Published As

Publication number Publication date
CN115277679A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
US10895996B2 (en) Data synchronization method, system, and apparatus using a work log for synchronizing data greater than a threshold value
US7694177B2 (en) Method and system for resynchronizing data between a primary and mirror data storage system
US8495019B2 (en) System and method for providing assured recovery and replication
JP4573310B2 (en) Method, system, and computer program for consistent updates across a storage subsystem
US9189348B2 (en) High availability database management system and database management method using same
US8856592B2 (en) Mechanism to provide assured recovery for distributed application
US8839031B2 (en) Data consistency between virtual machines
CN104335159A (en) Interval-controlled replication
JP2019526106A (en) Data processing method and device
CN105159795A (en) Data synchronization method, apparatus and system
CN110569085A (en) configuration file loading method and system
US20130282653A1 (en) Initializing replication in a virtual machine
US20120324279A1 (en) Method and Apparatus of Backing up Subversion Repository
WO2017014814A1 (en) Replicating memory volumes
CN112256477A (en) Virtualization fault-tolerant method and device
CN115277679B (en) File synchronization method and system
US20240054054A1 (en) Data Backup Method and System, and Related Device
CN111858143A (en) Method, apparatus, and computer-readable storage medium for managing storage system
US8977897B2 (en) Computer-readable recording medium, data management method, and storage device
CN115277681B (en) File synchronization method and device for avoiding conflict in synchronization process
CN112199329B (en) Double-machine operation and maintenance data archiving and cleaning method and device based on fort machine
KR102294048B1 (en) Method and system for replicating blockchain application service
CN111274311A (en) Data synchronization method and device for cross-machine-room database
CN110572442A (en) Method and system for configuring file path
CN110572277A (en) Machine management method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant