File synchronization method and apparatus
A technology for synchronizing files and files, applied in electrical components, generation of response errors, error detection of redundant data in operations, etc. It can solve the problem of inconsistent data between server and client, time-consuming scanning of files, and inability to recover data. And other issues
Patent Information
- Authority / Receiving Office
- CN · China
- Current Assignee / Owner
- Publication Date
- 2017-04-19
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The invention relates to the field of computer application technology, in particular to a method and device for synchronizing files. Background technique
[0002] rsync (remote synchronize) is a data mirroring backup tool under unix-like systems. Compared with traditional backup methods, rsync has the advantages of high security, fast backup, and support for incremental backup. Rsync can solve the problem of low real-time requirements. Data backup requirements, such as regular backup of file server data to remote servers, regular data mirroring of local disks, etc.
[0003] As the scale of application systems continues to expand, more requirements are placed on data security and reliability, and rsync has gradually exposed many shortcomings in high-end business systems. First of all, when rsync synchronizes data, all files need to be scanned and compared for differential transmission. If the number of files reaches millions or tens of millions, it wi...
Examples
Embodiment Construction
[0034] The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention.
[0035] Before introducing the present invention, first introduce inotify. inotify is a powerful, fine-grained, asynchronous file system event monitoring mechanism. The linux kernel has added inotify support since 2.6.13. Through inotify, various details such as adding, deleting, modifying, and moving in the file system can be monitored. Event, using this kernel interface, third-party software can monitor various changes in files under the file system, and inotify-tools is such a third-party software.
[0036] Such as figure 1 Shown is a flowchart of a method for synchronizing files in an embodiment of the present invention, and the method may include the following ...