WO2021139224A1 - 云场景下的文件备份方法、装置、介质、电子设备 - Google Patents

云场景下的文件备份方法、装置、介质、电子设备 Download PDF

Info

Publication number
WO2021139224A1
WO2021139224A1 PCT/CN2020/117777 CN2020117777W WO2021139224A1 WO 2021139224 A1 WO2021139224 A1 WO 2021139224A1 CN 2020117777 W CN2020117777 W CN 2020117777W WO 2021139224 A1 WO2021139224 A1 WO 2021139224A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
attribute information
backed
list
backup
Prior art date
Application number
PCT/CN2020/117777
Other languages
English (en)
French (fr)
Inventor
赵宇
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021139224A1 publication Critical patent/WO2021139224A1/zh

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
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • G06F16/137Hash-based
    • 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

Definitions

  • the present disclosure relates to the field of cloud technology, and in particular, to a file backup method, device, medium, and electronic equipment in a cloud scenario.
  • cloud backup in the cloud scenario mainly involves obtaining file data in the cloud host, and then comparing it with the backed-up file data, so as to determine that the file data needs to be backed up.
  • the purpose of the present disclosure is to provide a file backup method and device, computer readable storage medium, and electronic equipment in a cloud scenario, which can at least reduce the memory occupation during the file backup process and ensure the reliability and safety of file backup .
  • a file backup method in a cloud scenario includes: obtaining a backup file directory from a backup service database; obtaining a first file corresponding to the backup file directory from a cloud server.
  • File attribute information list determine the file list to be backed up by comparing the second file attribute information list with the first file attribute information list in the backup service database; read from the cloud server based on the file list to be backed up
  • the file to be backed up corresponding to the list of files to be backed up is used to back up the file to be backed up.
  • a file backup device in a cloud scenario.
  • the device includes: a first obtaining unit configured to obtain a backup file directory from a backup service database; and a second obtaining unit configured to obtain a backup file directory from a backup service database; Used to obtain the first file attribute information list corresponding to the backup file directory in the cloud server; the determining unit is used to compare the second file attribute information list with the first file attribute information in the backup service database The list of files to be backed up is determined; the reading unit is used to read the files to be backed up corresponding to the list of files to be backed up from the cloud server based on the list of files to be backed up, so as to back up the files to be backed up.
  • a computer-readable storage medium having a computer program stored thereon, the computer program including executable instructions, and when the executable instructions are executed by a processor, the following method is implemented: Obtain the backup file directory in the backup service database; obtain the first file attribute information list corresponding to the backup file directory in the cloud server; compare the second file attribute information list with the first file attribute in the backup service database The information list determines the file list to be backed up; based on the file list to be backed up, the file to be backed up corresponding to the file list to be backed up is read from the cloud server to back up the file to be backed up.
  • an electronic device including: one or more processors; a memory, configured to store executable instructions of the processors, when the executable instructions are executed by the one or more When multiple processors are executed, the one or more processors are caused to implement the following method: obtain the backup file directory from the backup service database; obtain the first file attribute information list corresponding to the backup file directory in the cloud server; Compare the second file attribute information list with the first file attribute information list in the backup service database to determine the list of files to be backed up; based on the list of files to be backed up, read the list of files to be backed up from the cloud server The corresponding file to be backed up to back up the file to be backed up.
  • the memory comparison can be reduced, thereby reducing
  • the memory usage during the file backup process saves the memory usage and ensures the reliability and safety of the file during the backup process.
  • Fig. 1 shows a schematic diagram of an application scenario of a file backup method in a cloud scenario according to an embodiment of the present disclosure
  • Figure 2 shows a flowchart of a file backup method in a cloud scenario according to an embodiment of the present disclosure
  • FIG. 3 shows a detailed flowchart of obtaining a first file attribute information list corresponding to the backup file directory in a cloud server according to an embodiment of the present disclosure
  • Fig. 4 shows a flowchart of a method before sending a file backup request to the cloud server according to an embodiment of the present disclosure
  • FIG. 5 shows a detailed flowchart of determining a list of files to be backed up according to an embodiment of the present disclosure
  • FIG. 6 shows a detailed flowchart of determining a list of files to be backed up according to an embodiment of the present disclosure
  • FIG. 7 shows a detailed flowchart of reading files to be backed up corresponding to the list of files to be backed up from a cloud server according to an embodiment of the present disclosure
  • FIG. 8 shows a detailed flowchart of determining at least two sublists of files to be backed up from the list of files to be backed up according to an embodiment of the present disclosure
  • Fig. 9 shows a block diagram of a file backup device in a cloud scenario according to an embodiment of the present disclosure
  • FIG. 10 shows a computer-readable storage medium for implementing a file backup method in a cloud scenario according to an embodiment of the present disclosure
  • Fig. 11 shows an exemplary block diagram of an electronic device implementing a file backup method in a cloud scenario according to an embodiment of the present disclosure.
  • the technical solution of this application can be applied to the field of blockchain and/or big data technology.
  • the data involved such as files, lists, etc., can be stored in the server or in the blockchain, such as distributed storage through the blockchain ,
  • This application is not limited.
  • the cloud server can be a node in the blockchain.
  • the present disclosure briefly describes the application scenario of the file backup method in the cloud scenario.
  • the file backup method in the cloud scenario may be implemented in the scenario shown in FIG. 1.
  • FIG. 1 a file backup method in the cloud scenario according to an embodiment of the present disclosure is shown. Schematic diagram of the application scenario.
  • Figure 1 shows an application scenario where a user backs up files in a cloud scenario.
  • the file backup method in the cloud scenario can be implemented based on the backup server 103 as shown in the figure.
  • the backup server as shown in the figure can also be a tablet computer, a notebook computer, or the like with a touch screen. Replace with electronic equipment.
  • file backup method in the cloud scenario may also be executed by a cloud server with cloud computing functions.
  • the cloud computing is a computing mode that distributes computing tasks on a resource pool composed of a large number of computers, so that various application systems can obtain computing power, storage space, and information services as required.
  • the network that provides resources is called the "cloud.”
  • the resources in the "cloud” are infinitely expandable, and can be obtained at any time, used on demand, and expanded at any time.
  • a cloud computing resource pool cloud platform for short, generally referred to as IaaS (Infrastructure as a Service), infrastructure as a service
  • cloud computing resource pool It mainly includes: computing equipment (virtualized machine, including operating system), storage equipment, and network equipment.
  • the user can send a file backup request to the backup service database 102 through the user terminal 101, and a file backup task is generated in the backup service data 102.
  • the file backup task records Information such as file backup time, file backup times, file backup frequency, and file directory of files to be backed up are included.
  • the backup server 103 may obtain the backup file directory in the file backup task from the backup service database 102, and obtain the first file attribute information list corresponding to the backup file directory in the cloud server 104, and then obtain the file attribute information list in the backup service database 102 Compare the second file attribute information list with the first file attribute information list to determine the file list to be backed up, and finally, based on the file list to be backed up, read the file to be backed up corresponding to the file list to be backed up from the cloud server 104 To back up the file to be backed up.
  • the second file attribute information list includes the file attribute information of the backed up file, which is stored in the backup service data 102.
  • the file backup method in the cloud scenario can be executed by a physical device or a virtual device with computing and processing functions. As shown in FIG. 2, the file backup method in the cloud scenario at least includes step 210 to step 270:
  • step 210 the backup file directory is obtained from the backup service database.
  • the backup service database can be created in advance, and it is mainly used to store file backup tasks initiated by users.
  • the file backup tasks include file backup time, backup times, backup frequency, and file directory of files to be backed up.
  • user A initiates a file backup task for backing up image files, where the backup time is July 1, 2020 at 00:00:00, the number of backups is 8, the backup frequency is once a week, and the file where the image file is to be backed up
  • the directory is "directory 1, directory 2, directory 3" in the cloud server.
  • the backup service database can also store the user's file backup records in history.
  • the file backup record includes a second file attribute information list (that is, a file attribute information list of files that have been backed up in history), where the second file attribute information
  • the information list includes file attribute information of at least one second file. For those skilled in the art, it should be understood that one second file corresponds to one second file attribute information.
  • the file attribute information of each file can include one of attribute information such as file name, file path, file size, and file modification time, or Many kinds.
  • the backup service database does not include the second file attribute information list.
  • step 210 it is mainly to obtain the backup file directory, that is, the file directory corresponding to the file to be backed up, from the backup service database.
  • the storage location of the files that the user needs to back up can be found in the cloud server where the user files are stored through the backup file directory.
  • step 230 the first file attribute information list corresponding to the backup file directory is obtained from the cloud server.
  • the cloud server generally stores at least one original file of the user, and each original file corresponds to a file attribute information.
  • the file attribute information corresponding to each original file can also include file name, file path, One or more of attribute information such as file size and file modification time.
  • the original file corresponding to the backup file directory is the file object that the user needs to back up. Therefore, obtaining the first file attribute information list corresponding to the backup file directory in the cloud server is the file that the user needs to back up.
  • the first file attribute information list includes file attribute information of at least one first file.
  • the first file attribute information list corresponding to the backup file directory may be acquired in the cloud server at one time.
  • obtaining the first file attribute information list corresponding to the backup file directory in the cloud server may also be performed according to the steps shown in FIG. 3.
  • FIG. 3 there is shown a detailed flowchart of obtaining the first file attribute information list corresponding to the backup file directory in the cloud server according to an embodiment of the present disclosure. Specifically, it includes steps 231 to 232:
  • step 231 based on the backup file directory, a file backup request is sent to the cloud server.
  • step 232 the first file attribute information sent by the cloud server is received in batches to obtain the first file attribute information list.
  • the cloud server can scan in its own memory according to the backup file directory to determine the original file (that is, the first file) that the user needs to back up, and then The first file attribute information can be determined, and the first file attribute information list can be obtained.
  • the cloud service After the cloud service obtains the first file attribute information list, it can send the first file attribute information in the first file attribute information list in batches, where each batch sends a part of the first file attribute information list.
  • One file attribute information for example, 1000 pieces of first file attribute information are sent in each batch.
  • a file backup request may be sent to the cloud server based on the backup file directory, and then the first file attribute information sent by the cloud server may be received in batches to obtain the first file attribute. Information List.
  • the steps shown in FIG. 4 may also be performed.
  • FIG. 4 a flowchart of a method before sending a file backup request to the cloud server according to an embodiment of the present disclosure is shown. Specifically, it includes steps 221 to 222:
  • a first list hash value corresponding to the backup file directory is obtained from the cloud server, where the first list hash value is a hash value mapped from the first file attribute information list.
  • step 222 when the hash value of the first list is inconsistent with the hash value of the second list in the backup service database, a file backup request is sent to the cloud server based on the backup file directory, the The second list hash value is a hash value mapped from the second file attribute information list.
  • the cloud server before sending the file backup request to the cloud server, the cloud server may be requested to obtain the first list hash value mapped by the first file attribute information list corresponding to the backup file directory, and then The hash value of the second file attribute information list in the backup service database is calculated by a hash algorithm to obtain the second list hash value.
  • the method for determining the hash value of the second list and the method for determining the hash value of the first list need to be consistent.
  • the hash value of the first list obtained from the cloud server is obtained based on the MD5 algorithm, then it is also necessary to use the MD5 algorithm to hash the second file attribute information list in the backup service database to obtain the second list. Hope value.
  • the hash value of the first list obtained from the cloud server is obtained based on the SHA-1 algorithm, then it is also necessary to use the SHA-1 algorithm to hash the second file attribute information list in the backup service database. Get the hash value of the second list.
  • the second list hash value can be compared with the first list hash value. If the two are inconsistent, it means that it is relative to the historical For the files that have been backed up, the files stored in the cloud server have been changed and need to be backed up. Therefore, a file backup request is sent to the cloud server. If the two are consistent, it means that compared with the files that have been backed up in history, the cloud The file stored in the server has not changed, and it does not need to be backed up, so there is no need to send a file backup request to the cloud server.
  • the advantage of performing steps 221 to 222 is that the file backup request is sent to the cloud server only when the file stored in the cloud server changes, which can save network resources.
  • a list of files to be backed up is determined by comparing the second file attribute information list with the first file attribute information list in the backup service database.
  • the first file attribute information list includes at least one piece of first file attribute information
  • the second file attribute information list includes at least one piece of second file attribute information
  • the steps shown in FIG. 5 can be executed. .
  • FIG. 5 a detailed flowchart of determining the list of files to be backed up according to an embodiment of the present disclosure is shown. Specifically, it includes steps 251 to 252:
  • step 251 the at least one first file attribute information and the at least one second file attribute information are compared in the backup service database, where the first file attribute information represents the identity of the first file And associated parameter information, the second file attribute information is information that characterizes the identity and associated parameters of the second file.
  • step 252 when the first file attribute information is different from any one of the second file attribute information, the first file corresponding to the first file attribute information is determined as the file to be backed up, and a list of files to be backed up is obtained.
  • the first file attribute information can be used to identify its corresponding first file attribute information.
  • the identity of the file, and the second file attribute information may be used to identify the identity of the second file corresponding to it.
  • comparing the at least one first file attribute information with the at least one second file attribute information in the backup service database may be comparing the first file attribute information with the at least one second file attribute information Whether the file name, file path, file size, and file modification time in the file are the same.
  • file attribute information is: “Picture 1 (file name), path 1 (file path), 3000KB (file size), 2020/ 6/5 (file modification time)
  • file attribute information is: “Picture 1 (file name), path 1 (file path), 2000KB (file size), 2020/6/1 (file modification time)”
  • file size and file modification time of the two are different, which means that the “file 1” in the cloud server is compared with the “file 1” that has been backed up in history. "Has changed, so it is necessary to determine the "file 1" in the cloud server as the file to be backed up in order to back it up again.
  • file attribute information is: "Picture 2 (file name), path 2 (file path), 1000KB (file size), 2020/6/ 6 (file modification time)"
  • file attribute information of "file 2" does not exist in the second file attribute information, which means that the "file 2" in the cloud server is a new file, so it is necessary to change the "file 2" in the cloud server File 2" is determined as the file to be backed up, so that it can be backed up again.
  • the steps shown in FIG. 6 can also be followed. carried out.
  • FIG. 6 a detailed flowchart of determining a list of files to be backed up according to an embodiment of the present disclosure is shown. Specifically, it includes steps 253 to 256:
  • step 253 the hash values of the at least one first file attribute information mapping are respectively determined to obtain at least one first attribute hash value.
  • step 254 the hash values of the at least one second file attribute information mapping are respectively determined to obtain at least one second attribute hash value.
  • step 255 the at least one first attribute hash value and the at least one second attribute hash value are compared in the backup service database.
  • step 256 when the first attribute hash value is different from any of the second attribute hash values, the first file corresponding to the first attribute hash value is determined as the file to be backed up, and the list of files to be backed up is obtained .
  • the backup service database may record the hash value of the second file attribute information mapping of each second file, that is, the second attribute hash value.
  • the hash value of the first file attribute information mapping of each first file may also be determined by a hash algorithm, that is, the first attribute hash value. Due to the one-way uniqueness of the hash value, the list of files to be backed up can be determined only by comparing whether the at least one first attribute hash value and the at least one second attribute hash value are the same in the backup service database .
  • the first attribute hash value is "hash value 1"
  • the value 1" means that the "file 1" in the cloud server is a new file or a modified file, so it is necessary to determine the "file 1" in the cloud server as the file to be backed up to perform a new backup.
  • the advantage of this is that since only one hash value is compared without the need to compare all file attribute information, when comparing the second file attribute information list with the first file attribute information list, the comparison process can be reduced.
  • the second file attribute information list and the first file attribute information list are compared in the backup service database without occupying memory to compare the two. Therefore, the number of files in the database can be reduced.
  • the use of memory during the backup process saves memory usage and ensures the reliability and safety of files during the backup process.
  • step 270 based on the list of files to be backed up, the files to be backed up corresponding to the list of files to be backed up are read from the cloud server to back up the files to be backed up.
  • reading the files to be backed up corresponding to the list of files to be backed up from the cloud server can be executed according to the steps shown in FIG. 7.
  • FIG. 7 shows a detailed flowchart of reading the file to be backed up corresponding to the list of files to be backed up from the cloud server according to an embodiment of the present disclosure. Specifically, it includes steps 271 to 274:
  • step 271 at least two sublists of files to be backed up are determined from the list of files to be backed up.
  • determining at least two sublists of files to be backed up from the list of files to be backed up can be executed according to the steps shown in FIG. 8.
  • FIG. 8 shows a detailed flowchart of determining at least two sublists of files to be backed up from the list of files to be backed up according to an embodiment of the present disclosure. Specifically, it includes steps 2711 to 2712:
  • step 2711 the number of files to be backed up in the list of files to be backed up and the file size of each file to be backed up are determined.
  • step 2712 according to the number of files to be backed up and the file size of each file to be backed up, the files to be backed up are grouped to obtain at least two file sublists to be backed up.
  • the files to be backed up may be grouped according to the number of files to be backed up and the file size of each file to be backed up, according to the principle of balanced grouping.
  • the number of files to be backed up in the list of files to be backed up is 5, and the file sizes are "File to be backed up 1:1000KB", “File to be backed up 2: 1000KB”, and “File to be backed up 3: 1000KB” ", “Files to be backed up 4:2000KB”, “Files to be backed up 5:1000KB”.
  • the files to be backed up When grouping the files to be backed up, if they are divided into two groups, since the total file size of the backup file 1, the file to be backed up 2, the file to be backed up 3 is 3000KB, the total file size of the backup file 4, the file to be backed up 5 It is 3000KB, therefore, the files to be backed up 1, the files to be backed up 2, the files to be backed up 3 can be grouped into one group to obtain the sub-list of the files to be backed up 1, and the backup file 4 and the files to be backed up Backup file sublist 2.
  • the advantage of grouping the files to be backed up is that it can ensure that each sublist of files to be backed up corresponds to There is little difference in file size between files to be backed up.
  • step 272 a file reading task to be backed up corresponding to each sublist of files to be backed up is created respectively.
  • a file reading task to be backed up 1 may be created for the sublist 1 of files to be backed up, and a file reading task 2 to be backed up is created for the file sublist 2 to be backed up.
  • each of the file reading tasks to be backed up is distributed to at least two file reading threads.
  • step 274 the at least two file reading threads are executed concurrently to read the files to be backed up corresponding to the list of files to be backed up in the cloud server.
  • the network traffic in the file backup process can be controlled by the two dimensions of the number of files and the file size in the file backup sublist, that is, the number of concurrent execution read threads can be controlled according to the bandwidth that can be provided in the network. If the total traffic required for concurrent execution of all file reading threads is greater than the bandwidth that can be provided in the network, then control the concurrent execution of some file reading threads to ensure that the bandwidth available in the network is fully utilized, and for the remaining part of the file reading If the thread is taken, it will be queued.
  • step 274 in the process of multi-threaded file reading, the running status of each thread can also be detected.
  • the file backup task corresponding to the error thread can be distributed to other threads.
  • the files to be backed up in the cloud server are backed up by concurrently executing at least two file reading threads, which can shorten the file backup time and improve the file backup efficiency.
  • the backed up files can also be verified to confirm whether there are unbacked up files in the cloud server.
  • the first file attribute information list is obtained in the cloud server through the backup file directory obtained from the backup service database
  • the second file attribute information list is obtained in the backup service database.
  • the information list is compared with the first file attribute information list to determine a list of files to be backed up, so as to read the corresponding files to be backed up from the cloud server according to the list of files to be backed up. Since the list of files to be backed up is obtained by comparing the second file attribute information list with the first file attribute information list in the backup service database, the memory comparison can be reduced, thereby reducing the memory occupation during the file backup process, thereby saving The memory usage rate ensures the reliability and safety of files during the backup process.
  • Fig. 9 shows a block diagram of a file backup device in a cloud scenario according to an embodiment of the present disclosure.
  • a file backup device 900 in a cloud scenario includes: a first acquiring unit 901, a second acquiring unit 902, a determining unit 903, and a reading unit 904.
  • the first obtaining unit 901 is used to obtain the backup file directory from the backup service database; the second obtaining unit 902 is used to obtain the first file attribute information list corresponding to the backup file directory in the cloud server; determine The unit 903 is used to determine the list of files to be backed up by comparing the second file attribute information list with the first file attribute information list in the backup service database; the reading unit 904 is used to determine the list of files to be backed up based on the The file list reads the file to be backed up corresponding to the file list to be backed up from the cloud server to back up the file to be backed up.
  • the first obtaining unit 901 includes: a sending unit, which is used to send a file backup request to the cloud server based on the backup file directory; and a receiving unit, which is used The first file attribute information sent by the cloud server is received in batches to obtain the first file attribute information list.
  • the device further includes a third acquiring unit, which is used to acquire from the cloud server before sending the file backup request to the cloud server based on the backup file directory.
  • the first list hash value corresponding to the backup file directory, the first list hash value is a hash value mapped from the first file attribute information list;
  • the sending unit is configured to: in the first list When the hash value is inconsistent with the hash value of the second list in the backup service database, a file backup request is sent to the cloud server based on the backup file directory, and the second list hash value is the second The hash value of the file attribute information list mapping.
  • the first file attribute information list includes at least one piece of first file attribute information
  • the second file attribute information list includes at least one piece of second file attribute information
  • the determining unit 903 is configured to: compare the at least one first file attribute information with the at least one second file attribute information in the backup service database, where the first file attribute information represents the first file attribute information.
  • Information about the file identity and associated parameters, the second file attribute information is information that characterizes the second file’s identity and associated parameters; when the first file attribute information is different from any one of the second file attribute information, the second file attribute information
  • the first file corresponding to the first file attribute information is determined to be a file to be backed up, and a list of files to be backed up is obtained.
  • the first file attribute information list includes at least one piece of first file attribute information
  • the second file attribute information list includes at least one piece of second file attribute information
  • the determining unit 903 is configured to: respectively determine the hash value of the at least one first file attribute information mapping to obtain at least one first attribute hash value; respectively determine the hash value of the at least one second file attribute information mapping , Obtain at least one second attribute hash value; compare the at least one first attribute hash value with the at least one second attribute hash value in the backup service database; compare the first attribute hash value with any When the hash value of a second attribute is different, the first file corresponding to the hash value of the first attribute is determined as the file to be backed up, and a list of files to be backed up is obtained.
  • the reading unit 904 is configured to: determine at least two file sublists to be backed up from the file list to be backed up; A corresponding file reading task to be backed up; distribute each file reading task to be backed up to at least two file reading threads; concurrently execute the at least two file reading threads to read in the cloud server Fetch the file to be backed up corresponding to the list of files to be backed up.
  • the reading unit 904 is configured to: determine the number of files to be backed up in the list of files to be backed up and the file size of each file to be backed up; The number of files to be backed up and the file size of each file to be backed up are grouped to obtain at least two sublists of files to be backed up.
  • file backup method in the cloud scenario and several units of the file backup device in the cloud scenario are mentioned in the above detailed description, this division is not mandatory.
  • two or more units and functions described above may be embodied in one unit.
  • the features and functions of one unit described above can be further divided into multiple units to be embodied.
  • a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the present disclosure. Those of ordinary skill in the art can understand and implement without creative work.
  • the present disclosure also provides a computer-readable storage medium that stores computer program instructions, and when the computer program instructions are executed by a computer, the computer executes the above method. That is, a program product capable of realizing the above-mentioned method of this specification is stored thereon.
  • various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code.
  • the program product runs on a terminal device, the program code is used to enable the The terminal device executes the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.
  • the media involved in this application such as computer-readable storage media, may be non-volatile or volatile.
  • a program product 1000 for implementing the above method according to an embodiment of the present disclosure is described. It can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be installed in a terminal device, For example, running on a personal computer.
  • CD-ROM compact disk read-only memory
  • the program product of the present disclosure is not limited thereto.
  • the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
  • the program product can use any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
  • the program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
  • the program code used to perform the operations of the present disclosure can be written in any combination of one or more programming languages.
  • the programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (for example, using Internet service providers). Business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service providers for example, using Internet service providers.
  • the present disclosure also provides an electronic device capable of implementing the above method.
  • the electronic device 1100 according to this embodiment of the present disclosure will be described below with reference to FIG. 11.
  • the electronic device 1100 shown in FIG. 11 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • the electronic device 1100 is in the form of a general-purpose computing device.
  • the components of the electronic device 1100 may include, but are not limited to: the aforementioned at least one processing unit 1110, the aforementioned at least one storage unit 1120, and a bus 1130 connecting different system components (including the storage unit 1120 and the processing unit 1110).
  • the storage unit stores program code, and the program code can be executed by the processing unit 1110, so that the processing unit 1110 executes the various exemplary methods described in the "Methods of Embodiments" section of this specification. Steps of implementation.
  • the storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 1121 and/or a cache storage unit 1122, and may further include a read-only storage unit (ROM) 1123.
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 1120 may also include a program/utility tool 1124 having a set of (at least one) program modules 1125.
  • program modules 1125 include but are not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
  • the bus 1130 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
  • the electronic device 1100 may also communicate with one or more external devices 1200 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and/or communicate with Any device (such as a router, modem, etc.) that enables the electronic device 1100 to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 1150.
  • the electronic device 1100 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 1160.
  • networks such as a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet
  • the network adapter 1160 communicates with other modules of the electronic device 1100 through the bus 1130. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
  • the example embodiments described here can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
  • a computing device which may be a personal computer, a server, a terminal device, or a network device, etc.

Abstract

一种云场景下的文件备份方法、装置(900)、介质及电子设备(1100),涉及云技术领域。该方法包括:从备份服务数据库(102)中获取备份文件目录(210);在云服务器(104)中获取所述备份文件目录对应的第一文件属性信息列表(230);通过在所述备份服务数据库(102)中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单(250);基于所述待备份文件清单,从云服务器(104)中读取所述待备份文件清单对应的待备份文件,以备份所述待备份文件(270)。此方法下,通过在备份服务数据库(102)中对比第二文件属性信息列表和所述第一文件属性信息列表,可以减少内存对比,从而节约内存的使用率,也保证了文件属性信息的安全性。

Description

云场景下的文件备份方法、装置、介质、电子设备
本申请要求于2020年7月28日提交中国专利局、申请号为202010739622.1,发明名称为“云场景下的文件备份方法、装置、介质、电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及云技术领域,特别地,涉及一种云场景下的文件备份方法、装置、介质和电子设备。
背景技术
目前,为了提高云端资源的可靠性和安全性,对云端资源进行备份服务的需求越来越大,而为了避免因为硬件故障,导致云主机中资源数据丢失,云备份技术也就显得越来越重要。
发明人意识到,云场景下的云备份主要是通过获取云主机中的文件数据,然后与已备份文件数据进行对比,从而确定需要备份文件数据。
然而,如何减少在文件备份过程中对内存的占用,以保证文件备份的可靠性和安全性是亟待解决的技术问题。
发明内容
本公开的目的在于提供一种云场景下的文件备份方法及装置、计算机可读存储介质、电子设备,进而至少可以减少在文件备份过程中对内存的占用,保证文件备份的可靠性和安全性。
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。
根据本公开实施例的一个方面,提供了一种云场景下的文件备份方法,所述方法包括:从备份服务数据库中获取备份文件目录;在云服务器中获取所述备份文件目录对应的第一文件属性信息列表;通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单;基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件,以备份所述待备份文件。
根据本公开实施例的一个方面,提供了一种云场景下的文件备份装置,所述装置包括:第一获取单元,被用于从备份服务数据库中获取备份文件目录;第二获取单元,被用于在云服务器中获取所述备份文件目录对应的第一文件属性信息列表;确定单元,被用于通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单;读取单元,被用于基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件,以备份所述待备份文件。
根据本公开实施例的一个方面,提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序包括可执行指令,当该可执行指令被处理器执行时,实现以下方法:从备份服务数据库中获取备份文件目录;在云服务器中获取所述备份文件目录对应的第一文件属性信息列表;通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单;基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件,以备份所述待备份文件。
根据本公开实施例的一个方面,提供了一种电子设备,包括:一个或多个处理器;存储器,用于存储所述处理器的可执行指令,当所述可执行指令被所述一个或多个处理器执行时,使得所述一个或多个处理器实现以下方法:从备份服务数据库中获取备份文件目录;在云服务器中获取所述备份文件目录对应的第一文件属性信息列表;通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单;基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件,以 备份所述待备份文件。
在本公开一些实施例的技术方案中,由于通过在备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表来获取待备份文件清单,故可以减少内存对比,从而减少在文件备份过程中对内存的占用,进而节约内存的使用率,保证文件在备份过程中的可靠性和安全性。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
附图说明
通过参照附图详细描述其示例性实施例,本公开的上述和其它特征及优点将变得更加明显。
图1示出了根据本公开一个实施例的云场景下的文件备份方法的应用场景示意图;
图2示出了根据本公开一个实施例的云场景下的文件备份方法的流程图;
图3示出了根据本公开一个实施例的在云服务器中获取所述备份文件目录对应的第一文件属性信息列表的细节流程图;
图4示出了根据本公开一个实施例的在向所述云服务器发送文件备份请求之前的方法流程图;
图5示出了根据本公开一个实施例的确定待备份文件清单的细节流程图;
图6示出了根据本公开一个实施例的确定待备份文件清单的细节流程图;
图7示出了根据本公开一个实施例的从云服务器中读取所述待备份文件清单对应的待备份文件的细节流程图;
图8示出了根据本公开一个实施例的从所述待备份文件清单中确定至少两个待备份文件子清单的细节流程图;
图9示出了根据本公开一个实施例的云场景下的文件备份装置的框图;
图10示出了根据本公开一个实施例的实现云场景下的文件备份方法的计算机可读存储介质;
图11示出了根据本公开一个实施例的实现云场景下的文件备份方法的电子设备示例框图。
具体实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本申请将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本申请的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本申请的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本申请的各方面。
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
还需要注意的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用 的对象在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在图示或描述的那些以外的顺序实施。
本申请的技术方案可应用于区块链和/或大数据技术领域,涉及的数据如文件、列表等可存储于服务器中,也可以存储于区块链中,比如通过区块链分布式存储,本申请不做限定。例如,云服务器可以为区块链中的节点。
首先,本公开对于云场景下的文件备份方法的应用场景进行简单说明。
在本申请的一个实施例中,云场景下的文件备份方法可以是实施在如图1所示的场景中,参照图1,示出了根据本公开一个实施例的云场景下的文件备份方法的应用场景示意图。
在图1中,示出了用户在云场景下对文件进行备份的应用场景。具体的,所述云场景下的文件备份方法可以是基于如图所示的备份服务器103来实现的,当然,如图所示的备份服务器也可以由平板电脑、笔记本电脑等具有触摸式屏幕的电子设备来替代。
还需要注意的是,所述云场景下的文件备份方法还可以由具有云计算功能的云服务器来执行。
具体的,所述云计算(cloud computing)是一种计算模式,它将计算任务分布在大量计算机构成的资源池上,使各种应用系统能够根据需要获取计算力、存储空间和信息服务。提供资源的网络被称为“云”。“云”中的资源在使用者看来是可以无限扩展的,并且可以随时获取,按需使用,随时扩展。通过建立云计算资源池(简称云平台,一般称为IaaS(Infrastructure as a Service,基础设施即服务)平台,在资源池中部署多种类型的虚拟资源,供外部客户选择使用。云计算资源池中主要包括:计算设备(为虚拟化机器,包含操作系统)、存储设备、网络设备。
在如图1所示例的场景中,用户可以通过用户终端101将文件备份需求发送给备份服务数据库102,备份服务数据102中随即产生一个文件备份任务,需要说明的是,该文件备份任务中记录了文件备份时间、文件备份次数、文件备份频率以及需备份文件的文件目录等信息。
备份服务器103可以从备份服务数据库102获取文件备份任务中的备份文件目录,并在云服务器104中获取所述备份文件目录对应的第一文件属性信息列表,然后通过在所述备份服务数据库102中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单,最后基于所述待备份文件清单,从云服务器104中读取所述待备份文件清单对应的待备份文件,以备份所述待备份文件。需要说明的是,第二文件属性信息列表中包括了已备份文件的文件属性信息,其存储于备份服务数据102中。
下面将结合图2对本申请实施例的技术方案的实现细节进行详细阐述:
参见图2,示出了根据本公开一个实施例的示出的云场景下的文件备份的流程图。该云场景下的文件备份方法可以由具有计算处理功能的实体设备或者虚拟设备来执行。如图2所示,该云场景下的文件备份方法至少包括步骤210至步骤270:
在步骤210中,从备份服务数据库中获取备份文件目录。
在本申请中,备份服务数据库中可以预先创建的,其主要用于存储用户发起的文件备份任务,其中,文件备份任务包括文件的备份时间,备份次数,备份频率以及待备份文件的文件目录。例如,A用户发起备份图片文件的文件备份任务,其中备份时间为2020年7月1日00时00分00秒,备份次数为8次,备份频率为每周一次,待备份图片文件所在的文件目录为在云服务器中的“目录1、目录2、目录3”。
此外,备份服务数据库还可以存储有用户在历史上的文件备份记录,文件备份记录中包括有第二文件属性信息列表(即历史上已备份文件的文件属性信息列表),其中,第二文件属性信息列表中包括了至少一个第二文件的文件属性信息,对于本领域技术人员而言, 应该理解的是,一个第二文件对应一个第二文件属性信息。
需要说明的是,如表1,为一个属性信息列表,在本申请中,每一个文件的文件属性信息可以包括文件名称、文件路径、文件大小,以及文件修改时间等属性信息中的一种或者多种。
文件编号 文件名称 文件路径 文件大小 文件修改时间
文件1 Picture1 路径1 2153KB 2020/7/1
文件2 Picture 2 路径2 2312KB 2020/7/2
…… …… …… …… ……
文件n Picture n 路径n 3278KB 2020/7/3
表1
还需要说明的是,如果用户在历史上没有进行过文件备份,则备份服务数据库中不包括有第二文件属性信息列表。
在步骤210中,主要是从备份服务数据库中获取备份文件目录,即待备份文件对应的文件目录。
在本申请中,可以通过备份文件目录在存储有用户文件的云服务器中找到用户需要备份的文件的存储位置。
继续参照图2,在步骤230中,在云服务器中获取所述备份文件目录对应的第一文件属性信息列表。
在本申请中,云服务器中一般存储用户的至少一个原始文件,每一个原始文件对应有一个文件属性信息,同样的,每一个原始文件对应的文件属性信息也可以是包括文件名称、文件路径、文件大小,以及文件修改时间等属性信息中的一种或者多种。
在本申请中,与备份文件目录对应的原始文件即为用户需要备份的文件对象,因此,在云服务器中获取所述备份文件目录对应的第一文件属性信息列表,即为用户需要备份的文件对应的文件属性信息列表,可以理解的是,第一文件属性信息列表中包括了至少一个第一文件的文件属性信息。
在本申请的一个实施例中,可以是在云服务器中一次性获取所述备份文件目录对应的第一文件属性信息列表。
在本申请的一个实施例中,在云服务器中获取所述备份文件目录对应的第一文件属性信息列表也可以按照如图3所示的步骤执行。
参见图3,示出了根据本公开一个实施例的在云服务器中获取所述备份文件目录对应的第一文件属性信息列表的细节流程图。具体包括步骤231至232:
在步骤231中,基于所述备份文件目录,向所述云服务器发送文件备份请求。
在步骤232中,分批次接收由云服务器发送的第一文件属性信息,得到所述第一文件属性信息列表。
在本申请中,所述云服务器在接收到文件备份请求之后,根据所述备份文件目录,可以在其自身的存储器中进行扫描,从而确定用户需要备份的原始文件(即第一文件),进而可以确定第一文件属性信息,得到第一文件属性信息列表。
云服务在得到第一文件属性信息列表之后,可以对第一文件属性信息列表中的第一文件属性信息进行分批次发送,其中,每一个批次发送第一文件属性信息列表中的一部分第一文件属性信息,例如,每一个批次发送1000个第一文件属性信息。
因此,在本实施例中,可以是基于所述备份文件目录,向所述云服务器发送文件备份请求,然后分批次接收由云服务器发送的第一文件属性信息,得到所述第一文件属性信息列表。其好处在于,通过分批次接收由云服务器发送的第一文件属性信息,可以防止因一次性接收数量过大的第一文件属性信息而造成网络拥塞的情况发生,进而保证了文件备份 的稳定性。
在本实施例中,在基于所述备份文件目录,向所述云服务器发送文件备份请求之前,还可以执行如图4所示的步骤。
参见图4,示出了根据本公开一个实施例的在向所述云服务器发送文件备份请求之前的方法流程图。具体包括步骤221至222:
在步骤221中,在云服务器中获取所述备份文件目录对应的第一列表哈希值,所述第一列表哈希值为所述第一文件属性信息列表映射的哈希值。
在步骤222中,在所述第一列表哈希值与所述备份服务数据库中的第二列表哈希值不一致时,基于所述备份文件目录,向所述云服务器发送文件备份请求,所述第二列表哈希值为所述第二文件属性信息列表映射的哈希值。
具体而言,在本申请中,向所述云服务器发送文件备份请求之前,可以向云服务器请求获取由所述备份文件目录对应的第一文件属性信息列表映射的第一列表哈希值,然后通过哈希算法计算备份服务数据库中第二文件属性信息列表的哈希值,得到第二列表哈希值。
在本申请中,需要注意的是,确定第二列表哈希值与确定第一列表哈希值的方式需要一致。
例如,如果从云服务器获得的第一列表哈希值是基于MD5算法得到的,那么,也就需要通过MD5算法对备份服务数据库中第二文件属性信息列表进行哈希处理,得到第二列表哈希值。
还例如,如果从云服务器获得的第一列表哈希值是基于SHA-1算法得到的,那么,也就需要通过SHA-1算法对备份服务数据库中第二文件属性信息列表进行哈希处理,得到第二列表哈希值。
鉴于哈希算法具有单向唯一的特性,在得到第二列表哈希值之后,可以将第二列表哈希值与第一列表哈希值进行对比,如果二者不一致,则说明相对于历史上已经备份的文件,云服务器中存储的文件已经发生了变化,需要对其进行备份,因此向所述云服务器发送文件备份请求,如果二者一致,则说明相对于历史上已经备份的文件,云服务器中存储的文件没有发生变化,不需要对其进行备份,因此不需要向所述云服务器发送文件备份请求。
通过执行步骤221至222的好处在于,只有在云服务器中存储的文件发生变化时才向云服务器发送文件备份请求,可以节约网络资源。
继续参照图2,在步骤250中,通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单。
在本申请中,所述第一文件属性信息列表中包括至少一个第一文件属性信息,所述第二文件属性信息列表中包括至少一个第二文件属性信息。
在本申请的一个实施例中,通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单,可以按照如图5所示的步骤执行。
参见图5,示出了根据本公开一个实施例的确定待备份文件清单的细节流程图。具体包括步骤251至252:
在步骤251中,在所述备份服务数据库中对比所述至少一个第一文件属性信息和所述至少一个第二文件属性信息,其中,所述第一文件属性信息为表征所述第一文件身份及关联参数的信息,所述第二文件属性信息为表征所述第二文件身份及关联参数的信息。
在步骤252中,在第一文件属性信息与任意一个第二文件属性信息不相同时,将所述第一文件属性信息对应的第一文件确定为待备份文件,得到待备份文件清单。
在本申请中,由于每一个文件的文件名称、文件路径、文件大小,以及文件修改时间等文件属性信息的组合都具有唯一性,所以,第一文件属性信息可以用于标识与其对应的第一文件的身份,第二文件属性信息可以用于标识与其对应的第二文件的身份。进一步的, 在所述备份服务数据库中对比所述至少一个第一文件属性信息和所述至少一个第二文件属性信息,则可以是对比第一文件属性信息和所述至少一个第二文件属性信息中的文件名称、文件路径、文件大小,以及文件修改时间等属性信息是否相同。具体的,例如,对于云服务器中的第一文件的“文件1”而言,其文件属性信息为:“Picture 1(文件名称)、路径1(文件路径)、3000KB(文件大小)、2020/6/5(文件修改时间)”,而对于第二文件的“文件1”而言,其文件属性信息为:“Picture 1(文件名称)、路径1(文件路径)、2000KB(文件大小)、2020/6/1(文件修改时间)”,可见,二者的文件大小和文件修改时间不一样,则说明相对于历史上已经备份过的“文件1”而言,云服务器中的“文件1”已经发生了变化,因此需要将云服务器中的“文件1”确定为待备份文件,以对其进行重新备份。
还例如,对于云服务器中的第一文件的“文件2”而言,其文件属性信息为:“Picture 2(文件名称)、路径2(文件路径)、1000KB(文件大小)、2020/6/6(文件修改时间)”,而在第二文件属性信息中不存在“文件2”的文件属性信息,这说明云服务器中的“文件2”是新增文件,因此需要将云服务器中的“文件2”确定为待备份文件,以对其进行重新备份。
在本申请的一个实施例中,通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单,还可以按照如图6所示的步骤执行。
参见图6,示出了根据本公开一个实施例的确定待备份文件清单的细节流程图。具体包括步骤253至256:
在步骤253中,分别确定所述至少一个第一文件属性信息映射的哈希值,得到至少一个第一属性哈希值。
在步骤254中,分别确定所述至少一个第二文件属性信息映射的哈希值,得到至少一个第二属性哈希值。
在步骤255中,在所述备份服务数据库中对比所述至少一个第一属性哈希值和所述至少一个第二属性哈希值。
在步骤256中,在第一属性哈希值与任意一个第二属性哈希值不相同时,将所述第一属性哈希值对应的第一文件确定为待备份文件,得到待备份文件清单。
在本申请中,备份服务数据库中可以记录有每一个第二文件的第二文件属性信息映射的哈希值,即第二属性哈希值。并且,也可以通过哈希算法确定每一个第一文件的第一文件属性信息映射的哈希值,即第一属性哈希值。由于哈希值的单向唯一性,所以可以仅仅通过在备份服务数据库中对比所述至少一个第一属性哈希值和所述至少一个第二属性哈希值是否相同,来确定待备份文件清单。
具体的,例如,对于云服务器中的第一文件的“文件1”而言,其第一属性哈希值为“哈希值1”,而在第二属性哈希值中不存在“哈希值1”,则说明云服务器中的“文件1”为新增文件或者是被修改过的文件,因此需要将云服务器中的“文件1”确定为待备份文件,以对其进行重新备份。
这样做的好处在于,由于仅仅对比一个哈希值而不需要对比全部的文件属性信息,因此在对比第二文件属性信息列表和所述第一文件属性信息列表时,可以减少对比过程中所需调用的计算机资源。
此外,在上述两个实施例中,通过在备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,而不需要占用内存来对二者进行对比,因此可以减少文件在备份过程中对内存的占用,进而节约内存的使用率,保证文件在备份过程中的可靠性和安全性。
继续参照图2,在步骤270中,基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件,以备份所述待备份文件。
在本申请的一个实施例中,基于所述待备份文件清单,从云服务器中读取所述待备份 文件清单对应的待备份文件,可以按照如图7所示的步骤执行。
参见图7,示出了根据本公开一个实施例的从云服务器中读取所述待备份文件清单对应的待备份文件的细节流程图。具体包括步骤271至274:
在步骤271中,从所述待备份文件清单中确定至少两个待备份文件子清单。
在一个实施例的具体实现中,从所述待备份文件清单中确定至少两个待备份文件子清单可以按照如图8所示的步骤执行。
参见图8,示出了根据本公开一个实施例的从所述待备份文件清单中确定至少两个待备份文件子清单的细节流程图。具体包括步骤2711至2712:
在步骤2711中,确定所述待备份文件清单中待备份文件的个数和每一个待备份文件的文件大小。
在步骤2712中,根据待备份文件的个数和每一个待备份文件的文件大小,对所述待备份文件进行分组,得到至少两个待备份文件子清单。
在本申请中,可以根据待备份文件的个数和每一个待备份文件的文件大小,按照均衡分组的原则,对所述待备份文件进行分组。
具体的,例如,待备份文件清单中待备份文件的个数为5个,其文件大小分别为“待备份文件1:1000KB”、“待备份文件2:1000KB”、“待备份文件3:1000KB”、“待备份文件4:2000KB”、“待备份文件5:1000KB”。在对所述待备份文件进行分组时,如果分为两组,由于备份文件1、待备份文件2、待备份文件3的总文件大小为3000KB,备份文件4、待备份文件5的总文件大小为3000KB,因此,可以将待备份文件1、待备份文件2、待备份文件3分为一组,得到待备份文件子清单1,将备份文件4和待备份文件5分为一组,得到待备份文件子清单2。
在本申请中,根据待备份文件的个数和每一个待备份文件的文件大小,按照均衡分组的原则,对所述待备份文件进行分组的好处在于,可以保证每一个待备份文件子清单对应待备份文件之间的文件大小相差不大。
继续参照图7,在步骤272中,分别创建与各个待备份文件子清单一一对应的待备份文件读取任务。
具体的,例如,可以是为上述待备份文件子清单1创建一个待备份文件读取任务1、为上述待备份文件子清单2创建一个待备份文件读取任务2。
在步骤273中,将各个所述待备份文件读取任务分发给至少两个文件读取线程。
在步骤274中,并发执行所述至少两个文件读取线程,以在所述云服务器中读取所述待备份文件清单对应的待备份文件。
在上述步骤274中,可以通过文件备份子清单中的文件个数和文件大小两个维度来控制文件备份过程中的网络流量,即根据网络中能够提供的带宽控制并发执行读取线程的个数,如果并发执行所有文件读取线程时所需要的总流量大于网络中能够提供的带宽,那么控制并发执行部分文件读取线程,保证充分利用网络中能够提供的带宽,而针对剩余的部分文件读取线程,则进行排队处理。
在上述步骤274中,在多线程的文件读取过程中,还可以检测每一个线程的运行情况,当存在线程出错时,可以将该出错线程对应的文件备份任务分发给其它线程。
在本实施例中,通过并发执行至少两个文件读取线程备份云服务器中的待备份文件,可以缩短文件备份时间,提高文件备份效率。
在本申请中,在备份全部的目标备份文件之后,还可以对已备份文件进行校验,以确认云服务器中是否存在未备份的文件。
综上所述,在本公开一些实施例的技术方案中,通过从备份服务数据库中获取的备份文件目录在云服务器中获取第一文件属性信息列表,并在备份服务数据库中对第二文件属 性信息列表和所述第一文件属性信息列表进行对比,可以确定待备份文件清单,以根据待备份文件清单从云服务器中读取对应的待备份文件。由于通过在备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表来获取待备份文件清单,故可以减少内存对比,从而减少在文件备份过程中对内存的占用,进而节约内存的使用率,保证文件在备份过程中的可靠性和安全性。
以下介绍本公开的装置实施例,可以用于执行本公开上述实施例中的云场景下的文件备份方法。对于本公开装置实施例中未披露的细节,请参照本公开上述的云场景下的文件备份方法的实施例。
图9示出了根据本公开一个实施例的云场景下的文件备份装置的框图。
参照图9所示,根据本公开的一个实施例的云场景下的文件备份装置900,所述装置包括:第一获取单元901,第二获取单元902,确定单元903和读取单元904。
其中,第一获取单元901,被用于从备份服务数据库中获取备份文件目录;第二获取单元902,被用于在云服务器中获取所述备份文件目录对应的第一文件属性信息列表;确定单元903,被用于通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单;读取单元904,被用于基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件,以备份所述待备份文件。
在本公开的一些实施例中,基于前述方案,所述第一获取单元901包括:发送单元,被用于基于所述备份文件目录,向所述云服务器发送文件备份请求;接收单元,被用于分批次接收由云服务器发送的第一文件属性信息,得到所述第一文件属性信息列表。
在本公开的一些实施例中,基于前述方案,所述装置还包括第三获取单元,被用于在基于所述备份文件目录,向所述云服务器发送文件备份请求之前,在云服务器中获取所述备份文件目录对应的第一列表哈希值,所述第一列表哈希值为所述第一文件属性信息列表映射的哈希值;所述发送单元配置为:在所述第一列表哈希值与所述备份服务数据库中的第二列表哈希值不一致时,基于所述备份文件目录,向所述云服务器发送文件备份请求,所述第二列表哈希值为所述第二文件属性信息列表映射的哈希值。
在本公开的一些实施例中,基于前述方案,所述第一文件属性信息列表中包括至少一个第一文件属性信息,所述第二文件属性信息列表中包括至少一个第二文件属性信息,所述确定单元903配置为:在所述备份服务数据库中对比所述至少一个第一文件属性信息和所述至少一个第二文件属性信息,其中,所述第一文件属性信息为表征所述第一文件身份及关联参数的信息,所述第二文件属性信息为表征所述第二文件身份及关联参数的信息;在第一文件属性信息与任意一个第二文件属性信息不相同时,将所述第一文件属性信息对应的第一文件确定为待备份文件,得到待备份文件清单。
在本公开的一些实施例中,基于前述方案,所述第一文件属性信息列表中包括至少一个第一文件属性信息,所述第二文件属性信息列表中包括至少一个第二文件属性信息,所述确定单元903配置为:分别确定所述至少一个第一文件属性信息映射的哈希值,得到至少一个第一属性哈希值;分别确定所述至少一个第二文件属性信息映射的哈希值,得到至少一个第二属性哈希值;在所述备份服务数据库中对比所述至少一个第一属性哈希值和所述至少一个第二属性哈希值;在第一属性哈希值与任意一个第二属性哈希值不相同时,将所述第一属性哈希值对应的第一文件确定为待备份文件,得到待备份文件清单。
在本公开的一些实施例中,基于前述方案,所述读取单元904配置为:从所述待备份文件清单中确定至少两个待备份文件子清单;分别创建与各个待备份文件子清单一一对应的待备份文件读取任务;将各个所述待备份文件读取任务分发给至少两个文件读取线程;并发执行所述至少两个文件读取线程,以在所述云服务器中读取所述待备份文件清单对应的待备份文件。
在本公开的一些实施例中,基于前述方案,所述读取单元904配置为:确定所述待备份文件清单中待备份文件的个数和每一个待备份文件的文件大小;根据待备份文件的个数和每一个待备份文件的文件大小,对所述待备份文件进行分组,得到至少两个待备份文件子清单。
应当注意,尽管在上文详细描述中提及了云场景下的文件备份方法以及云场景下的文件备份装置的若干单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多单元和功能可以在一个单元中具体化。反之,上文描述的一个单元的特征和功能可以进一步划分为由多个单元来具体化。作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本公开方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
作为另一方面,本公开还提供了一种计算机可读存储介质,其存储有计算机程序指令,当所述计算机程序指令被计算机执行时,使计算机执行上述方法。也即,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本公开的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。
可选的,本申请涉及的介质如计算机可读存储介质等可以是非易失性的,也可以是易失性的。
参考图10所示,描述了根据本公开的实施方式的用于实现上述方法的程序产品1000,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本公开的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言的任意组合来编写用于执行本公开操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务 提供商来通过因特网连接)。
作为另一方面,本公开还提供了一种能够实现上述方法的电子设备。
所属技术领域的技术人员能够理解,本公开的各个方面可以实现为系统、方法或程序产品。因此,本公开的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。
下面参照图11来描述根据本公开的这种实施方式的电子设备1100。图11显示的电子设备1100仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图11所示,电子设备1100以通用计算设备的形式表现。电子设备1100的组件可以包括但不限于:上述至少一个处理单元1110、上述至少一个存储单元1120、连接不同系统组件(包括存储单元1120和处理单元1110)的总线1130。
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元1110执行,使得所述处理单元1110执行本说明书上述“实施例方法”部分中描述的根据本公开各种示例性实施方式的步骤。
存储单元1120可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)1121和/或高速缓存存储单元1122,还可以进一步包括只读存储单元(ROM)1123。
存储单元1120还可以包括具有一组(至少一个)程序模块1125的程序/实用工具1124,这样的程序模块1125包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线1130可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备1100也可以与一个或多个外部设备1200(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备1100交互的设备通信,和/或与使得该电子设备1100能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口1150进行。并且,电子设备1100还可以通过网络适配器1160与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器1160通过总线1130与电子设备1100的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备1100使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。
此外,上述附图仅是根据本公开示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围执行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (20)

  1. 一种云场景下的文件备份方法,其中,所述方法包括:
    从备份服务数据库中获取备份文件目录;
    在云服务器中获取所述备份文件目录对应的第一文件属性信息列表;
    通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单;
    基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件,以备份所述待备份文件。
  2. 根据权利要求1所述的方法,其中,所述在云服务器中获取所述备份文件目录对应的第一文件属性信息列表,包括:
    基于所述备份文件目录,向所述云服务器发送文件备份请求;
    分批次接收由云服务器发送的第一文件属性信息,得到所述第一文件属性信息列表。
  3. 根据权利要求2所述的方法,其中,在基于所述备份文件目录,向所述云服务器发送文件备份请求之前,所述方法还包括:
    在云服务器中获取所述备份文件目录对应的第一列表哈希值,所述第一列表哈希值为所述第一文件属性信息列表映射的哈希值;
    在所述第一列表哈希值与所述备份服务数据库中的第二列表哈希值不一致时,基于所述备份文件目录,向所述云服务器发送文件备份请求,所述第二列表哈希值为所述第二文件属性信息列表映射的哈希值。
  4. 根据权利要求1所述的方法,其中,所述第一文件属性信息列表中包括至少一个第一文件属性信息,所述第二文件属性信息列表中包括至少一个第二文件属性信息,所述通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单,包括:
    在所述备份服务数据库中对比所述至少一个第一文件属性信息和所述至少一个第二文件属性信息,其中,所述第一文件属性信息为表征所述第一文件身份及关联参数的信息,所述第二文件属性信息为表征所述第二文件身份及关联参数的信息;
    在第一文件属性信息与任意一个第二文件属性信息不相同时,将所述第一文件属性信息对应的第一文件确定为待备份文件,得到待备份文件清单。
  5. 根据权利要求1所述的方法,其中,所述第一文件属性信息列表中包括至少一个第一文件属性信息,所述第二文件属性信息列表中包括至少一个第二文件属性信息,所述通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单,包括:
    分别确定所述至少一个第一文件属性信息映射的哈希值,得到至少一个第一属性哈希值;
    分别确定所述至少一个第二文件属性信息映射的哈希值,得到至少一个第二属性哈希值;
    在所述备份服务数据库中对比所述至少一个第一属性哈希值和所述至少一个第二属性哈希值;
    在第一属性哈希值与任意一个第二属性哈希值不相同时,将所述第一属性哈希值对应的第一文件确定为待备份文件,得到待备份文件清单。
  6. 根据权利要求1所述的方法,其中,所述基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件,包括:
    从所述待备份文件清单中确定至少两个待备份文件子清单;
    分别创建与各个待备份文件子清单一一对应的待备份文件读取任务;
    将各个所述待备份文件读取任务分发给至少两个文件读取线程;
    并发执行所述至少两个文件读取线程,以在所述云服务器中读取所述待备份文件清单对应的待备份文件。
  7. 根据权利要求6所述的方法,其中,所述从所述待备份文件清单中确定至少两个待备份文件子清单,包括:
    确定所述待备份文件清单中待备份文件的个数和每一个待备份文件的文件大小;
    根据待备份文件的个数和每一个待备份文件的文件大小,对所述待备份文件进行分组,得到至少两个待备份文件子清单。
  8. 一种云场景下的文件备份装置,其中,所述装置包括:
    第一获取单元,被用于从备份服务数据库中获取备份文件目录;
    第二获取单元,被用于在云服务器中获取所述备份文件目录对应的第一文件属性信息列表;
    确定单元,被用于通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单;
    读取单元,被用于基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件,以备份所述待备份文件。
  9. 一种计算机可读程序介质,其中,其存储有计算机程序指令,当所述计算机程序指令被计算机执行时,使计算机执行以下方法:
    从备份服务数据库中获取备份文件目录;
    在云服务器中获取所述备份文件目录对应的第一文件属性信息列表;
    通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单;
    基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件,以备份所述待备份文件。
  10. 根据权利要求9所述的计算机可读程序介质,其中,所述在云服务器中获取所述备份文件目录对应的第一文件属性信息列表时,具体执行:
    基于所述备份文件目录,向所述云服务器发送文件备份请求;
    分批次接收由云服务器发送的第一文件属性信息,得到所述第一文件属性信息列表。
  11. 根据权利要求10所述的计算机可读程序介质,其中,在基于所述备份文件目录,向所述云服务器发送文件备份请求之前,所述计算机程序指令被计算机执行时还使计算机执行:
    在云服务器中获取所述备份文件目录对应的第一列表哈希值,所述第一列表哈希值为所述第一文件属性信息列表映射的哈希值;
    在所述第一列表哈希值与所述备份服务数据库中的第二列表哈希值不一致时,基于所述备份文件目录,向所述云服务器发送文件备份请求,所述第二列表哈希值为所述第二文件属性信息列表映射的哈希值。
  12. 根据权利要求9所述的计算机可读程序介质,其中,所述第一文件属性信息列表中包括至少一个第一文件属性信息,所述第二文件属性信息列表中包括至少一个第二文件属性信息,所述通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单时,具体执行:
    在所述备份服务数据库中对比所述至少一个第一文件属性信息和所述至少一个第二文件属性信息,其中,所述第一文件属性信息为表征所述第一文件身份及关联参数的信息,所述第二文件属性信息为表征所述第二文件身份及关联参数的信息;
    在第一文件属性信息与任意一个第二文件属性信息不相同时,将所述第一文件属性信 息对应的第一文件确定为待备份文件,得到待备份文件清单。
  13. 根据权利要求9所述的计算机可读程序介质,其中,所述第一文件属性信息列表中包括至少一个第一文件属性信息,所述第二文件属性信息列表中包括至少一个第二文件属性信息,所述通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单时,具体执行:
    分别确定所述至少一个第一文件属性信息映射的哈希值,得到至少一个第一属性哈希值;
    分别确定所述至少一个第二文件属性信息映射的哈希值,得到至少一个第二属性哈希值;
    在所述备份服务数据库中对比所述至少一个第一属性哈希值和所述至少一个第二属性哈希值;
    在第一属性哈希值与任意一个第二属性哈希值不相同时,将所述第一属性哈希值对应的第一文件确定为待备份文件,得到待备份文件清单。
  14. 根据权利要求9所述的计算机可读程序介质,其中,所述基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件时,具体执行:
    从所述待备份文件清单中确定至少两个待备份文件子清单;
    分别创建与各个待备份文件子清单一一对应的待备份文件读取任务;
    将各个所述待备份文件读取任务分发给至少两个文件读取线程;
    并发执行所述至少两个文件读取线程,以在所述云服务器中读取所述待备份文件清单对应的待备份文件。
  15. 一种电子设备,其中,所述电子设备包括:
    处理器;
    存储器,所述存储器上存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,实现以下方法:
    从备份服务数据库中获取备份文件目录;
    在云服务器中获取所述备份文件目录对应的第一文件属性信息列表;
    通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单;
    基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件,以备份所述待备份文件。
  16. 根据权利要求15所述的电子设备,其中,所述在云服务器中获取所述备份文件目录对应的第一文件属性信息列表时,具体实现:
    基于所述备份文件目录,向所述云服务器发送文件备份请求;
    分批次接收由云服务器发送的第一文件属性信息,得到所述第一文件属性信息列表。
  17. 根据权利要求16所述的电子设备,其中,在基于所述备份文件目录,向所述云服务器发送文件备份请求之前,所述处理器还用于实现:
    在云服务器中获取所述备份文件目录对应的第一列表哈希值,所述第一列表哈希值为所述第一文件属性信息列表映射的哈希值;
    在所述第一列表哈希值与所述备份服务数据库中的第二列表哈希值不一致时,基于所述备份文件目录,向所述云服务器发送文件备份请求,所述第二列表哈希值为所述第二文件属性信息列表映射的哈希值。
  18. 根据权利要求15所述的电子设备,其中,所述第一文件属性信息列表中包括至少一个第一文件属性信息,所述第二文件属性信息列表中包括至少一个第二文件属性信息,所述通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列 表,确定待备份文件清单时,具体实现:
    在所述备份服务数据库中对比所述至少一个第一文件属性信息和所述至少一个第二文件属性信息,其中,所述第一文件属性信息为表征所述第一文件身份及关联参数的信息,所述第二文件属性信息为表征所述第二文件身份及关联参数的信息;
    在第一文件属性信息与任意一个第二文件属性信息不相同时,将所述第一文件属性信息对应的第一文件确定为待备份文件,得到待备份文件清单。
  19. 根据权利要求15所述的电子设备,其中,所述第一文件属性信息列表中包括至少一个第一文件属性信息,所述第二文件属性信息列表中包括至少一个第二文件属性信息,所述通过在所述备份服务数据库中对比第二文件属性信息列表和所述第一文件属性信息列表,确定待备份文件清单时,具体实现:
    分别确定所述至少一个第一文件属性信息映射的哈希值,得到至少一个第一属性哈希值;
    分别确定所述至少一个第二文件属性信息映射的哈希值,得到至少一个第二属性哈希值;
    在所述备份服务数据库中对比所述至少一个第一属性哈希值和所述至少一个第二属性哈希值;
    在第一属性哈希值与任意一个第二属性哈希值不相同时,将所述第一属性哈希值对应的第一文件确定为待备份文件,得到待备份文件清单。
  20. 根据权利要求15所述的电子设备,其中,所述基于所述待备份文件清单,从云服务器中读取所述待备份文件清单对应的待备份文件时,具体实现:
    从所述待备份文件清单中确定至少两个待备份文件子清单;
    分别创建与各个待备份文件子清单一一对应的待备份文件读取任务;
    将各个所述待备份文件读取任务分发给至少两个文件读取线程;
    并发执行所述至少两个文件读取线程,以在所述云服务器中读取所述待备份文件清单对应的待备份文件。
PCT/CN2020/117777 2020-07-28 2020-09-25 云场景下的文件备份方法、装置、介质、电子设备 WO2021139224A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010739622.1A CN111880967A (zh) 2020-07-28 2020-07-28 云场景下的文件备份方法、装置、介质和电子设备
CN202010739622.1 2020-07-28

Publications (1)

Publication Number Publication Date
WO2021139224A1 true WO2021139224A1 (zh) 2021-07-15

Family

ID=73200370

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117777 WO2021139224A1 (zh) 2020-07-28 2020-09-25 云场景下的文件备份方法、装置、介质、电子设备

Country Status (2)

Country Link
CN (1) CN111880967A (zh)
WO (1) WO2021139224A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835747B (zh) * 2021-02-24 2023-08-04 上海泰宇信息技术股份有限公司 一种无客户端远程备份方法
CN112882866B (zh) * 2021-02-24 2023-12-15 上海泰宇信息技术股份有限公司 一种适用于海量文件的备份方法
CN114422509B (zh) * 2022-04-01 2022-07-26 天津联想协同科技有限公司 文件自动备份方法、装置、网盘及存储介质
CN115269276A (zh) * 2022-08-10 2022-11-01 广州鼎甲计算机科技有限公司 增量备份方法、装置、计算机设备及其存储介质
CN115794491A (zh) * 2022-11-30 2023-03-14 广州市保伦电子有限公司 数据库文件备份方法、装置、设备及存储介质
CN116319762B (zh) * 2023-05-18 2023-08-04 华夏卓越(天津)科技有限公司 局域网内文件批量复制方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252397A (zh) * 2013-06-27 2014-12-31 广州中国科学院软件应用技术研究所 支持云平台用户文件自动备份的实现方法
CN104503864A (zh) * 2014-11-20 2015-04-08 北京世纪高蓝科技有限公司 一种基于局域网的文件备份方法和装置
US20160014107A1 (en) * 2014-07-10 2016-01-14 Canon Kabushiki Kaisha Data synchronizing system, control method thereof, authorization server, and storage medium thereof
CN106131123A (zh) * 2016-06-21 2016-11-16 福建星网视易信息系统有限公司 三层架构的远程资源同步方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182294A (zh) * 2013-05-23 2014-12-03 华为技术有限公司 一种文件备份、文件恢复方法及装置
CN104410683B (zh) * 2014-11-21 2017-10-17 四川神琥科技有限公司 一种数据备份方法
CN107145409A (zh) * 2017-05-31 2017-09-08 广州鼎甲计算机科技有限公司 一种文件多通道备份的方法
CN111104258A (zh) * 2019-12-23 2020-05-05 北京金山云网络技术有限公司 MongoDB数据库的备份方法、装置及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104252397A (zh) * 2013-06-27 2014-12-31 广州中国科学院软件应用技术研究所 支持云平台用户文件自动备份的实现方法
US20160014107A1 (en) * 2014-07-10 2016-01-14 Canon Kabushiki Kaisha Data synchronizing system, control method thereof, authorization server, and storage medium thereof
CN104503864A (zh) * 2014-11-20 2015-04-08 北京世纪高蓝科技有限公司 一种基于局域网的文件备份方法和装置
CN106131123A (zh) * 2016-06-21 2016-11-16 福建星网视易信息系统有限公司 三层架构的远程资源同步方法及系统

Also Published As

Publication number Publication date
CN111880967A (zh) 2020-11-03

Similar Documents

Publication Publication Date Title
WO2021139224A1 (zh) 云场景下的文件备份方法、装置、介质、电子设备
US11467755B2 (en) Method and system for enabling agentless backup and restore operations on a container orchestration platform
US9122642B2 (en) Hybrid data backup in a networked computing environment
US8375200B2 (en) Embedded device and file change notification method of the embedded device
US10572350B1 (en) System and method for improved application consistency in a distributed environment
US10732886B2 (en) Application distributed optimal backup model
US10452502B2 (en) Handling node failure in multi-node data storage systems
US20200125452A1 (en) Systems and methods for cross-regional back up of distributed databases on a cloud service
CN110633046A (zh) 一种分布式系统的存储方法、装置、存储设备及存储介质
CN107566470B (zh) 云数据系统中管理虚拟机的方法和装置
CN110413369B (zh) 用于虚拟化环境中的备份的系统和方法
US11093350B2 (en) Method and system for an optimized backup data transfer mechanism
US10503428B2 (en) System and method for concurrent multipoint backup
US10698719B2 (en) System and method for virtual machine restoration
US9591060B1 (en) Transferring applications between computer systems
US10146471B1 (en) Offloaded data protection based on virtual machine snapshots
WO2022199206A1 (zh) 用于虚拟机的内存共享方法及装置
US10091298B2 (en) Enhancing performance of data storage in a dispersed storage network
US10310889B1 (en) Data statistics service
CN110955558A (zh) 用于向高可用性应用程序提供备份服务的系统和方法
US11797287B1 (en) Automatically terminating deployment of containerized applications
US11409613B1 (en) System and method for raw disk backup and recovery
EP3690655A1 (en) Method and system to tag and route the striped backups to a single deduplication instance on a deduplication appliance
US20240028477A1 (en) Systems and methods for backing up clustered and non-clustered data
US10922008B2 (en) System and method for backup of virtual machines organized using logical layers

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20911726

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20911726

Country of ref document: EP

Kind code of ref document: A1