Method and device for synchronizing file
2011
The invention discloses a method and a device for synchronizing a file. The method comprises the following steps of: reading a configuration file to obtain configuration information; for each task, when the configured synchronization time of the task is up, starting the thread of the task, and performing file synchronization operation, wherein during the file synchronization operation, the file in a source path of a source end is copied into a target path of a destination end, backed up into a backup path and then deleted after the file is successfully backed up, and the thread is finished after the file synchronization operation succeeds; and when the file in the source path is copied into the target path, if a file of which the name is the same as that of the file exists in the target path, covering the file during copying. By the invention, the fault tolerance of file synchronization can be improved.
Keywords:
- Correction
- Source
- Cite
- Save
- Machine Reading By IdeaReader
0
References
0
Citations
NaN
KQI