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

CN106569919AInactive Publication Date: 2017-04-19TVMINING BEIJING MEDIA TECH
4 Cites 7 Cited by

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 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a file synchronization method and apparatus to achieve file synchronization in real time among servers. The method comprises steps of installing a data mirror image backup tool (rsync) on a content server, building a first authenticated file and configuring a configuration file having relative parameters of the rsync, installing the rsync and a monitoring tool (inotify) on a publishing server, building a second authenticated file and a file synchronization script, operating the file synchronization script on the publishing server to monitor a file-contained designated catalogue on the publishing server via the inotify, and calling the rsync to synchronize files having changes in the designated catalogue to the content server when changes of files in the designated catalogue are monitored.
Need to check novelty before this filing date? Find Prior Art

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 ...