[go: up one dir, main page]

CN109165199A - A kind of file synchronisation method, device, equipment and computer readable storage medium - Google Patents

A kind of file synchronisation method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN109165199A
CN109165199A CN201810845121.4A CN201810845121A CN109165199A CN 109165199 A CN109165199 A CN 109165199A CN 201810845121 A CN201810845121 A CN 201810845121A CN 109165199 A CN109165199 A CN 109165199A
Authority
CN
China
Prior art keywords
file
server
sync server
synchronization
transfer channel
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.)
Pending
Application number
CN201810845121.4A
Other languages
Chinese (zh)
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.)
Wuba Co Ltd
Original Assignee
Wuba 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 Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN201810845121.4A priority Critical patent/CN109165199A/en
Publication of CN109165199A publication Critical patent/CN109165199A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a kind of file synchronisation method, device, equipment and computer readable storage mediums, and wherein file synchronisation method includes: to obtain the log-on message of specified sync server configuration using acquisition of information plug-in unit;The information transfer channel between sync server is established using log-on message according to the network protocol of setting;Using preset synchronization means, by information transfer channel by the update file synchronization in server to sync server.Utilize technical solution provided by the invention, addition configuration file is not needed when carrying out file synchronization, solve the problems, such as to configure when carrying out file synchronization using daemon mode in the prior art cumbersome, while technical solution of the present invention does not need that the information transfer channel that password can be established between server and sync server is manually entered.

Description

A kind of file synchronisation method, device, equipment and computer readable storage medium
Technical field
The present invention relates to data processing field, in particular to a kind of file synchronisation method, device, equipment and computer-readable Storage medium.
Background technique
The case where file synchronization is frequently encountered in development process, between server.Rsync is the next data of linux Duplication and synchronous tool, can be in synchrodata on the same stage or between more machines.Rsync makes this using itself highly effective algorithm File between ground and long-range two hosts reaches synchronous, this algorithm only transmits the different piece of two files, rather than every Secondary all whole part transmission, therefore speed is quite fast.For reduce bandwidth, rsync send and receive end to data using compression reconciliation Press algorithm.
In the prior art, file synchronization is carried out using the daemon mode under rsync, what is walked is the channel socket.Tool Body way are as follows: server-side (receiving end) starts daemon finger daemon, monitors in port 873, then client (transmitting terminal) is straight Chain link is connected to 873 ports, by authenticating, and then synchronous documents.Server-side and client require addition configuration file Rsyncd.conf defines the information such as synchronous user, synchronous directory path, cryptogam inside configuration file.Work as use When daemon mode under rsync carries out file synchronization, addition configuration file is required in transmitting terminal and receiving end, it is also necessary to tie up A cryptogam is protected, is configured comparatively laborious.
Summary of the invention
Cumbersome in order to solve the problems, such as to configure when carrying out file synchronization using daemon mode in the prior art, the present invention is real It applies example and provides a kind of file synchronisation method, device, equipment and computer readable storage medium.
One aspect according to an embodiment of the present invention provides a kind of file synchronisation method, is applied to server, the side Method includes:
Using acquisition of information plug-in unit, the log-on message of specified sync server configuration is obtained;
According to the network protocol of setting, using the log-on message, the information established between the sync server is passed Defeated channel;
Using preset synchronization means, by the information transfer channel by the update file synchronization in the server extremely The sync server.
Optionally, in the file synchronisation method described in the embodiment of the present invention, passing through the information transfer channel for institute After stating the update file synchronization to the sync server in server, further includes:
Obtain synchronized result of the update file in the sync server;
When the synchronized result be synchronize failed when, by the information transfer channel by the update file retransmission extremely The sync server.
Optionally, in the file synchronisation method described in the embodiment of the present invention, passing through the information transfer channel for institute It states after updating file retransmission to the sync server, further includes:
When retransmit it is failed when, record the sync server address and update file, and according to preset mode into Row feedback.
Optionally, in the file synchronisation method described in the embodiment of the present invention, passing through the information transfer channel for institute When stating update file synchronization to the sync server in server, further includes: by the update file in the synchronous clothes Synchronous directory in business device is sent to the sync server.
Optionally, in the file synchronisation method described in the embodiment of the present invention, the acquisition of information plug-in unit includes: sshpass;And/or the network protocol includes: ssh;And/or the synchronization means includes: rsync.
Other side according to an embodiment of the present invention provides a kind of file synchronizer, is applied to server, device Module is obtained including log-on message, information transfer channel establishes module and file synchronization module;
The log-on message obtains module, for utilizing acquisition of information plug-in unit, obtains stepping on for specified sync server configuration Record information;
The information transfer channel establishes module, is established for the network protocol according to setting using the log-on message With the information transfer channel between the sync server;
The file synchronization module, for utilizing preset synchronization means, by the information transfer channel by the clothes The update file synchronization being engaged in device is to the sync server.
Optionally, further include that synchronized result obtains module in the file synchronizer described in the embodiment of the present invention:
The synchronized result obtains module, for obtaining synchronous knot of the update file in the sync server Fruit;
The file synchronization module, for being transmitted by the information logical when the synchronized result is to synchronize failed Road is by the update file retransmission to the sync server.
Optionally, further include feedback module in the file synchronizer described in the embodiment of the present invention:
The feedback module, for when retransmitting failed, recording the address of the sync server and updating file, and It is fed back according to preset mode.
Optionally, in the file synchronizer described in the embodiment of the present invention, the file synchronization module is also used to institute It states synchronous directory of the update file in the sync server and is sent to the sync server.
Optionally, in the file synchronizer described in the embodiment of the present invention, the acquisition of information plug-in unit includes: sshpass;And/or the network protocol includes: ssh;And/or the synchronization means includes: rsync.
In terms of third according to an embodiment of the present invention, a kind of file synchronization equipment, the file synchronization equipment are provided Include: memory, processor and is stored in the computer program that can be run on the memory and on the processor, it is described The step of computer program realizes file synchronisation method as described above when being executed by the processor.
The 4th aspect according to an embodiment of the present invention, additionally provides a kind of computer readable storage medium, the calculating It is stored with computer program on machine readable storage medium storing program for executing, text as described above is realized when the computer program is executed by processor The step of part synchronous method.
The embodiment of the present invention has the beneficial effect that:
File synchronisation method, device, equipment and computer readable storage medium provided in an embodiment of the present invention, utilize information The log-on message that plug-in unit obtains specified sync server configuration is obtained, log-on message is passed to the network protocol of setting, is established With the information transfer channel between the sync server, and file synchronization is carried out in the information transfer channel of foundation, that is, exist It carries out not needing addition configuration file when file synchronization, solve in the prior art when using daemon mode progress file synchronization When configure cumbersome problem, while the embodiment of the present invention does not need password is manually entered can establish server and sync server Between information transfer channel.
Above description is only the general introduction of technical solution of the embodiment of the present invention, in order to better understand the embodiment of the present invention Technological means, and can be implemented in accordance with the contents of the specification, and in order to allow above and other mesh of the embodiment of the present invention , feature and advantage can be more clearly understood, the special specific embodiment for lifting the embodiment of the present invention below.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention The limitation of embodiment.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is the flow diagram of file synchronisation method in first embodiment of the invention;
Fig. 2 is the flow diagram of file synchronisation method in second embodiment of the invention;
Fig. 3 is the flow diagram of file synchronisation method in third embodiment of the invention;
Fig. 4 is the structural schematic diagram of file synchronizer in fourth embodiment of the invention;
Fig. 5 is the structural schematic diagram of file synchronizer in fifth embodiment of the invention;
Fig. 6 is the flow diagram of file synchronisation method in example of the embodiment of the present invention 1.
Specific embodiment
The exemplary embodiment that the present invention will be described in more detail below with reference to accompanying drawings.Although showing the present invention in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the present invention without should be by embodiments set forth here It is limited.It is to be able to thoroughly understand the present invention on the contrary, providing these embodiments, and can be by the scope of the present invention It is fully disclosed to those skilled in the art.It should be appreciated that specific embodiment described herein is only used to explain this hair It is bright, it is not used to uniquely limit the present invention.
First embodiment according to the present invention provides a kind of file synchronisation method, is applied to server.Fig. 1 is this hair The flow diagram of file synchronisation method in bright first embodiment, as shown in Figure 1, the file synchronization side of first embodiment of the invention Method, comprising the following steps:
S101: utilizing acquisition of information plug-in unit, obtains the log-on message of specified sync server configuration.
In embodiments of the present invention, sync server refers to receiving the server for updating file.Specified sync server Refer to the sync server for needing to carry out file synchronization determined according to the sync server list prestored in server.Such as Be server B according to the sync server for needing to carry out file synchronization that the sync server list prestored in server A determines, Server C and server D, then server B, server C and server D are specified sync server.
In the embodiment of the present invention, the log-on message includes login account and login password.In the specific implementation, synchronous Server needs to create configuration file account.conf, and the inside saves log-on message: login account<user>: login password< password>。
As a kind of specific embodiment, sshpass is can be used in acquisition of information plug-in unit.Wherein, sshpass is a automatic For the open source plug-in unit of ssh stopping code, ssh is a kind of network protocol, the encrypted login for intercomputer.
S102: the letter between the sync server is established using the log-on message according to the network protocol of setting Cease transmission channel.
Optionally, in the embodiment of the present invention, ssh is can be used in the network protocol.Specifically, the finger that sshpass will acquire The log-on message determined in sync server passes to ssh, establishes the transmission of the information between server and sync server by ssh Channel.
S103: utilizing preset synchronization means, by the information transfer channel by the update file in the server It is synchronized to the sync server.
Optionally, in the embodiment of the present invention, the synchronization means includes: rsync.Rsync passes through the diff algorithm of itself, Synchronous is to update part, can't be all copied over All Files, synchronizing speed is especially fast.
The file synchronisation method that first embodiment of the invention provides obtains specified sync server using acquisition of information plug-in unit Log-on message is passed to the network protocol of setting by the log-on message of configuration, establishes the information between the sync server Transmission channel, and file synchronization is carried out in the information transfer channel of foundation, i.e., addition is not needed when carrying out file synchronization matches File is set, solves the problems, such as to configure cumbersome, while this hair when carrying out file synchronization using daemon mode in the prior art Bright first embodiment does not need that the information transfer channel that password can be established between server and sync server is manually entered.
Second embodiment according to the present invention provides a kind of file synchronisation method, is applied to server.Fig. 2 is this hair The flow diagram of file synchronisation method in bright second embodiment, as shown in Fig. 2, the file synchronization side of second embodiment of the invention Method, comprising the following steps:
S201: utilizing acquisition of information plug-in unit, obtains the log-on message of specified sync server configuration.
S202: the letter between the sync server is established using the log-on message according to the network protocol of setting Cease transmission channel.
S203: utilizing preset synchronization means, by the information transfer channel by the update file in the server It is synchronized to the sync server.
S204: the synchronized result for updating file in the sync server is obtained, when the synchronized result is same When walking failed, by the information transfer channel by the update file retransmission to the sync server.
Described retransmit includes retransmitting and delaying at once re-transmission.Wherein, it retransmits at once and refers to that when synchronized result be to synchronize not When success, file retransmission will be updated at once to the sync server;Delay re-transmission refer to when synchronized result for it is synchronous not at When function, file retransmission will be updated again to the sync server after waiting preset time (such as 10 minutes).
Optionally, it in the embodiment of the present invention, when synchronized result is to synchronize failed, will be updated by information transfer channel File is retransmitted to the sync server at once;When synchronized result is to synchronize successfully, under being determined according to sync server list One sync server, establishes the information transfer channel between the server and next sync server, part of composing a piece of writing of going forward side by side It is synchronous.
Optionally, it in the embodiment of the present invention, when synchronized result is to synchronize failed, will be updated by information transfer channel File, which is delayed, is retransmitted to the sync server;When synchronized result is to synchronize successfully, under being determined according to sync server list One sync server, establishes the information transfer channel between the server and next sync server, part of composing a piece of writing of going forward side by side It is synchronous.
Optionally, it in the embodiment of the present invention, when synchronized result is to synchronize failed, will be updated by information transfer channel File is retransmitted to the sync server at once, true according to sync server list when retransmitting result at once is to synchronize successfully Fixed next sync server, establishes the information transfer channel between the server and next sync server, and carry out File synchronization;When retransmitting result at once is to synchronize failed, update file is delayed by information transfer channel and is retransmitted to institute Sync server is stated, when delaying re-transmission result is to synchronize successfully, next synchronous service is determined according to sync server list Device establishes the information transfer channel between the server and next sync server, and carries out file synchronization.
Optionally, in the embodiment of the present invention, by the information transfer channel by the update file retransmission to described After sync server, further includes: when retransmit it is failed when, record the sync server address and the update file, And fed back according to preset mode, so that relevant staff repairs or manually retransmits.Wherein, preset mode packet It includes but is not limited to mail.
In the file synchronisation method that second embodiment of the invention provides, can not only be obtained using acquisition of information plug-in unit specified same Log-on message is passed to the network protocol of setting by the log-on message for walking server configuration, is established between sync server Information transfer channel does not need that the information that password can be established between server and sync server is manually entered and transmits to lead to Road, and file synchronization is carried out in the information transfer channel of foundation, and when there is file update in server, it can will update text Part real-time synchronization to it is in need carry out file synchronization given server in, and based on the monitoring to synchronized result carry out weight It passes, it is ensured that file synchronization success.
Third embodiment according to the present invention provides a kind of file synchronisation method, is applied to server.Fig. 3 is this hair The flow diagram of file synchronisation method in bright 3rd embodiment, as shown in figure 3, the file synchronization side of third embodiment of the invention Method, comprising the following steps:
S301: utilizing acquisition of information plug-in unit, obtains the log-on message of specified sync server configuration.
S302: the letter between the sync server is established using the log-on message according to the network protocol of setting Cease transmission channel.
S303: utilizing preset synchronization means, by the information transfer channel by the update file in the server It is synchronized to the sync server, while synchronous directory of the update file in the sync server being sent to described Sync server.
That is, the preset synchronization means of server by utilizing (such as rsync), will update file, updates file same Synchronous directory in step server is sent to synchronous clothes by the information transfer channel between server and sync server simultaneously Business device.Exemplary, rsync passes through itself diff algorithm, and synchronous is to update part, can't All Files it is all copied It goes, synchronizing speed is especially fast.As executed: rsync-avz-e ssh-delete-exclude excFile srcPath user@ Dest_ip:rsync_dir/, wherein srcPath is transmitting terminal file directory (i.e. update file), and dest_ip is receiving end clothes Be engaged in device ip, and user is login account, and rsync_dir is (i.e. synchronization of the update file in sync server of file synchronization catalogue Catalogue), delete is indicated if transmitting terminal has deletion file, and receiving end will also delete, and exclude excFile indicates not same Past file or catalogue are walked, such as .git catalogue is filtered out.
The file synchronisation method that third embodiment of the invention provides can not only obtain specified synchronize using acquisition of information plug-in unit Log-on message, is passed to the network protocol of setting by the log-on message of server configuration, establishes the letter between sync server Transmission channel is ceased, that is, does not need that the information transfer channel that password can be established between server and sync server is manually entered, And file synchronization is carried out in the information transfer channel of foundation, and file can will be updated in information transfer channel in synchronization Synchronous directory in server is sent to the sync server, that is to say, that synchronous directory does not need in configuration file yet It is configured, is modified more flexible.
The fourth embodiment of the present invention provides a kind of file synchronizer, is applied to server.Fig. 4 is the present invention the The structural schematic diagram of file synchronizer in four embodiments, as described in Figure 4, the file synchronizer packet of fourth embodiment of the invention It includes log-on message and obtains module 40, information transfer channel and establish module 42 and file synchronization module 44, each module is carried out below Detailed description.
The log-on message obtains module 40, for utilizing acquisition of information plug-in unit, obtains specified sync server configuration Log-on message.
As a kind of specific embodiment, the acquisition of information plug-in unit includes sshpass.
The information transfer channel establishes module 42, is built for the network protocol according to setting using the log-on message Information transfer channel between the vertical and described sync server.
As a kind of specific embodiment, the network protocol includes ssh.
The file synchronization module 44 will be described by the information transfer channel for utilizing preset synchronization means Update file synchronization in server is to the sync server.
Optionally, the file synchronization module 44 is also used to: the update file is same in the sync server Step catalogue is sent to the sync server, and synchronization of the file in sync server can will be updated in information transfer channel Catalogue is sent to the sync server, that is to say, that synchronous directory does not need to be configured in configuration file, and modification is more Flexibly.
As a kind of specific embodiment, the synchronization means includes rsync.
Optionally, file synchronizer described in fourth embodiment of the invention further includes that synchronized result obtains module: described Synchronized result obtains module, for obtaining synchronized result of the update file in the sync server;The file is same Module is walked, for when the synchronized result is to synchronize failed, by the information transfer channel by the update file weight The sync server is reached, can be retransmitted based on the monitoring to synchronized result, it is ensured that file synchronization success.
The re-transmission includes retransmitting and delaying at once re-transmission, wherein retransmits refer to that when synchronized result be to synchronize not at once When success, file retransmission will be updated at once to the sync server;Delay re-transmission refer to when synchronized result for it is synchronous not at When function, file retransmission will be updated again to the sync server after waiting preset time (such as 10 minutes).
Optionally, file synchronizer described in fourth embodiment of the invention further includes feedback module: the feedback module, For when retransmitting failed, recording the address of the sync server and updating file, and carried out instead according to preset mode Feedback, so that relevant staff repairs or manually retransmits.
The file synchronizer that fourth embodiment of the invention provides obtains specified sync server using acquisition of information plug-in unit Log-on message is passed to the network protocol of setting by the log-on message of configuration, establishes the information between the sync server Transmission channel, and file synchronization is carried out in the information transfer channel of foundation, i.e., addition is not needed when carrying out file synchronization matches File is set, solves the problems, such as to configure cumbersome, while this hair when carrying out file synchronization using daemon mode in the prior art Bright fourth embodiment does not need that the information transfer channel that password can be established between server and sync server is manually entered.
Fifth embodiment of the invention provides a kind of file synchronization equipment.Fig. 5 is that file is same in fifth embodiment of the invention The structural schematic diagram of equipment is walked, as shown in figure 5, file synchronization equipment includes: memory 52, processor 54 and is stored in described deposit On reservoir 52 and the computer program that can be run on the processor 54, when the computer program is executed by the processor It realizes following steps: utilizing acquisition of information plug-in unit, obtain the log-on message of specified sync server configuration;According to the network of setting Agreement establishes the information transfer channel between the sync server using the log-on message;Utilize preset synchronous work Tool, by the information transfer channel by the update file synchronization in the server to the sync server.It is more specific Implementation as described in first embodiment to 3rd embodiment, details are not described herein.
Sixth embodiment of the invention additionally provides a kind of computer readable storage medium, and meter is stored on the storage medium Calculation machine program, the computer program realize following steps when being executed by processor: utilizing acquisition of information plug-in unit, obtain specified same Walk the log-on message of server configuration;It is established and the synchronous service according to the network protocol of setting using the log-on message Information transfer channel between device;It, will be in the server by the information transfer channel using preset synchronization means File synchronization is updated to the sync server.More specifical implementation as described in first embodiment to 3rd embodiment, Details are not described herein.Wherein, computer readable storage medium includes but is not limited to are as follows: ROM, RAM, disk or CD etc..
Illustrate the embodiment of the present invention in order to more detailed, provide example 1, Fig. 6 is file in example of the embodiment of the present invention 1 The flow diagram of synchronous method, as shown in fig. 6, example 1 the following steps are included:
1, account file account.conf is respectively created in sync server B, sync server C and sync server D, inner Face saves log-on message, such as<user>:<password>.
2, the sshpass in server A is respectively from sync server B, sync server C and sync server D Log-on message is read in account.conf file, the log-on message includes<user>:<password>.
3, the sshpass in server A transmits stepping on for sync server B, sync server C and sync server D respectively Information is recorded to ssh, so that ssh is attached.
If 4, certain server (such as server A) has file update, triggering file synchronization operation executes 5.
5, according to server list (sync server list i.e. above, such as ip list) successively to all sync servers (referring to sync server B, sync server C and sync server D in example 1) carries out file synchronization.It is taken to synchronous Device B be engaged in when carrying out file synchronization, executes order rsync, at this moment rsync directly walks the channel ssh (i.e. server A is assisted according to ssh The information of view, the server A and sync server B established using the log-on message of the sshpass sync server B obtained is transmitted Channel), the login password for not needing input sync server B executes file synchronization operation, and rsync is calculated by the diff of itself Method, synchronous is to update part, can't All Files be all copied over, synchronizing speed is especially fast.As executed: rsync-avz- E ssh-delete-exclude excFile srcPath user@dest_ip:rsync_dir/, wherein srcPath is hair Sending end file directory, dest_ip are that receiving end server ip, user are login account, and rsync_dir is file synchronization catalogue, Delete is indicated if transmitting terminal has deletion file, and receiving end will also delete, and exclude excFile expression is not synchronized over File or catalogue, such as .git catalogue is filtered out.
6, the synchronized result in sync server is monitored, obtain $? value, such as ret=$?, 0 is successfully returned, is unsuccessfully non-zero. If it is successful, continuing rsync is synchronized to other servers (i.e. sync server C and sync server device D), 5 are executed;Otherwise it holds Row is primary to be retransmitted (be known as re-synchronization in Fig. 6) at once.
7, it monitors and is retransmitted at once as a result, if it is successful, executing 5;Otherwise, it reattempts and once delays re-transmission (in Fig. 6 referred to as Delay synchronization), such as execute the synchronization to current receiving end again after ten minutes.
It is retransmitted successfully if 8, delayed, executes 5;Otherwise, server and file directory information are recorded, it is possible to only need again Sync section catalogue.
9, summarize synchronization failure information, send out mail notification related personnel, the same the end of the step of server itself, related personnel carries out Technical reparation executes the synchronizing information of failure one time again.
Example of the embodiment of the present invention 1 reads log-on message using sshpass tool from file, then log-on message is transmitted It is attached to ssh, then rsync tool carries out efficient file synchronization between server by ssh interface channel;While certain File on one server updates, and can all trigger it and be synchronized to other Servers-all operations.
In embodiment provided by the present invention, it should be understood that disclosed device and method, it can also be by other Mode realize.The apparatus embodiments described above are merely exemplary, for example, the flow chart and block diagram in attached drawing are shown Device, the architectural framework in the cards of method and computer program product, function of multiple embodiments according to the present invention And operation.In this regard, each box in flowchart or block diagram can represent one of a module, section or code Point, a part of the module, section or code includes one or more for implementing the specified logical function executable Instruction.It should also be noted that function marked in the box can also be attached to be different from some implementations as replacement The sequence marked in figure occurs.For example, two continuous boxes can actually be basically executed in parallel, they sometimes may be used To execute in the opposite order, this depends on the function involved.It is also noted that each of block diagram and or flow chart The combination of box in box and block diagram and or flow chart can be based on the defined function of execution or the dedicated of movement The system of hardware is realized, or can be realized using a combination of dedicated hardware and computer instructions.
In addition, each functional module in each embodiment of the present invention can integrate one independent portion of formation together Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
In short, the foregoing is merely illustrative of the preferred embodiments of the present invention, it is not intended to limit the scope of the present invention. All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should be included in of the invention Within protection scope.

Claims (12)

1. a kind of file synchronisation method, which is characterized in that be applied to server, which comprises
Using acquisition of information plug-in unit, the log-on message of specified sync server configuration is obtained;
According to the network protocol of setting, using the log-on message, the information transmission established between the sync server is logical Road;
Using preset synchronization means, by the information transfer channel by the update file synchronization in the server to described Sync server.
2. the method as described in claim 1, which is characterized in that will be in the server passing through the information transfer channel After update file synchronization to the sync server, further includes:
Obtain synchronized result of the update file in the sync server;
When the synchronized result is to synchronize failed, by the information transfer channel by the update file retransmission to described Sync server.
3. method according to claim 2, which is characterized in that passing through the information transfer channel for the update file weight After reaching the sync server, further includes:
When retransmitting failed, records the address of the sync server and update file, and carried out instead according to preset mode Feedback.
4. the method as described in claim 1, which is characterized in that will be in the server passing through the information transfer channel When updating file synchronization to the sync server, further includes: by synchronization of the update file in the sync server Catalogue is sent to the sync server.
5. such as the described in any item methods of Claims 1 to 4, which is characterized in that
The acquisition of information plug-in unit includes: sshpass;
And/or the network protocol includes: ssh;
And/or the synchronization means includes: rsync.
6. a kind of file synchronizer, which is characterized in that be applied to server, device includes that log-on message obtains module, information Transmission channel establishes module and file synchronization module;
The log-on message obtains module, for utilizing acquisition of information plug-in unit, obtains the login letter of specified sync server configuration Breath;
The information transfer channel establishes module, for the network protocol according to setting, using the log-on message, foundation and institute State the information transfer channel between sync server;
The file synchronization module, for utilizing preset synchronization means, by the information transfer channel by the server In update file synchronization to the sync server.
7. device as claimed in claim 6, which is characterized in that further include that synchronized result obtains module:
The synchronized result obtains module, for obtaining synchronized result of the update file in the sync server;
The file synchronization module, for being incited somebody to action by the information transfer channel when the synchronized result is to synchronize failed The update file retransmission is to the sync server.
8. device as claimed in claim 7, which is characterized in that further include feedback module:
The feedback module, for when retransmitting failed, recording the address of the sync server and updating file, and according to Preset mode is fed back.
9. device as claimed in claim 6, which is characterized in that the file synchronization module is also used to: by the update file Synchronous directory in the sync server is sent to the sync server.
10. device as claimed in claim 6, which is characterized in that
The acquisition of information plug-in unit includes: sshpass;
And/or the network protocol includes: ssh;
And/or the synchronization means includes: rsync.
11. a kind of file synchronization equipment, which is characterized in that the file synchronization equipment includes: memory, processor and is stored in On the memory and the computer program that can run on the processor, the computer program are executed by the processor The step of Shi Shixian file synchronisation method as claimed in any one of claims 1 to 5.
12. a kind of computer readable storage medium, which is characterized in that computer program is stored on the storage medium, it is described It is realized when computer program is executed by processor as described in any one of Claims 1 to 5 the step of file synchronisation method.
CN201810845121.4A 2018-07-27 2018-07-27 A kind of file synchronisation method, device, equipment and computer readable storage medium Pending CN109165199A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810845121.4A CN109165199A (en) 2018-07-27 2018-07-27 A kind of file synchronisation method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810845121.4A CN109165199A (en) 2018-07-27 2018-07-27 A kind of file synchronisation method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109165199A true CN109165199A (en) 2019-01-08

Family

ID=64898485

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810845121.4A Pending CN109165199A (en) 2018-07-27 2018-07-27 A kind of file synchronisation method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109165199A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109831340A (en) * 2019-03-15 2019-05-31 深圳前海微众银行股份有限公司 Server exchange method, equipment, server, client and readable storage medium storing program for executing
CN112711571A (en) * 2019-10-25 2021-04-27 京东方科技集团股份有限公司 File synchronization method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020991A (en) * 2016-05-13 2016-10-12 北京思特奇信息技术股份有限公司 Application synchronization and release method and system based on cloud environment
CN106569919A (en) * 2016-11-07 2017-04-19 天脉聚源(北京)传媒科技有限公司 File synchronization method and apparatus
CN107870839A (en) * 2017-11-23 2018-04-03 郑州云海信息技术有限公司 A storage device testing method, system, and computer-readable storage medium
CN107992354A (en) * 2017-11-14 2018-05-04 网易无尾熊(杭州)科技有限公司 For reducing the method and device of memory load

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106020991A (en) * 2016-05-13 2016-10-12 北京思特奇信息技术股份有限公司 Application synchronization and release method and system based on cloud environment
CN106569919A (en) * 2016-11-07 2017-04-19 天脉聚源(北京)传媒科技有限公司 File synchronization method and apparatus
CN107992354A (en) * 2017-11-14 2018-05-04 网易无尾熊(杭州)科技有限公司 For reducing the method and device of memory load
CN107870839A (en) * 2017-11-23 2018-04-03 郑州云海信息技术有限公司 A storage device testing method, system, and computer-readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
木易森林: ""ssh登录时在参数中加入密码的解决方案"", 《博客园》 *
米扑博客: ""ssh + sshpass 自动输入密码登录服务器"", 《HTTPS://BLOG.MIMVP.COM/ARTICLE/10072.HTML》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109831340A (en) * 2019-03-15 2019-05-31 深圳前海微众银行股份有限公司 Server exchange method, equipment, server, client and readable storage medium storing program for executing
CN112711571A (en) * 2019-10-25 2021-04-27 京东方科技集团股份有限公司 File synchronization method and device

Similar Documents

Publication Publication Date Title
CN108769173B (en) Block chain implementation method and equipment for running intelligent contracts
CN103297424B (en) Data processing method and system
CN101714916B (en) Method, equipment and system for backing up
US20100011435A1 (en) Method and System for Providing Guaranteed File Transfer in Corporate Environment Behind Firewall
US20160212207A1 (en) Method for cloud data backup and recovery
JP4860070B2 (en) File transmission method and file transmission system
CN108881158A (en) Data interaction system and method
CN103354560B (en) Method and system for data decomposition and synchronization
CN104539690A (en) A method for server remote data synchronization based on feedback mechanism and MD5 code detection
CN105791307B (en) Network Time Protocol message safety certifying method and device
CN113206865B (en) Remote packet capturing method and cloud management system
CN101771548A (en) File synchronizing method and system
CN115174081A (en) Key synchronization method and system for VSM cold migration
CN113111043A (en) Method, device and system for processing source data file of middle station and storage medium
CN109165199A (en) A kind of file synchronisation method, device, equipment and computer readable storage medium
CN112507019A (en) PBFT consensus system and method based on intelligent contracts
CN103763380B (en) A method and system for synchronizing presentation data
WO2013083013A1 (en) Synchronization method among network devices, network device and system
CN115599865A (en) Data synchronization method based on distributed deployment architecture and server
CN104954101A (en) Multi-terminal data synchronization method based on ACK synchronization
CN105721395B (en) Data synchronous configuration method, equipment and system
CN109086335A (en) A method of make MFS distributed file system that there is high availability
CN100411358C (en) Method and device for backing up and restoring management data in equipment management
KR101108028B1 (en) Collaboration method using multiple sessions and system
CN114157435B (en) Document processing method and device based on blockchain technology and client

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190108