CN110888758A - File control method, file recovery method, file control device, file recovery device and storage medium - Google Patents

File control method, file recovery method, file control device, file recovery device and storage medium Download PDF

Info

Publication number
CN110888758A
CN110888758A CN201911120893.2A CN201911120893A CN110888758A CN 110888758 A CN110888758 A CN 110888758A CN 201911120893 A CN201911120893 A CN 201911120893A CN 110888758 A CN110888758 A CN 110888758A
Authority
CN
China
Prior art keywords
file
files
disk
time point
version information
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
CN201911120893.2A
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.)
Tianjin Lenovo Collaboration Technology Inc
Original Assignee
Tianjin Lenovo Collaboration Technology Inc
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 Tianjin Lenovo Collaboration Technology Inc filed Critical Tianjin Lenovo Collaboration Technology Inc
Priority to CN201911120893.2A priority Critical patent/CN110888758A/en
Publication of CN110888758A publication Critical patent/CN110888758A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/273Asynchronous replication or reconciliation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a file control method, a file recovery method, a device and a computer readable storage medium, firstly receiving a file backup instruction; then responding to the file backup instruction, acquiring a file list and corresponding version information of all files of the current full disk, and recording the current time point; and finally, saving the obtained file list and the corresponding version information of all the files of the current full disk by taking the current time point as an index mirror image. Therefore, the invention ensures that the cloud end of the network disk is similar to a windows system by using the mode of saving the file list and the corresponding version information of all the files of the current full disk by taking the time point as the index mirror image, and can realize the direct storage and the file recovery of the file mirror image at the network disk level.

Description

File control method, file recovery method, file control device, file recovery device and storage medium
Technical Field
The present invention relates to the field of network disk storage technologies, and in particular, to a file control method, a file recovery device, and a computer-readable storage medium.
Background
The cloud disk is a professional internet storage tool, is a product of internet cloud technology, provides services such as information storage, reading and downloading for enterprises and individuals through the internet, has the characteristics of safety, stability and mass storage, and is widely applied. However, the current network disk cloud cannot be similar to a windows system, and can directly perform file image storage or file recovery at a system level (i.e., a network disk level).
Disclosure of Invention
In order to solve the potential problems existing in the cloud of the network disk, the embodiments of the present invention creatively provide a file control method, a file recovery device, and a computer-readable storage medium.
According to a first aspect of the present invention, there is provided a file control method, which is applied to a cloud of a network disk, and includes: receiving a file backup instruction; responding to the file backup instruction, acquiring a file list and corresponding version information of all files of the current full disk, and recording the current time point; and saving the file list and the corresponding version information of all the acquired files of the current full disk by taking the current time point as an index mirror image.
According to an embodiment of the invention, the method further comprises: traversing directories and files of the whole disk to obtain a whole disk file list; correspondingly, obtaining the file list and the corresponding version information of all the files of the current full disk comprises the following steps: and acquiring a file list and corresponding version information of all files of the current full disk according to the full disk file list.
According to an embodiment of the invention, the method further comprises: receiving a file recovery instruction, wherein the file recovery instruction carries a time point needing to be recovered; responding to the file recovery instruction, and acquiring a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered; and restoring the network disk according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing to be restored.
According to an embodiment of the present invention, performing a network disk recovery according to the file list and the corresponding version information of all files of the full disk corresponding to the acquired time point needing recovery includes: comparing the file list and corresponding version information of all the files of the full disk corresponding to the acquired time point needing to be restored with the file list and corresponding version information of all the files of the current full disk to obtain a file comparison result; if the file comparison result shows that the two files have the same file but the version information corresponding to the file is different, restoring the same file in the network disk into the version of the version information corresponding to the time point needing to be restored; if the file comparison result is that the deleted files in the file list of all the current full disk files exist in the file list of all the full disk files corresponding to the time point needing to be restored, restoring the deleted files in the network disk and restoring the deleted files to the version of the version information corresponding to the time point needing to be restored; and if the file comparison result is that the newly added files which do not exist in the file list of all the files of the full disk corresponding to the time point needing to be restored exist in the file list of all the files of the full disk at present, deleting the newly added files in the network disk.
According to a second aspect of the present invention, there is further provided a file recovery method applied to a cloud of a network disk, the method including: receiving a file recovery instruction, wherein the file recovery instruction carries a time point needing to be recovered; responding to the file recovery instruction, and acquiring a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered; and restoring the network disk according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing to be restored.
According to an embodiment of the present invention, performing a network disk recovery according to the file list and the corresponding version information of all files of the full disk corresponding to the acquired time point needing recovery includes: comparing the file list and corresponding version information of all the files of the full disk corresponding to the acquired time point needing to be restored with the file list and corresponding version information of all the files of the current full disk to obtain a file comparison result; if the file comparison result shows that the two files have the same file but the version information corresponding to the file is different, restoring the same file in the network disk into the version of the version information corresponding to the time point needing to be restored; if the file comparison result is that the deleted files in the file list of all the current full disk files exist in the file list of all the full disk files corresponding to the time point needing to be restored, restoring the deleted files in the network disk and restoring the deleted files to the version of the version information corresponding to the time point needing to be restored; and if the file comparison result is that the newly added files which do not exist in the file list of all the files of the full disk corresponding to the time point needing to be restored exist in the file list of all the files of the full disk at present, deleting the newly added files in the network disk.
According to a third aspect of the present invention, there is provided a file control apparatus applied to a cloud of a network disk, the apparatus including: the receiving module is used for receiving a file backup instruction; the acquisition module is used for responding to the file backup instruction, acquiring a file list and corresponding version information of all files of the current full disk, and recording the current time point; and the mirror image storage module is used for storing the acquired file list and the corresponding version information of all the files of the current full disk by taking the current time point as an index mirror image.
According to an embodiment of the present invention, the obtaining module is further configured to traverse directories and files of the full disk to obtain a full disk file list; correspondingly, the obtaining module is specifically configured to obtain a file list and corresponding version information of all files of the current full disk according to the full disk file list.
According to an embodiment of the invention, the apparatus further comprises: the receiving module is further configured to receive a file recovery instruction, where the file recovery instruction carries a time point to be recovered; the acquisition module is further used for responding to the file recovery instruction, and acquiring a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered; and the network disk recovery module is used for recovering the network disk according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing to be recovered.
According to an embodiment of the present invention, the network disk recovery module is specifically configured to compare the file list and the corresponding version information of all the files of the full disk corresponding to the acquired time point that needs to be recovered with the file list and the corresponding version information of all the files of the current full disk to obtain a file comparison result; if the file comparison result shows that the two files have the same file but the version information corresponding to the file is different, restoring the same file in the network disk into the version of the version information corresponding to the time point needing to be restored; if the file comparison result is that the deleted files in the file list of all the current full disk files exist in the file list of all the full disk files corresponding to the time point needing to be restored, restoring the deleted files in the network disk and restoring the deleted files to the version of the version information corresponding to the time point needing to be restored; and if the file comparison result is that the newly added files which do not exist in the file list of all the files of the full disk corresponding to the time point needing to be restored exist in the file list of all the files of the full disk at present, deleting the newly added files in the network disk.
According to a fourth aspect of the present invention, there is provided a file recovery apparatus applied to a cloud of a network disk, the apparatus including: the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a file recovery instruction, and the file recovery instruction carries a time point needing to be recovered; the acquisition module is used for responding to the file recovery instruction and acquiring a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered; and the network disk recovery module is used for recovering the network disk according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing to be recovered.
According to an embodiment of the present invention, the network disk recovery module is specifically configured to compare the file list and the corresponding version information of all the files of the full disk corresponding to the acquired time point that needs to be recovered with the file list and the corresponding version information of all the files of the current full disk to obtain a file comparison result; if the file comparison result shows that the two files have the same file but the version information corresponding to the file is different, restoring the same file in the network disk into the version of the version information corresponding to the time point needing to be restored; if the file comparison result is that the deleted files in the file list of all the current full disk files exist in the file list of all the full disk files corresponding to the time point needing to be restored, restoring the deleted files in the network disk and restoring the deleted files to the version of the version information corresponding to the time point needing to be restored; and if the file comparison result is that the newly added files which do not exist in the file list of all the files of the full disk corresponding to the time point needing to be restored exist in the file list of all the files of the full disk at present, deleting the newly added files in the network disk.
According to a fifth aspect of the present invention, there is also provided a computer-readable storage medium comprising a set of computer-executable instructions which, when executed, are operable to perform any of the file control methods described above.
According to a sixth aspect of the present invention, there is also provided a computer-readable storage medium comprising a set of computer-executable instructions which, when executed, are operable to perform any of the file recovery methods described above.
The embodiment of the invention provides a file control method, a file recovery device and a computer readable storage medium, and the method comprises the steps of firstly receiving a file backup instruction; then responding to the file backup instruction, acquiring a file list and corresponding version information of all files of the current full disk, and recording the current time point; and finally, saving the obtained file list and the corresponding version information of all the files of the current full disk by taking the current time point as an index mirror image. Therefore, the invention ensures that the cloud end of the network disk is similar to a windows system by using the mode of saving the file list and the corresponding version information of all the files of the current full disk by taking the time point as the index mirror image, and can realize the direct storage and the file recovery of the file mirror image at the network disk level.
It is to be understood that the teachings of the present invention need not achieve all of the above-described benefits, but rather that specific embodiments may achieve specific technical results, and that other embodiments of the present invention may achieve benefits not mentioned above.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
FIG. 1 is a first schematic diagram illustrating a first implementation flow of a file control method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a second implementation flow of the file control method according to the embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating an implementation flow of a file control method according to an embodiment of the present invention;
FIG. 4 shows a third implementation flow diagram of the file control method according to the embodiment of the present invention;
FIG. 5 shows a fourth implementation flow diagram of the file control method according to the embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating an implementation flow of a file recovery process in an application instance file control method according to the present invention
FIG. 7 is a first flowchart illustrating an implementation of a file recovery method according to an embodiment of the present invention;
FIG. 8 is a flowchart illustrating a second implementation of the file recovery method according to an embodiment of the present invention;
FIG. 9 is a schematic diagram showing the component structure of a file control device according to an embodiment of the present invention;
fig. 10 is a schematic diagram showing a component structure of a file recovery apparatus according to an embodiment of the present invention.
Detailed Description
The principles and spirit of the present invention will be described with reference to a number of exemplary embodiments. It is understood that these embodiments are given only to enable those skilled in the art to better understand and to implement the present invention, and do not limit the scope of the present invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The technical solution of the present invention is further elaborated below with reference to the drawings and the specific embodiments.
Fig. 1 shows a first implementation flow diagram of a file control method according to an embodiment of the present invention. Referring to fig. 1, a file control method according to an embodiment of the present invention is applied to a cloud of a network disk, and includes: operation 101, receiving a file backup instruction; operation 102, in response to the file backup instruction, obtaining a file list and corresponding version information of all files of the current full disk, and recording a current time point; and operation 103, saving the obtained file list and corresponding version information of all the files of the current full disk by taking the current time point as an index mirror image.
In operations 101 to 102, after receiving a file backup instruction sent by a user or a user terminal, the cloud of the network disk directly obtains file lists and corresponding version information of all files of the whole disk, and records a current time point.
Further, in operation 103, the file list and the corresponding version information of all the files of the current full disk are saved with the current time point as the index image.
For example, the current time point 2019/09/01 is obtained: 13: 00 full disk all files list of files, e.g., file a, file B, file C, and file D, totals four files, and at the current point in time 2019/09/01: 13: 00 the version information corresponding to the file A is A2, the version information corresponding to the file B is B1, the version information corresponding to the file C is C1, and D is divided without version information, then the file A is divided into 2019/09/01: 13: 00 stores A2, B1, C1, D for index mirror.
The file control method of the embodiment of the invention comprises the steps of firstly receiving a file backup instruction; then responding to the file backup instruction, acquiring a file list and corresponding version information of all files of the current full disk, and recording the current time point; and finally, saving the obtained file list and the corresponding version information of all the files of the current full disk by taking the current time point as an index mirror image. Therefore, the invention ensures that the cloud end of the network disk is similar to a windows system by using the mode of saving the file list and the corresponding version information of all the files of the current full disk by taking the time point as the index mirror image, and can realize the direct network disk-level file mirror image storage.
FIG. 2 is a schematic diagram illustrating a second implementation flow of the file control method according to the embodiment of the present invention; fig. 3 is a schematic diagram illustrating an implementation flow of an application instance file control method according to the present invention.
Referring to fig. 2, a file control method according to an embodiment of the present invention includes: operation 201, traversing directories and files of the full disk to obtain a full disk file list; operation 202, receiving a file backup instruction; operation 203, responding to the file backup instruction, acquiring a file list and corresponding version information of all files of the current full disk according to the full disk file list, and recording a current time point; and in operation 204, saving the obtained file list and corresponding version information of all the files of the current full disk by taking the current time point as an index mirror image.
The specific implementation processes of operation 202 and operation 204 are similar to the specific implementation processes of operation 101 and operation 103 in the embodiment shown in fig. 1, and are not described here again.
Referring to the application example shown in fig. 3, the cloud end of the network disk first traverses directories and files of the full disk to obtain a full disk file list including all files of the full disk; and then, after receiving a file backup instruction, executing file backup operation, namely acquiring file lists and corresponding version information of all files of the current full disk according to the obtained full disk file list, and performing mirror image storage by taking the current time point as an index.
Therefore, the embodiment of the invention ensures that the cloud of the network disk is similar to a windows system by using a mode of saving the file list and the corresponding version information of all the files of the current full disk by taking the time point as the index mirror image, and can realize direct network disk-level file mirror image storage.
Fig. 4 shows a third implementation flow diagram of the file control method according to the embodiment of the present invention. Referring to fig. 4, a file control method according to an embodiment of the present invention includes: operation 401, receiving a file backup instruction; operation 402, in response to the file backup instruction, obtaining a file list and corresponding version information of all files of the current full disk, and recording a current time point; operation 403, saving the obtained file list and corresponding version information of all the files of the current full disk by using the current time point as an index mirror image; operation 404, receiving a file recovery instruction, where the file recovery instruction carries a time point to be recovered; operation 405, in response to the file recovery instruction, obtaining a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered; and operation 406, performing network disk recovery according to the file list and the corresponding version information of all the files of the full disk corresponding to the acquired time point needing recovery.
The specific implementation processes of operations 401 to 403 are similar to the specific implementation processes of operations 401 to 403 in the embodiment shown in fig. 1, and are not described here again.
After the file backup is completed through 401 to 403, further, in operations 404 to 406, after the cloud of the network disk receives a file recovery instruction sent by a user or a user terminal, the cloud of the network disk timely responds to the file recovery instruction, and obtains and recovers the network disk according to the file list and the corresponding version information of all files of the whole disk corresponding to the time point needing to be recovered.
For example, through operations 401-403, the time point 2019/09/01 is obtained: 13: 00 is index mirror image saving A2, B1, C1, D; at time point 2019/09/01: 18: 00 is index mirror image storage A1, B2, C2, D, F2; and at time point 2019/09/01: 18: 00 is index mirror save A2, B2, C1, D, F1. Next, at operation 404, a point in time when recovery is required is received 2019/09/01: 13: 00, in response to the file restore instruction, the file restore instruction is acquired at time point 2019/09/01: 13: 00 is index mirror image saving A2, B1, C1, D; further, the mesh disk is restored to the file state of a2, B1, C1, D.
Therefore, the invention ensures that the cloud end of the network disk is similar to a windows system by using the mode of saving the file list and the corresponding version information of all the files of the current full disk by taking the time point as the index mirror image, and can realize the direct storage and the file recovery of the file mirror image at the network disk level.
FIG. 5 shows a fourth implementation flow diagram of the file control method according to the embodiment of the present invention; FIG. 6 is a schematic diagram illustrating an implementation flow of a file recovery process in an application instance file control method according to the present invention.
Referring to fig. 5, a file control method according to an embodiment of the present invention includes: operation 501, receiving a file backup instruction; operation 502, in response to the file backup instruction, obtaining a file list and corresponding version information of all files of the current full disk, and recording a current time point; operation 503, saving the obtained file list and corresponding version information of all the files of the current full disk by using the current time point as an index mirror image; operation 504, receiving a file recovery instruction, where the file recovery instruction carries a time point to be recovered; operation 505, in response to the file recovery instruction, acquiring a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered; operation 506, comparing the file list and corresponding version information of all the files of the full disk corresponding to the time point to be restored with the file list and corresponding version information of all the files of the current full disk to obtain a file comparison result; operation 5071, if the file comparison result indicates that the two files have the same file but the version information corresponding to the file is different, restoring the same file in the network disk to the version of the version information corresponding to the time point needing to be restored; operation 5072, if the file comparison result indicates that the deleted file in the file list of all the files of the current full disk exists in the file list of all the files of the full disk corresponding to the time point needing to be restored, restoring the deleted file in the network disk and restoring to the version of the version information corresponding to the time point needing to be restored; in operation 5073, if the file comparison result indicates that there is a newly added file in the file list of all files of the full disk corresponding to the time point to be restored in the file list of all files of the full disk, deleting the newly added file in the network disk.
Referring to the application example shown in fig. 6, in the file recovery process, the file difference between the file list and the corresponding version information (i.e. the image file) of all the files of the full disk corresponding to the time point to be recovered and the file list and the corresponding version information (i.e. the file of the current network disk) of all the files of the current full disk are compared to obtain a file comparison result; and executing different network disk recovery operations according to the three possible file comparison results. Specifically, if both files exist, the files existing in the network disk are restored to the version corresponding to the version information in the image file; if the deleted file after backup exists, the file is restored and the mirror image version corresponding to the mirror image file is restored; and if the newly added files after backup exist, deleting the newly added files in the network disk.
Therefore, the invention ensures that the cloud end of the network disk is similar to a windows system by using the mode of saving the file list and the corresponding version information of all the files of the current full disk by taking the time point as the index mirror image, and can realize the direct storage and the file recovery of the file mirror image at the network disk level.
Fig. 7 is a first flowchart illustrating an implementation of a file recovery method according to an embodiment of the present invention. Referring to fig. 7, a file recovery method according to an embodiment of the present invention includes: operation 701, receiving a file recovery instruction, where the file recovery instruction carries a time point to be recovered; operation 702, in response to the file recovery instruction, obtaining a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered; and in operation 703, performing network disk recovery according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing recovery.
In operations 701-703, after receiving a file recovery instruction sent by a user or a user terminal, the cloud of the network disk responds to the file recovery instruction in time, and obtains and recovers the network disk according to the file list and the corresponding version information of all files of the whole disk corresponding to the time point needing to be recovered.
For example, in operation 701, the time point when recovery is required is received is 2019/09/01: 13: 00, in response to the file restore instruction, the file restore instruction is acquired at time point 2019/09/01: 13: 00 is index mirror image saving A2, B1, C1, D; further, the mesh disk is restored to the file state of a2, B1, C1, D.
Fig. 8 shows a flowchart of a second implementation of the file recovery method according to the embodiment of the present invention. Referring to fig. 8, a file recovery method according to an embodiment of the present invention includes: operation 801, receiving a file recovery instruction, where the file recovery instruction carries a time point to be recovered; operation 802, in response to the file recovery instruction, obtaining a file list and corresponding version information of all files of the full disk corresponding to the time point needing recovery; operation 803, comparing the file list and corresponding version information of all the files of the full disk corresponding to the time point to be restored with the file list and corresponding version information of all the files of the current full disk to obtain a file comparison result; operation 8041, if the file comparison result indicates that the two files have the same file but the version information corresponding to the file is different, restoring the same file in the network disk to the version of the version information corresponding to the time point needing to be restored; operation 8042, if the file comparison result is that the deleted file in the file list of all the files of the current full disk exists in the file list of all the files of the full disk corresponding to the time point needing to be restored, restoring the deleted file in the network disk and restoring to the version of the version information corresponding to the time point needing to be restored; operation 8043, if the file comparison result indicates that a newly added file that is not included in the file list of all files of the full disk corresponding to the time point that needs to be restored exists in the file list of all files of the full disk currently, delete the newly added file in the network disk.
Referring to the application example shown in fig. 6, in the file recovery process, the file difference between the file list and the corresponding version information (i.e. the image file) of all the files on the full disk corresponding to the time point to be recovered and the file list and the corresponding version information (i.e. the file on the current network disk) of all the files on the current full disk are compared to obtain a file comparison result; and executing different network disk recovery operations according to the three possible file comparison results. Specifically, if both files exist, the files existing in the network disk are restored to the version corresponding to the version information in the image file; if the deleted file after backup exists, the file is restored and the mirror image version corresponding to the mirror image file is restored; and if the newly added files after backup exist, deleting the newly added files in the network disk. Therefore, the invention ensures that the cloud end of the network disk is similar to a windows system by using the mode of saving the file list and the corresponding version information of all the files of the current full disk by taking the time point as the index mirror image, and can realize the direct storage and the file recovery of the file mirror image at the network disk level.
Further, based on the file control method described above, an embodiment of the present invention further provides a file control apparatus, as shown in fig. 9, which is applied to a cloud of a network disk, where the file control apparatus 90 includes: a receiving module 901, configured to receive a file backup instruction; an obtaining module 902, configured to, in response to the file backup instruction, obtain a file list and corresponding version information of all files of a current full disk, and record a current time point; and the mirror image saving module 903 is configured to save the obtained file list and corresponding version information of all files of the current full disk by using the current time point as an index mirror image.
According to an embodiment of the present invention, the obtaining module 902 is further configured to traverse directories and files of the full disk to obtain a full disk file list; correspondingly, the obtaining module 902 is specifically configured to obtain a file list and corresponding version information of all files of the current full disk according to the full disk file list.
According to an embodiment of the present invention, as shown in fig. 9, the file control apparatus 90 further includes: the receiving module 901 is further configured to receive a file recovery instruction, where the file recovery instruction carries a time point to be recovered; an obtaining module 902, configured to respond to the file recovery instruction, obtain a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered; and the network disk recovery module 904 is configured to perform network disk recovery according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point that needs to be recovered.
According to an embodiment of the present invention, the network disk recovery module 904 is specifically configured to compare the file list and the corresponding version information of all the files of the full disk corresponding to the acquired time point that needs to be recovered with the file list and the corresponding version information of all the files of the current full disk, so as to obtain a file comparison result; if the file comparison result shows that the two files have the same file but the version information corresponding to the file is different, restoring the same file in the network disk into the version of the version information corresponding to the time point needing to be restored; if the file comparison result is that the deleted files in the file list of all the current full disk files exist in the file list of all the full disk files corresponding to the time point needing to be restored, restoring the deleted files in the network disk and restoring the deleted files to the version of the version information corresponding to the time point needing to be restored; and if the file comparison result is that the newly added files which do not exist in the file list of all the files of the full disk corresponding to the time point needing to be restored exist in the file list of all the files of the full disk at present, deleting the newly added files in the network disk.
Also, based on the file control method described above, an embodiment of the present invention further provides a computer-readable storage medium storing a program, which, when executed by a processor, causes the processor to perform at least the following operation steps: operation 101, receiving a file backup instruction; operation 102, in response to the file backup instruction, obtaining a file list and corresponding version information of all files of the current full disk, and recording a current time point; and operation 103, saving the obtained file list and corresponding version information of all the files of the current full disk by taking the current time point as an index mirror image.
Here, it should be noted that: the above description of the embodiments of the file control device and the computer storage medium is similar to the description of the method embodiments shown in fig. 1 to 6, and has similar beneficial effects to the method embodiments shown in fig. 1 to 6, and therefore, the description thereof is omitted. For technical details that are not disclosed in the embodiment of the file control apparatus of the present invention, please refer to the description of the method embodiment shown in fig. 1 to 6 of the present invention for understanding, and therefore, for brevity, will not be described again.
Further, based on the file recovery method described above, an embodiment of the present invention further provides a file recovery apparatus, as shown in fig. 10, which is applied to a cloud of a network disk, where the file recovery apparatus 100 includes: a receiving module 1001, configured to receive a file recovery instruction, where the file recovery instruction carries a time point to be recovered; an obtaining module 1002, configured to obtain, in response to the file recovery instruction, a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered; and the network disk recovery module 1003 is configured to perform network disk recovery according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing recovery.
According to an embodiment of the present invention, the network disk recovery module 1003 is specifically configured to compare the file list and the corresponding version information of all the files of the full disk corresponding to the acquired time point that needs to be recovered with the file list and the corresponding version information of all the files of the current full disk, so as to obtain a file comparison result; if the file comparison result shows that the two files have the same file but the version information corresponding to the file is different, restoring the same file in the network disk into the version of the version information corresponding to the time point needing to be restored; if the file comparison result is that the deleted files in the file list of all the current full disk files exist in the file list of all the full disk files corresponding to the time point needing to be restored, restoring the deleted files in the network disk and restoring the deleted files to the version of the version information corresponding to the time point needing to be restored; and if the file comparison result is that the newly added files which do not exist in the file list of all the files of the full disk corresponding to the time point needing to be restored exist in the file list of all the files of the full disk at present, deleting the newly added files in the network disk.
Also, based on the file recovery method described above, an embodiment of the present invention further provides a computer-readable storage medium storing a program, which, when executed by a processor, causes the processor to perform at least the following operation steps: operation 701, receiving a file recovery instruction, where the file recovery instruction carries a time point to be recovered; operation 702, in response to the file recovery instruction, obtaining a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered; and in operation 703, performing network disk recovery according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing recovery.
Here, it should be noted that: the above description of the embodiments of the file recovery apparatus and the computer storage medium is similar to the description of the embodiment of the method shown in fig. 7 and 8, and has similar beneficial effects to the embodiment of the method shown in fig. 7 and 8, and therefore, the description thereof is omitted. For technical details not disclosed in the embodiment of the file recovery apparatus of the present invention, please refer to the description of the method embodiment shown in fig. 7 and 8 of the present invention, which will not be repeated herein for brevity.
It should be noted that, in this document, 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 phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A file control method is applied to a network disk cloud, and is characterized by comprising the following steps:
receiving a file backup instruction;
responding to the file backup instruction, acquiring a file list and corresponding version information of all files of the current full disk, and recording the current time point;
and saving the file list and the corresponding version information of all the acquired files of the current full disk by taking the current time point as an index mirror image.
2. The method of claim 1, further comprising: traversing directories and files of the whole disk to obtain a whole disk file list;
correspondingly, obtaining the file list and the corresponding version information of all the files of the current full disk comprises the following steps:
and acquiring a file list and corresponding version information of all files of the current full disk according to the full disk file list.
3. The method of claim 1, further comprising:
receiving a file recovery instruction, wherein the file recovery instruction carries a time point needing to be recovered;
responding to the file recovery instruction, and acquiring a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered;
and restoring the network disk according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing to be restored.
4. The method according to claim 3, wherein performing the network disk recovery according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing recovery comprises:
comparing the file list and corresponding version information of all the files of the full disk corresponding to the acquired time point needing to be restored with the file list and corresponding version information of all the files of the current full disk to obtain a file comparison result;
if the file comparison result shows that the two files have the same file but the version information corresponding to the file is different, restoring the same file in the network disk into the version of the version information corresponding to the time point needing to be restored;
if the file comparison result is that the deleted files in the file list of all the current full disk files exist in the file list of all the full disk files corresponding to the time point needing to be restored, restoring the deleted files in the network disk and restoring the deleted files to the version of the version information corresponding to the time point needing to be restored;
and if the file comparison result is that the newly added files which do not exist in the file list of all the files of the full disk corresponding to the time point needing to be restored exist in the file list of all the files of the full disk at present, deleting the newly added files in the network disk.
5. A file recovery method is applied to a network disk cloud, and is characterized by comprising the following steps:
receiving a file recovery instruction, wherein the file recovery instruction carries a time point needing to be recovered;
responding to the file recovery instruction, and acquiring a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered;
and restoring the network disk according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing to be restored.
6. The method according to claim 5, wherein performing the network disk recovery according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing recovery comprises:
comparing the file list and corresponding version information of all the files of the full disk corresponding to the acquired time point needing to be restored with the file list and corresponding version information of all the files of the current full disk to obtain a file comparison result;
if the file comparison result shows that the two files have the same file but the version information corresponding to the file is different, restoring the same file in the network disk into the version of the version information corresponding to the time point needing to be restored;
if the file comparison result is that the deleted files in the file list of all the current full disk files exist in the file list of all the full disk files corresponding to the time point needing to be restored, restoring the deleted files in the network disk and restoring the deleted files to the version of the version information corresponding to the time point needing to be restored;
and if the file comparison result is that the newly added files which do not exist in the file list of all the files of the full disk corresponding to the time point needing to be restored exist in the file list of all the files of the full disk at present, deleting the newly added files in the network disk.
7. The utility model provides a file controlling means, is applied to net dish high in the clouds, its characterized in that, the device includes:
the receiving module is used for receiving a file backup instruction;
the acquisition module is used for responding to the file backup instruction, acquiring a file list and corresponding version information of all files of the current full disk, and recording the current time point;
and the mirror image storage module is used for storing the acquired file list and the corresponding version information of all the files of the current full disk by taking the current time point as an index mirror image.
8. The apparatus of claim 7,
the acquisition module is also used for traversing the directory and the file of the full disk to acquire a full disk file list;
correspondingly, the obtaining module is specifically configured to obtain a file list and corresponding version information of all files of the current full disk according to the full disk file list.
9. The utility model provides a file recovery device, is applied to net dish high in the clouds, its characterized in that, the device includes:
the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a file recovery instruction, and the file recovery instruction carries a time point needing to be recovered;
the acquisition module is used for responding to the file recovery instruction and acquiring a file list and corresponding version information of all files of the full disk corresponding to the time point needing to be recovered;
and the network disk recovery module is used for recovering the network disk according to the file list and the corresponding version information of all the files of the whole disk corresponding to the acquired time point needing to be recovered.
10. A computer-readable storage medium comprising a set of computer-executable instructions that, when executed, perform the file control method of any of claims 1-4 or the file restoration method of any of claims 5-6.
CN201911120893.2A 2019-11-15 2019-11-15 File control method, file recovery method, file control device, file recovery device and storage medium Pending CN110888758A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911120893.2A CN110888758A (en) 2019-11-15 2019-11-15 File control method, file recovery method, file control device, file recovery device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911120893.2A CN110888758A (en) 2019-11-15 2019-11-15 File control method, file recovery method, file control device, file recovery device and storage medium

Publications (1)

Publication Number Publication Date
CN110888758A true CN110888758A (en) 2020-03-17

Family

ID=69747622

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911120893.2A Pending CN110888758A (en) 2019-11-15 2019-11-15 File control method, file recovery method, file control device, file recovery device and storage medium

Country Status (1)

Country Link
CN (1) CN110888758A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996108A (en) * 2009-08-18 2011-03-30 中兴通讯股份有限公司 Distributed environment backup and recovery method and system
CN103067480A (en) * 2012-12-24 2013-04-24 珠海金山办公软件有限公司 Synchronized method and system of network disk
CN103365996A (en) * 2013-07-12 2013-10-23 北京奇虎科技有限公司 File management and processing method, device and system
CN106101265A (en) * 2016-07-26 2016-11-09 浪潮软件股份有限公司 Method for synchronizing files between network disk and desktop end

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996108A (en) * 2009-08-18 2011-03-30 中兴通讯股份有限公司 Distributed environment backup and recovery method and system
CN103067480A (en) * 2012-12-24 2013-04-24 珠海金山办公软件有限公司 Synchronized method and system of network disk
CN103365996A (en) * 2013-07-12 2013-10-23 北京奇虎科技有限公司 File management and processing method, device and system
CN106101265A (en) * 2016-07-26 2016-11-09 浪潮软件股份有限公司 Method for synchronizing files between network disk and desktop end

Similar Documents

Publication Publication Date Title
CN105893084B (en) Version upgrading method and terminal device
CN103235685B (en) A kind of method and apparatus that terminal operating system desktop contents is set
US8250033B1 (en) Replication of a data set using differential snapshots
US8495022B1 (en) Systems and methods for synthetic backups
US10108501B2 (en) Terminal backup and recovery method
CN107016123B (en) File management method and terminal device
CN102495772B (en) Characteristic-based terminal program cloud backup and recovery methods
CN109684270B (en) Database archiving method, device, system, equipment and readable storage medium
US9087093B2 (en) Method for implementing electronic bookmarks and device thereof
CN112800019A (en) Data backup method and system based on Hadoop distributed file system
CN104834749A (en) File synchronization method and synchronization system for mobile terminal and PC terminal
CN110865903B (en) Node abnormal reconnection multiplexing method and system based on erasure code distributed storage
CN110674084A (en) Method, apparatus, and computer-readable storage medium for data protection
CN103176867A (en) Fast file differential backup method
CN112631826B (en) Backup processing method and device and computer readable storage medium
CN111143112B (en) Method, apparatus and computer readable storage medium for restoring metadata
CN110888758A (en) File control method, file recovery method, file control device, file recovery device and storage medium
CN103902409B (en) A kind of log backup method and device
CN105786650A (en) Data management method and device
US10853194B1 (en) Selective data restoration
CN103870603A (en) Directory management method and electronic device
CN115328696A (en) Data backup method in database
CN103645967A (en) Read-only snapshot rollback method and device
CN111953722B (en) Synchronization method and device for terminal address book
CN110658992A (en) Method, device and equipment for realizing writable snapshot and readable storage medium

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: 20200317