CN115277679A - File synchronization method and system - Google Patents

File synchronization method and system Download PDF

Info

Publication number
CN115277679A
CN115277679A CN202210910978.6A CN202210910978A CN115277679A CN 115277679 A CN115277679 A CN 115277679A CN 202210910978 A CN202210910978 A CN 202210910978A CN 115277679 A CN115277679 A CN 115277679A
Authority
CN
China
Prior art keywords
synchronization
task
file
instruction
receiving end
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.)
Granted
Application number
CN202210910978.6A
Other languages
Chinese (zh)
Other versions
CN115277679B (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

Images

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 file synchronization system. 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 port opening instruction is used for indicating opening of a communication port between the receiving end server and the synchronous source server, and the process starting instruction is used for indicating starting of a backup receiving program; under the condition that instruction completion response information returned by a receiving end server is received, a task manager controls a backup tool to execute a file synchronization task in a task list; and after the backup tool finishes executing all 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. Through the application, the problems that in the related art, when files are synchronized 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 file synchronization method and system.
Background
The file synchronization is an important processing process in data processing, and in the related technology, the rsync backup tool can be used for realizing real-time file synchronization, and then a synchronization result is verified according to a verification tool of a file verification code.
On the one hand, however, the rsync tool does not have a security authentication function, and synchronization achieved through the rsync tool requires that a receiving end exposes a path and a port to the outside, so that certain potential safety hazards exist. On the other hand, the method can only verify that the file synchronization is successful or failed, the completion of the synchronization task cannot be guaranteed, and the synchronization task is bound to fail when the interference of uncontrollable factors such as network interruption and the like or scene demand factors such as simultaneous request initiation of multiple threads and the like occurs.
Other file synchronization methods also appear in the related art, specifically, file information contained in a folder to be synchronized is counted to obtain a first file list; synchronizing the files from the pre-synchronization storage address to the post-synchronization storage address through an 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 the file synchronization is finished.
However, although this method can ensure that the file under the synchronization folder is synchronized to the receiving end and check whether the synchronization result is normal, the synchronization process completely depends on the rsync tool itself, but the rsync tool itself does not provide the guarantee in terms of reliability and safety, and cannot ensure the reliability of the synchronization task. If the synchronization folder has many files or a large number of large files exist in the synchronization folder, the whole synchronization process takes a relatively long time, and the synchronization process may be interrupted or made wrong by many factors.
Aiming at the problems of poor stability and potential safety hazards in the synchronization process when files are synchronized through an rsync tool in the related art, an effective solution is not provided at present.
Disclosure of Invention
The application provides a file synchronization method and a file synchronization system, which are used for solving the problems of poor stability and potential safety hazards in the synchronization process when files are synchronized through an rsync tool in the related technology.
According to one aspect of the present application, a file synchronization method 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 opening of a communication port between the receiving end server and the synchronous source server, and the process starting instruction is used for indicating starting of the backup receiving program; under the condition that instruction completion response information returned by a receiving end server is received, a task manager controls a backup tool to execute a file synchronization task in a task list, wherein the instruction completion response information is used for indicating that a port opening instruction and a process starting instruction are all executed completely, and the file synchronization task indicates to synchronize a file from a synchronization source server to the receiving end server; after the backup tool finishes executing all 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 that a communication port is closed, and the process closing instruction is used for indicating that a backup receiving program is closed.
Optionally, after the backup tool completes all file synchronization tasks in the task list, sending a port shutdown instruction and a process shutdown instruction to the receiving end server through the task manager includes: under the condition that the task manager detects that the backup tools sequentially execute file synchronization tasks in the task list, the task manager respectively sends synchronization result checking instructions to a receiving end server, wherein the synchronization result checking instructions are used for indicating whether the file synchronization tasks are successfully executed or not; and after the synchronization source server receives response information returned by the receiving end server aiming at each synchronization result check 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 the control instruction is sent to the receiving end server through the task manager, under the condition that the response information is not received within the preset time, 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 refers to one of the following instructions: a port opening instruction, a process starting instruction and a synchronous result checking instruction.
Optionally, before the synchronization source server sends the port opening instruction and the process starting instruction to the sink server through the task manager, the method further includes: the method comprises the steps of receiving a file synchronization request sent by a target application program through a 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 synchronization source server is started, calculating a time difference value between a synchronization request timestamp of each file synchronization task and the current time according to a preset period, and judging whether the time difference value exceeds a time threshold value or not; determining that the file synchronization task fails under the condition that the time difference value exceeds the time threshold; in the case where the time difference value does not exceed the time threshold, the state of the file synchronization task is determined based on the execution information of the file synchronization task.
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; confirming that the file synchronization task is in a file synchronization state under the condition that the first mark indicates that the backup tool does not complete file synchronization; under the condition that the first mark indicates that the backup tool completes file synchronization, a second mark of a file synchronization task is obtained, wherein the second mark is used for indicating whether a synchronization source server sends a synchronization result checking instruction to a receiving end server; under the condition that the second mark indicates that a synchronization result checking instruction is sent, determining that the state of the file synchronization task is normal; and under the condition that the second mark indicates that the synchronization result check instruction is not sent, 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.
Optionally, the method further comprises: after the synchronization source server is started, judging whether a file synchronization task exists in the task list or not, and executing the steps that the synchronization source server sends a port opening instruction and a process starting instruction to the receiving end server, wherein the file synchronization task exists in the task list.
According to another aspect of the present application, another file synchronization method 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 synchronization source server through the proxy module, wherein the synchronization source server is provided with a backup tool for synchronizing files 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 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 completely executed; and receiving the 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 of detecting a port closing instruction and a process closing instruction sent by the synchronization source server.
Optionally, the receiving, by the backup receiving program, the synchronized file sent by the backup tool includes: receiving a synchronization result check instruction sent by a synchronization source server, and calculating a check code of a received synchronization file; acquiring a check code of a synchronous file in a current synchronous task recorded in a task list, and comparing the check code obtained by calculation with the check code recorded in the task list; and under the condition that the calculated check code is the same as the recorded check code, storing the synchronization file to a path indicated by the current synchronization task, and sending response information of a synchronization result checking instruction to the synchronization source server.
Optionally, after comparing the calculated check code with the check code recorded in the task list, the method further includes: and under the condition that the calculated check code is different from the recorded check code, deleting the received synchronous file.
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 receiving end server and a synchronous source server, wherein the synchronous source server runs a task manager and a backup tool, the backup tool is used for executing a file synchronization task, the task manager is used for indicating the receiving end server to start a communication port between the receiving end server and the synchronous source server 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 runs 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 indication of the task manager and starting the backup receiving program, the backup receiving program is used for receiving the file transmitted by the backup tool after the backup receiving program is started, 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 indication of the task manager and closing the backup receiving program.
According to another aspect of the present application, there is provided a file synchronization apparatus. The device includes: the system comprises a first sending unit, a receiving end server and a synchronization source server, wherein the first sending unit is used for sending a port opening instruction and a process starting instruction to the receiving end server through a task manager by using the synchronization source server, 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; 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 all executed completely, and the file synchronization task indicates to synchronize files from the synchronization source server to the receiving end server; and 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 finishes executing all the file synchronization tasks in the task list, 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.
According to another aspect of the present application, another file synchronization apparatus is provided. The device includes: the system comprises a first receiving unit, a first processing unit and a second receiving unit, wherein the first receiving unit is used for receiving a port opening instruction and a process starting instruction sent by a synchronization source server through an agent module by a receiving end server, the synchronization source server is provided with a backup tool and used for synchronizing files from the synchronization source server to the receiving end server, and the receiving end server is provided with a backup receiving program and used 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 all executed; and 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 a port closing instruction and a process closing instruction sent by the synchronization source server are detected.
According to another aspect of the embodiments 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 embodiments of the present invention, there is also provided an electronic device, including a processor and a memory; the memory has computer readable instructions stored therein, and the processor is configured to execute the computer readable instructions, wherein the computer readable instructions when executed perform a file synchronization method.
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 opening of a communication port between the receiving end server and the synchronous source server, and the process starting instruction is used for indicating starting of the backup receiving program; under the condition that instruction completion response information returned by the receiving end server is received, a task manager controls a backup tool to execute a file synchronization task in a task list, wherein the instruction completion response information is used for indicating that a port opening instruction and a process starting instruction are executed completely, and the file synchronization task indicates that a file is synchronized to the receiving end server from a synchronization source server; after the backup tool executes all 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 a communication port, and the process closing instruction is used for indicating closing of a backup receiving program. And then the effect of improving the file synchronization safety is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 is a schematic diagram of a file synchronization system provided in accordance with 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 flowchart of a file synchronization method according to an embodiment of the present application;
FIG. 4 is a flow chart of another file synchronization method provided according to 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 apparatus provided in accordance with an embodiment of the present application;
FIG. 8 is a schematic diagram of another file synchronization apparatus provided in an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Moreover, 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 device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
For convenience of description, some terms or expressions referred to in the embodiments of the present application are explained below:
rsync: and the data mirror backup tool under the linux system. Remote synchronization, support of local replication, or synchronization with other SSH, rsync hosts can be performed using the fast incremental backup tool Remote Sync.
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 runs with a task manager and a backup tool, 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 runs with an agent module and a backup receiving program, the agent module is used for starting a communication port between the receiving end server 102 and the synchronization source server 101 according to the indication of the task manager and starting the backup receiving program, the backup receiving program is used for receiving the file transmitted by the backup tool after the starting, and the agent module is also used for closing the communication port between the receiving end server 102 and the synchronization source server 101 according to the indication of the task manager and closing the backup receiving program.
It should be noted that, the number of the synchronization source server 101 and the receiving end server 102 is not limited, and the synchronization source server 101 and the receiving end server 102 may be in a one-to-many relationship, a many-to-one relationship, or a many-to-many relationship, that is, one synchronization source server 101 may synchronize files to multiple receiving end servers 102 at the same time, and one receiving end server 102 may also receive the synchronized files from multiple synchronization source servers 101 at the same time.
In one embodiment, an HTTPS secure authentication interaction channel is established between the synchronization source server 101 and the receiving end server 102, the synchronization source server 101 issues an instruction to the receiving end server 102 through the HTTPS channel, and the receiving end server 102 returns an instruction completion result to the synchronization source server 101 through the HTTPS channel. It should be noted that the communication channel of the present embodiment includes, but is not limited to, an HTTPS connection.
In an alternative embodiment, as shown in fig. 2, the synchronization source server 101 runs and maintains a synchronization task manager and a backup tool, where the synchronization task manager is a functional application module, resides and runs on the synchronization source server 101 in a system background process or system service manner, and opens a partial port to receive a file synchronization request sent by a target application program (an upper layer application system in fig. 2), and the backup tool may be an rsync tool, and executes a file synchronization task indicated by the synchronization request through the rsync tool.
The sink server 102 runs and maintains a sink program of an agent module (sync task sink agent) and a backup tool, and the sync task sink agent is a functional application module that provides a functional access to an operating system of the sink server 102 in response to a request from the HTTPS secure authentication channel. The backup receiving program can be a receiving program of the rsync tool, receives the file transmitted by the rsync tool and forwards the file to the designated path, so that the file synchronization task is completed.
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, the upper layer application may run on a server other than the synchronization source server 101 and the sink server 102, and the upper layer application may also run on the synchronization source server 101 or the sink server 102, where the request form is not specific, and may be an HTTP request or a request in other manners, depending on the design and implementation of the manner in which the synchronization task manager receives the request command.
In the process of executing the file synchronization task, the synchronization task manager maintains a synchronization task list, controls an agent module at a receiving end to complete synchronization preparation work and ending work by issuing a synchronization control command, assists in synchronous task monitoring to realize a retransmission mechanism of the synchronization work, and completes rapid synchronization of a large file by means of an rsync tool. The synchronization task list records the file related information currently being synchronized, the receiving end server 102IP, the source storage path of the file, the receiving end file storage path, and the synchronization initiation timestamp, where the file related information includes a file name, a file MD5, a file size, and the like.
The synchronous task receiving end agent also maintains a synchronous task list, receives a synchronous control command issued by a synchronous task manager, completes specific operation according to the command, and is responsible for managing the rsync tool receiving end process, so that the rsync tool receiving end process receives a synchronous file from the synchronous task manager, and feeds back the synchronous progress condition to the synchronous result check followed by the synchronous task manager, wherein the synchronous task list records the related information of the current synchronous file, the source storage path of the file, the receiving end file storage path, the IP address of the synchronous source server 101 and the like, and the related information of the file comprises the file name, the file MD5, the file size and the like.
It should be noted that, a plurality of IP addresses of the synchronization source server 101 may be recorded, corresponding to synchronization requests for the same file from different synchronization source servers 101. The file storage path can also record a plurality of paths, and the file storage paths correspond to the requirements of different synchronization tasks for synchronizing the same file to different paths. Under the condition, the synchronous files are transmitted between the servers once only by means of the rsync tool, after synchronization is completed, the synchronous files are firstly stored in the transfer path and then copied to different storage paths through the transfer path, namely the same files are synchronized once only, and the file synchronization reliability 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 agent can also process the receiving process of multiple sync files simultaneously. For the synchronous task manager, the criterion of the same synchronous task is that the file names, the file sizes, the files MD5, the IP addresses of the receiving-end servers 102, and the storage paths of the receiving-end files corresponding to the two tasks are the same. For the synchronous task receiving end agent, the same synchronous task has the same discrimination criteria of the file names, the file sizes, the file MD5, the IP addresses of the synchronization source server 101 and the storage paths of the received files corresponding to the two tasks. It should be noted that, the storage manner of the synchronization task list includes, but is not limited to, a file, but no matter which manner the synchronization task list is stored based on, the operations on the synchronization task list are mutually exclusive, that is, only one synchronization task can read or write at a time.
In addition, in the present embodiment, a file with a file size exceeding 100GB is referred to as a large file, and the file synchronization method in the present embodiment is proposed because there may be problems that it takes a long time to synchronize the file in HTTP or the like, and the synchronization process is easy to disconnect, but the present embodiment is also applicable to synchronization of files with other sizes.
According to the embodiment, before the file synchronization task is executed, the receiving end server 102 is opened to start the communication port between the receiving end server 102 and the synchronization source server 101, the process of the backup receiving program is started, after the file synchronization task is executed, the receiving end server 102 is closed to start the communication port between the receiving end server 102 and the synchronization source server 101, and the process of the backup receiving program is closed, so that the receiving end server 102 is not exposed to the outside and does not need a port when the synchronization task is not performed, unnecessary processes are not started, and the state that the receiving end server is easy to attack is not easy to be achieved, and therefore the safety of the receiving end server 102 is improved.
Example 2
According to an embodiment of the present application, there is provided a file synchronization method.
FIG. 3 is a flow chart of a file synchronization method according to an embodiment of the application. As shown in fig. 3, the method comprises the steps of:
step S301, a synchronization source server sends a port opening instruction and a process starting instruction to a receiving end server through a 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 opening of a communication port between the receiving end server and the synchronization source server, and the process starting instruction is used for indicating starting of the backup receiving program.
Specifically, the synchronization source server is a server for performing file synchronization, the synchronization task manager is a functional application module, and resides and runs on the synchronization source server in a system background process or system service manner, the backup tool may 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 of receiving a file synchronization request sent by a target application program, a synchronization task manager sends a port opening instruction and a process starting instruction to a receiving end server, the port opening instruction enables the receiving end server to open an rsync tool synchronization communication port in a firewall rule mode and the like, so that a synchronization source server can subsequently send a file to the receiving end server by means of the rsync tool, and the process starting instruction enables the receiving end server to run a receiving end program of the rsync to receive a synchronization file.
Step S302, under the condition that instruction completion response information returned by the receiving end server is received, the task manager controls the backup tool to execute a file synchronization task in the task list, wherein the instruction completion response information is used for indicating that the port opening instruction and the process starting instruction are all executed completely, and the file synchronization task indicates to synchronize the file from the synchronization source server to the receiving end server.
Specifically, after receiving a 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 the firewall rule is released, the receiving end server does not need to operate, and if the firewall rule is not released, a related rule release port is configured. After receiving the process starting instruction, the receiving end server checks whether the receiving end server starts the process of running the receiving end program of the rsync tool, if yes, operation is not needed, and if not, the receiving end server starts the process of the receiving end program of the rsync tool. And under the condition that the host port synchronously 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 an instruction completion response message to the synchronization source server, and the synchronization source server can start to execute the file synchronization task.
Step S303, after the backup tool finishes executing 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 tasks in the task list may include multiple file synchronization tasks, where the file synchronization task executed by the rsync tool refers to synchronizing files to the receiving end server, the process of synchronizing files may last for a period of time, and the specific time consumption is different depending on network factors and the size of the files themselves.
After the task manager learns that all file synchronization tasks in the task list are completely 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 as to ensure that the receiving end server does not expose an unnecessary port 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, starting the process as required is also in consideration of safety, the receiving end server is prevented from starting an unnecessary process as much as possible, and therefore the receiving end server is not easy to attack, and the safety of the receiving end server is improved.
According to the file synchronization method provided by the embodiment of the application, a synchronization source server sends a port opening instruction and a process starting instruction to a receiving end server through a task manager, wherein a backup tool is installed on the synchronization source server, a backup receiving program is installed on the receiving end server, the port opening instruction is used for indicating opening of a communication port between the receiving end server and the synchronization source server, and the process starting instruction is used for indicating starting of the backup receiving program; under the condition that instruction completion response information returned by a receiving end server is received, a task manager controls a backup tool to execute a file synchronization task in a task list, wherein the instruction completion response information is used for indicating that a port opening instruction and a process starting instruction are all executed completely, and the file synchronization task indicates to synchronize a file from a synchronization source server to the receiving end server; after the backup tool executes all 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 a communication port, and the process closing instruction is used for indicating closing of a backup receiving program. And further achieves the effect of improving the file synchronization safety.
The synchronization source server performs file synchronization according to a file synchronization request of the target application program, and optionally, before the synchronization source server sends a port opening instruction and a process start instruction to the receiving end server through the task manager, the method further includes: the method comprises the steps of receiving a file synchronization request sent by a target application program through a 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, a synchronization task list in the synchronization source server records file related information of a file synchronization request, a receiving end server IP, a source storage path of a 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 synchronization source server also sends information such as a file synchronization request to the receiving end server, the receiving end server also generates a synchronization task list according to the received information, and records the related information of the currently synchronized file, the source storage path of the file, the storage path of the file at the receiving end, the IP address of the synchronization source server and the like, wherein the related information of the file comprises the file name, the file MD5, the file size and the like. Whether the same task exists can be judged according to the synchronous task lists of the synchronous source server and the receiving end server, so that the conflict in the file synchronization process is prevented.
In order to ensure the integrity of the synchronization data after the synchronization task is completed, optionally, in the file synchronization method provided in the embodiment of the present application, after the backup tool completes all file synchronization tasks in the task list, sending a port shutdown instruction and a process shutdown instruction to the receiving end server through the task manager includes: under the condition that the task manager detects that the backup tools sequentially execute file synchronization tasks in the task list, the task manager respectively sends synchronization result checking instructions to a receiving end server, wherein the synchronization result checking instructions are used for indicating whether the file synchronization tasks are successfully executed or not; and after the synchronization source server receives response information returned by the receiving end server aiming at each synchronization result check 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 check instruction to the receiving end server, and the receiving end server calculates a received synchronization file MD5 value and compares the received synchronization file MD5 value with an MD5 value recorded in a synchronization task list. And under the condition that the MD5 values are the same, indicating that the files are successfully synchronized, copying the synchronized files to each specified path, returning response information of synchronization completion to the synchronization source server, and clearing records related to the synchronization task from the synchronization task list. And when the MD5 values are different, the file synchronization failure is represented, the receiving end node server deletes the synchronization file with the error synchronization, and returns the response information of the synchronization failure 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 the host port synchronously used by the rsync according to the relevant firewall rules, finds the 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 check instruction, and allows the receiving end server to check the integrity of the synchronization file, thereby avoiding the situation of file synchronization inconsistency caused by network fluctuation, data packet loss and other factors.
In order to solve the problem that instruction issue fails 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 the control instruction is sent to the receiving end server through the task manager, under the condition that the response information is not received within the preset time, 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 refers to one of the following instructions: a port opening instruction, a process starting instruction and a synchronous result checking instruction.
Specifically, the time for issuing the control command again may be equal intervals or unequal intervals, for example, when the first control command fails to be issued, the issue of the second same command may be delayed by a certain time, for example, 3s, if the response information is still not received, the issue of the third same command is delayed by a certain time again, for example, 5s, and if the response information is still not received, it is determined that the synchronous control command fails to be issued. For convenience of description, the issue of instructions mentioned hereinafter refers to such a mechanism. The embodiment issues the synchronous control command through an automatic retry mechanism, and solves the problem that the control command fails to be issued due to network fluctuation and other conditions.
Optionally, in the file synchronization method provided in the embodiment of the present application, the method further includes: after the synchronization source server is started, judging whether a file synchronization task exists in the task list or not, and executing the steps that the synchronization source server sends a port opening instruction and a process starting instruction to the receiving end server, wherein the file synchronization task exists in the task list.
Specifically, when the synchronization source server starts enlightenment, whether a task record exists in the synchronization task list is checked, if the task record exists, the synchronization process is restarted for each task one by one, and therefore the problem that files cannot be successfully synchronized under the condition that the synchronization task is interrupted due to abnormal reasons is solved.
Optionally, in the file synchronization method provided in the embodiment of the present application, the method further includes: after the synchronization source server is started, calculating a time difference value between a synchronization request timestamp of each file synchronization task and the current time according to a preset period, and judging whether the time difference value exceeds a time threshold value or not; determining that the file synchronization task fails under the condition that the time difference value exceeds the time threshold; in the case where the time difference value does not exceed the time threshold, the state of the file synchronization task is determined based on the execution information of the file synchronization task.
Specifically, in order to monitor the synchronization tasks, the synchronization task manager records execution state information for each synchronization task, determines the state of the file synchronization task according to the execution state information, and cleans the execution state information along with the cleaning of the synchronization task list, that is, cleans the execution state information after the receiving-end server returns a response of synchronization completion.
For example, the execution state information includes a synchronization request timestamp, where the synchronization request timestamp indicates a system time when the synchronization task manager receives a synchronization request of an upper layer service, and regularly determines whether a difference between the synchronization request timestamp of each task in the synchronization task list and the current system time exceeds a set threshold, if so, it indicates that the synchronization request corresponding to the file synchronization task is overtime, and 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; confirming that the file synchronization task is in a file synchronization state under the condition that the first mark indicates that the backup tool does not complete file synchronization; under the condition that the first mark indicates that the backup tool completes file synchronization, a second mark of a file synchronization task is obtained, wherein the second mark is used for indicating whether a synchronization source server sends a synchronization result checking instruction to a receiving end server; under the condition that the second mark indicates that a synchronization result checking instruction is sent, determining that the state of the file synchronization task is normal; and under the condition that the second mark indicates that the synchronization result check instruction is not sent, 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.
Specifically, the execution state information may further include a first flag and a second flag, where the first flag is a synchronization end flag of the synchronization source rsync, which indicates that the synchronization task manager has completed synchronizing the file to the target server through the rsync tool, and when the rsync command is finished, 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 successfully sent.
When a synchronization request corresponding to a file synchronization task is not overtime, regularly judging whether a synchronization source end rsync synchronization end mark of the task is marked as 'yes', indicating that the current task is still in a synchronization file state under the condition that the synchronization request is not marked as 'yes', finishing the monitoring of the synchronization task in the current round, judging whether a synchronization result check instruction mark of the task is marked as 'yes' under the condition that the synchronization source end rsync synchronization end mark of the task is marked as 'yes', indicating that the task state is normal under the condition that the synchronization task is marked as 'yes', indicating that the synchronization task is abnormal, restarting a synchronization process for the task, and resetting a synchronization source end rsync synchronization end mark and transmission synchronization result check instruction mark information of the task.
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 application. As shown in fig. 4, the method comprises the steps of:
step S401, the receiving end server receives a port opening instruction and a process starting instruction sent by the synchronization source server through the proxy module, wherein the synchronization source server is provided with a backup tool for synchronizing the 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 a file synchronization result, and the agent module is a functional application module for providing a functional entry to an operating system of the receiving end server in response to a request from the HTTPS secure authentication channel. The backup utility may be an rsync utility and the backup receiver may be a receiver program of the rsync utility.
Under the condition of receiving a file synchronization request sent by a target application program, a synchronization task manager sends a port opening instruction and a process starting instruction to a receiving end server, 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 run an rsync receiving end program.
Step S402, 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 all executed.
Specifically, after receiving a 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 the firewall rule is released, the receiving end server does not need to operate, and if the firewall rule is not released, a related rule release port is configured. After receiving the process starting instruction, the receiving end server checks whether the receiving end server starts the process of running the receiving end program of the rsync tool, if yes, operation is not needed, and if not, the receiving end server starts the process of the receiving end program of the rsync tool. And under the condition that the host port synchronously 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.
Step S403, receiving the synchronization file sent by the backup tool through the backup receiving program, 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, the receiving end server responds to the port closing instruction to close a host port synchronously used by the rsync tool so as to ensure that the receiving end server does not expose an unnecessary port 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, starting the process as required is also in consideration of safety, the receiving end server is prevented from starting unnecessary processes as much as possible, and therefore the receiving end server is not easily in a state easy to attack, and the safety of the receiving end server is improved.
According to the file synchronization method provided by the embodiment of the application, 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 files 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 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 completely executed; the method comprises the steps of receiving a synchronous file sent by a backup tool through a 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 a synchronization source server are detected, and solving the problems of poor stability and potential safety hazard in the synchronization process when file synchronization is carried out through an rsync tool in the related art. And further achieves the effect of improving the file synchronization safety.
Optionally, in the file synchronization method provided in the embodiment of the present application, receiving, by the backup receiving program, the synchronized file sent by the backup tool includes: receiving a synchronization result check instruction sent by a synchronization source server, and calculating a check code of a received synchronization file; acquiring a check code of a synchronous file in a current synchronous task recorded in a task list, and comparing the check code obtained by calculation with the check code recorded in the task list; and under the condition that the calculated check code is the same as the recorded check code, storing the synchronization file to a path indicated by the current synchronization task, and sending response information of a synchronization result checking instruction to the synchronization source server.
Specifically, the check code may be an MD5 value of the file, after the rsync tool completes a file synchronization task each time, the task manager sends a synchronization result check instruction to the receiving server, the receiving server calculates the received MD5 value of the synchronization file, compares the calculated value with the MD5 value recorded in the synchronization task list, indicates that the file is successfully synchronized if the MD5 values are the same, copies the synchronization file to each specified path, returns synchronization completion response information to the synchronization source server, and clears a 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 computed 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 received MD5 value of the synchronization file, compares the calculated MD5 value with the MD5 value recorded in the synchronization task list, indicates that the file synchronization fails when the MD5 values are different, and the receiving end node server deletes the synchronization file with the synchronization error and returns a response message of the synchronization failure to the synchronization source node server, so that the synchronization source node server obtains the file synchronization condition in time 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 different than here.
Example 4
According to an embodiment of the present application, there is also provided another file synchronization method.
Fig. 5 is a diagram illustrating file synchronization performed by one synchronization source server to one sink server, and fig. 6 is a diagram illustrating file synchronization performed by two synchronization source servers to one sink server. As shown in fig. 5 or fig. 6, the file synchronization method includes:
1. under the condition that the receiving end server is ready to work, response information of 'ready to work and capable of being synchronized' is returned to the synchronization source server;
2. a synchronous source server sends an open port instruction and an rsync receiving end process starting instruction to a receiving end server;
3. the receiving end server checks whether the firewall rules of the receiving end server pass the host port used by the rsync synchronously, if not, the receiving end server configures the relevant rule passing port, and if so, the receiving end server does not need to operate;
4. the receiving end server checks whether the receiving end server starts to run the rsync receiving end process, if the receiving end server is not started, the rsync receiving end process is started through the command of the rsync tool, and if the receiving end server is started, operation is not needed;
5. the receiving end server returns a response of 'instruction completion' to the synchronous source server;
6. the synchronization 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, specific consumed time is different due to network factors and the size of the file, and the synchronization source server can receive result feedback of the rsync tool and is successful or failed;
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 received MD5 value of the synchronous file, compares the value with the MD5 value recorded in the synchronous task list, if the value is different, the file synchronization is wrong, the receiving end server deletes the wrong synchronous file, the receiving end node server returns a response of 'synchronization failure' to the synchronization source node server, and the file synchronization process is restarted; if the files are the same, the files are successfully synchronized, and the synchronized files are copied to all the appointed paths;
9. the receiving end server removes the record 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 synchronization 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 synchronously used by the rsync, finds out a process of the rsync receiving end and closes the process; if yes, the receiving end server returns a synchronization end response to each synchronization source server, wherein the synchronization end response carries mark information related to the synchronization tasks to distinguish which task is synchronously ended;
13. the synchronization source server clears the record related to the synchronization task from the synchronization task list, and the synchronization task is ended;
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 is finished at this time.
According to the embodiment, on one hand, the synchronous task manager informs the target server to open the corresponding host port and run the related service program before starting the synchronous process, after the synchronous task is finished, the synchronous task receiving end agent judges whether other synchronous tasks are executed, and if not, the host port is actively closed and the related service program is stopped running. The host port of the synchronization target server does not need to be opened for a long time, and related service programs do not need to keep running for a long time, so that the safety of the receiving end server in the synchronization 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 synchronous task receiving end agent feeds back to the synchronous task manager after the file is checked to be wrong, and the synchronous task manager restarts the synchronous process, so that the accuracy of the synchronous process is ensured.
On the other hand, especially in a scene of large file synchronization which is long in time consumption and easy to fluctuate, the synchronization task can be automatically restarted until the file synchronization is correctly completed, special processing of upper-layer services is not needed, and meanwhile, reliability and safety guarantee are provided for scenes in which the file synchronization has to be achieved by means of an rsync tool.
Example 5
The embodiment of the present application further provides a file synchronization device, and it should be noted that the file synchronization device according to the embodiment of the present application may be used to execute the method for file synchronization provided in the embodiment of the present application. The following describes a file synchronization apparatus provided in an embodiment of the present application.
FIG. 7 is a schematic diagram of a file synchronization apparatus according to an embodiment of the present application. As shown in fig. 7, the apparatus includes: a first sending unit 701, a first execution unit 702 and a second sending unit 703.
Specifically, the first sending unit 701 is configured to send 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 provided with a backup tool, the receiving end server is provided with a backup receiving program, the port opening instruction is used to instruct opening of a communication port between the receiving end server and the synchronization source server, and the process starting instruction is used to instruct starting of the backup receiving program.
The first executing unit 702 is configured to, under a condition that instruction completion response information returned by the receiving-end server is received, control, by the task manager, the backup tool to execute a file synchronization task in the task list, where the instruction completion response information is used to indicate that both the port opening instruction and the process starting instruction are completely executed, and the file synchronization task indicates to synchronize a file from the synchronization source server to the receiving-end server.
A second sending unit 703 is configured to send, through the task manager, a port closing instruction and a process closing instruction to the receiving-end server after the backup tool completes all file synchronization tasks in the task list, where the port closing instruction is used to instruct to close the communication port, and the process closing instruction is used to instruct to close the backup receiving program.
The file synchronization device provided by the embodiment of the application is used for sending a port opening instruction and a process starting instruction to a receiving end server through a task manager by using a synchronization source server through a first sending unit 701, 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; a first executing unit 702, configured to, when receiving an instruction completion response message returned by the receiving-end server, control, by the task manager, the backup tool to execute a file synchronization task in the task list, where the instruction completion response message is used to indicate that both the port opening instruction and the process starting instruction are completed, and the file synchronization task indicates to synchronize a file from the synchronization source server to the receiving-end server; the second sending unit 703 is configured to send, through the task manager, a port closing instruction and a process closing instruction to the receiving-end server after the backup tool completes all 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 problems of poor stability and potential safety hazard in a synchronization process when file synchronization is performed through the rsync tool in the related art are solved, and an effect of improving file synchronization security is achieved.
Optionally, in the file synchronization apparatus provided in this embodiment of the present application, the second sending unit 703 includes: the first sending module is used for respectively sending a synchronization result checking instruction to the receiving end server under the condition that the task manager detects that the backup tools sequentially execute the file synchronization tasks in the task list, wherein the synchronization result checking instruction is used for indicating whether the file synchronization tasks are successfully executed or not; and the second sending module is used for sending the port closing instruction and the process closing instruction to the receiving end server through the task manager after the synchronization source server receives response information returned by the receiving end server aiming at each synchronization result check instruction.
Optionally, in the file synchronization apparatus provided in this embodiment of the present application, the apparatus further includes: the instruction issuing unit is used for issuing the control instruction again until the response information is received or the issuing frequency of the control instruction reaches the preset frequency after the control instruction is sent to the receiving end server through the task manager and the response information is not received within the preset time, wherein the control instruction refers to one of the following instructions: a port opening instruction, a process starting instruction and a synchronous result checking instruction.
Optionally, in the file synchronization apparatus provided in this embodiment of the present application, the apparatus 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 synchronization source server sends the port opening instruction and the 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 apparatus provided in this embodiment of the present application, the apparatus further includes: the computing unit is used for computing the time difference value between the synchronization request timestamp 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 value exceeds a time threshold value or not; the first determining unit is used for determining that the file synchronization task fails under the condition that the time difference value exceeds the time threshold; a second determining unit for determining the state of the file synchronization task based on the execution information of the file synchronization task in case the time difference value does not exceed the time threshold.
Optionally, in the file synchronization apparatus provided in the embodiment of the present application, the second determining unit includes: the system comprises a first acquisition module, a second acquisition module and a synchronization processing module, wherein the first acquisition module is used for acquiring a first mark of a file synchronization task, and the first mark is used for indicating whether a synchronization source server completes file synchronization through a backup tool or not; the first determining module is used for confirming that the file synchronization task is in a file synchronization state under the condition that the first mark indicates that the backup tool does not finish 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 check instruction to the receiving end server; 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 under the condition that the second mark indicates that the synchronization result checking instruction is not sent, re-executing the file synchronization task, and resetting the first mark and the second mark of the file synchronization task.
Optionally, in the file synchronization apparatus provided in this embodiment of the present application, the apparatus further includes: and the judging unit is used for judging whether a file synchronization task exists in the task list or not after the synchronization source server is started, and executing the steps of sending a port opening instruction and a process starting instruction to the receiving end server by the synchronization source server when the file synchronization task exists in the task list.
The file synchronization device comprises a processor and a memory, the first sending unit 701, the first executing unit 702, the second sending unit 703 and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problems of poor stability and potential safety hazards in the synchronization process when file synchronization is carried out through an RSYNC tool in the related technology are solved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
Example 6
The embodiment of the present application further provides a file synchronization device, and it should be noted that the file synchronization device according to the embodiment of the present application may be used to execute the method for file synchronization provided in the embodiment of the present application. The following describes a file synchronization apparatus provided in an embodiment of the present application.
FIG. 8 is a schematic diagram of a file synchronization apparatus according to an embodiment of the present application. As shown in fig. 8, the apparatus includes: a first receiving unit 801, a second performing unit 802 and a second receiving unit 803.
Specifically, the first receiving unit 801 is configured to receive, by the sink server, a port opening instruction and a process starting instruction sent by the synchronization source server through the proxy module, 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 sink server, and the sink 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 the 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 completely executed.
A second receiving unit 803, configured to receive, by the backup receiving program, the synchronization file sent by the backup tool, and, in a case that the port closing instruction and the process closing instruction sent by the synchronization source server are detected, close the communication port of the backup tool, and close the backup receiving program.
The file synchronization apparatus provided in this embodiment of the present application is configured, through the first receiving unit 801, for a receiving end server to receive, through a proxy module, a port opening instruction and a process starting instruction sent by a synchronization source server, where the synchronization source server is installed with a backup tool for synchronizing a file from the synchronization source server to the receiving end server, and the receiving end server is installed with a backup receiving program for receiving the file transmitted by the backup tool; a second execution unit 802, configured to open a communication port between a receiving end server and a synchronization source server based on a port opening instruction, start a backup receiving program based on a 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 completely executed; the second receiving unit 803 is configured to receive, through the backup receiving program, a 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, so that the problems of poor stability and potential safety hazard in a synchronization process when file synchronization is performed through the rsync tool in the related art are solved, and the effect of improving the file synchronization security is achieved.
Optionally, in the file synchronization apparatus provided in this embodiment of the present application, the second receiving unit 803 includes: the first receiving module is used for receiving a synchronization result checking instruction sent by the synchronization source server and calculating a check code of a received synchronization 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 check code obtained by calculation with the check code recorded in the task list; and the storage module is used for storing the synchronization file to the path indicated by the current synchronization task under the condition that the calculated check code is the same as the recorded check code, and sending response information of the synchronization result checking instruction to the synchronization source server.
Optionally, in the file synchronization apparatus provided in this embodiment of the present application, the apparatus 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 the calculated check code is compared with the check code recorded in the task list.
The file synchronization device comprises a processor and a memory, 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 comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problems of poor stability and potential safety hazards in the synchronization process when file synchronization is carried out through an RSYNC tool in the related technology are solved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The embodiment of the application also provides a computer storage medium, wherein the computer storage medium is used for storing the program, and the program controls the equipment where the computer storage medium is located to execute the 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 computer readable instructions stored therein, and the processor is configured to execute the computer readable instructions, wherein the computer readable instructions when executed perform a file synchronization method. The electronic device herein may be a server, a PC, a PAD, a mobile phone, etc.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The 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 computer storage media 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 Disks (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. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (11)

1. A method for synchronizing files, comprising:
a synchronization source server sends a port opening instruction and a process starting instruction to a receiving end server through a 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;
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 all executed completely, and the file synchronization task indicates to synchronize files from the synchronization source server to the receiving end server;
after the backup tool finishes executing all 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.
2. The method of claim 1, wherein sending, by the task manager, a port shutdown instruction and a process shutdown instruction to the sink server after the backup tool has performed all file synchronization tasks in the task list comprises:
under the condition that the task manager detects that the backup tool sequentially executes file synchronization tasks in the task list, the task manager respectively sends synchronization result checking instructions to the receiving end server, wherein the synchronization result checking instructions are used for indicating whether the file synchronization tasks are successfully executed or not;
and after the synchronization source server receives response information returned by the receiving end server aiming at each synchronization result check instruction, the port closing instruction and the process closing instruction are sent to the receiving end server through the task manager.
3. The method of claim 2, further comprising:
after sending a control instruction to the receiving end server through the task manager, under the condition that no response information is received within a preset time, re-issuing the control instruction until the response information is received, or until the issuing times of the control instruction reach a preset time, wherein the control instruction refers to one of the following instructions: the port opening instruction, the process starting instruction and the synchronous result checking instruction.
4. The method according to claim 1, wherein before the synchronization source server sends the port opening instruction and the process starting 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.
5. The method of claim 1, further comprising:
after the synchronization source server is started, calculating a time difference value between a synchronization request timestamp of each file synchronization 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 if the time difference exceeds the time threshold;
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.
6. The method of claim 5, 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 synchronized file state in the case that the first flag indicates that the backup tool does not complete file synchronization;
under the condition that the first mark indicates that the backup tool completes file synchronization, acquiring a second mark of the file synchronization task, 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 in the case that the second flag indicates that the synchronization result check instruction has been sent;
and under the condition that the second mark indicates that the synchronization result checking instruction is not sent, 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.
7. The method of claim 1, further comprising:
after the synchronization source server is started, judging whether a file synchronization task exists in the task list or not, and executing the steps that the synchronization source server sends a port opening instruction and a process starting instruction to a receiving end server, wherein the file synchronization task exists in the task list.
8. A method for synchronizing files, comprising:
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 files 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 files transmitted by the backup tool;
opening a communication port between the receiving end server and the synchronization 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 synchronization source server, wherein the instruction completion response information is used for indicating that the port opening instruction and the process starting instruction are completely executed;
and receiving the 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 synchronization source server are detected.
9. The method of claim 8, wherein receiving, by the backup receiver, the synchronized file sent by the backup appliance comprises:
receiving a synchronization result check instruction sent by the synchronization source server, and calculating a received check code of the 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 under the condition that the calculated check code is the same as the recorded check code, storing the synchronization file to a path indicated by the current synchronization task, and sending response information of the synchronization result checking instruction to the synchronization source server.
10. The method of claim 9, wherein after comparing the calculated check code with the check codes recorded in the task list, the method further comprises:
and under the condition that the calculated check code is different from the recorded check code, deleting the received synchronous file.
11. A file synchronization system, comprising:
the system comprises a synchronization source server, a task manager and a backup tool, wherein the backup tool is operated and used for executing a file synchronization task, the task manager is used for indicating a receiving end server to start a communication port between the receiving end server and the synchronization source server 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 synchronization 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 runs with an agent module and the backup receiving program, the agent module is used for starting a communication port between the receiving end server and the synchronization source server according to the indication of the task manager and starting the backup receiving program, the backup receiving program is used for receiving the file transmitted by the backup tool after the backup receiving program is started, and the agent module is also used for closing the communication port between the receiving end server and the synchronization source server according to the indication of the task manager and closing the backup receiving program.
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 true CN115277679A (en) 2022-11-01
CN115277679B 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 (18)

* 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
US20150063362A1 (en) * 2012-04-11 2015-03-05 Fts Computertechnik Gmbh Method and Switching Unit for the Reliable Switching of Synchronization of Messages
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
US20200379853A1 (en) * 2019-05-31 2020-12-03 Acronis International Gmbh System and method of preventing malware reoccurrence when restoring a computing device using a backup image
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
US20220237085A1 (en) * 2021-01-25 2022-07-28 Computero Inc. Data Backup Device

Patent Citations (18)

* 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
US20150063362A1 (en) * 2012-04-11 2015-03-05 Fts Computertechnik Gmbh Method and Switching Unit for the Reliable Switching of Synchronization of Messages
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
US20200379853A1 (en) * 2019-05-31 2020-12-03 Acronis International Gmbh System and method of preventing malware reoccurrence when restoring a computing device using a backup image
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
US20220237085A1 (en) * 2021-01-25 2022-07-28 Computero Inc. Data Backup Device
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的跨网段文件传输", 计算机工程与设计, no. 05, 16 March 2007 (2007-03-16) *
金琳;严长虹;: "基于Web的开放式架构下视频管理系统设计", 现代电子技术, no. 17 *

Also Published As

Publication number Publication date
CN115277679B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
EP3518110B1 (en) Designation of a standby node
US7793060B2 (en) System method and circuit for differential mirroring of data
US10895996B2 (en) Data synchronization method, system, and apparatus using a work log for synchronizing data greater than a threshold value
US20240193136A1 (en) Data migration method and apparatus
US20200233762A1 (en) Method and Apparatus for Redundancy in Active-Active Cluster System
US9582382B1 (en) Snapshot hardening
US7437598B2 (en) System, method and circuit for mirroring data
WO2016173179A1 (en) Method and device for switching primary database and secondary database
US8131681B1 (en) Backup disk-tape integration method and system
CN104335159A (en) Interval-controlled replication
TW201801495A (en) Data processing method and device
CN110569085A (en) configuration file loading method and system
CN112380062A (en) Method and system for rapidly recovering system for multiple times based on system backup point
US20070180308A1 (en) System, method and circuit for mirroring data
CN113204530B (en) Data writing method, device, equipment and medium of distributed file system
CN104615511A (en) Host batch recovery processing method and device based on double centers
CN112256477A (en) Virtualization fault-tolerant method and device
CN112153134A (en) Disaster tolerance drilling method, device, equipment and storage medium of disaster tolerance cloud host
US20240054054A1 (en) Data Backup Method and System, and Related Device
CN115277679B (en) File synchronization method and system
CN112783603A (en) Cluster shutdown control method and system and storage medium
CN116010174A (en) Method and device for switching servers, storage medium and electronic device
CN115277681B (en) File synchronization method and device for avoiding conflict in synchronization process
CN112199329A (en) Double-machine operation and maintenance data filing and cleaning method and equipment based on fortress machine
CN117555493B (en) Data processing method, system, device, storage medium and electronic equipment

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