A method, device, apparatus and storage medium for processing backup data
Patent Information
- Application Number
- CN202211183951.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2042-09-27
AI Technical Summary
[0006]本申请实施例提供了一种处理备份数据的方法、装置、设备及存储介质,用于解决使用数据泵对数据库进行数据备份时,处理得到的备份数据的局限性较大的问题
[0053]本申请实施例中,接收客户端发送的数据泵备份指令,并基于数据泵备份指令,从服务端关联的数据库中,导出多个待备份数据;将多个待备份数据备份在附加存储空间,其中,附加存储空间是客户端和服务端通过相同的映射地址关联的一个存储空间,附加存储空间关联设置有客户端的数据处理权限,数据处理权限表征客户端有权对附加存储空间中的数据进行数据处理。在通过数据泵将数据库中的待备份数据备份至客户端时,将附加存储空间与客户端和服务端相关联后将数据备份在附加存储空间中,使得客户端能够在附加存储空间中查找到备份数据,解决了使用服务端的工具程序数据泵将待备份数据备份至客户端时,由于客户端存在权限问题,无法发现备份数据的问题。附加存储空间关联设置数据处理权限,在客户端对备份数据进行数据处理时,使客户端具有数据处理的权限,能够根据数据处理命令对备份数据进行删除、整合等处理。
Smart Images

Figure CN115629907B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data analysis, and more particularly to a method, apparatus, device, and storage medium for processing backup data. Background Technology
[0002] With the rapid development of the computer field, there are increasingly more methods for database backup, such as full backup, transaction log backup, and file backup. Since deletion operations in a database are irreversible, if data is accidentally deleted from a table or if database problems lead to data loss, it is necessary to process the backup data and re-enter the data from scratch. This re-entry workload is excessive, especially with large datasets. Backup data can also be processed, allowing for operations such as data consolidation.
[0003] In related technologies, taking Oracle databases as an example, the server-side utility Data Pump can be used for database backup. Data Pump backup involves performing import and export operations on the server side; that is, after creating a new logical directory, Data Pump exports data to the newly created logical directory for backup. When users need to process the backup data, the server can respond to processing commands to perform data processing on the backup data.
[0004] However, since Data Pump is a server-side application, using it on the client side can lead to problems such as the client being unable to detect or process the data generated by Data Pump operations. Because the Data Pump method cannot perform backups or process backup data on the client side, the resulting backup data is significantly limited when using Data Pump to back up a database.
[0005] It is evident that, among related technologies, the backup data obtained when using Data Pump to back up a database has significant limitations. Summary of the Invention
[0006] This application provides a method, apparatus, device, and storage medium for processing backup data, which addresses the problem that the backup data obtained when using Data Pump to back up a database has significant limitations.
[0007] Firstly, a method for processing backup data is provided, including:
[0008] Receive a data pump backup command sent by the client, and based on the data pump backup command, export multiple data to be backed up from the database associated with the server;
[0009] The multiple data to be backed up are backed up in an additional storage space, wherein the additional storage space is a storage space associated with the client and the server through the same mapping address, and the additional storage space is associated with the client's data processing permissions, which indicate that the client has the right to process the data in the additional storage space;
[0010] When a data processing instruction sent by the client is received, and it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, the at least one data to be processed is retrieved from the additional storage space and returned to the client.
[0011] Optionally, backing up the plurality of data to be backed up in the additional storage space includes:
[0012] Create a virtual directory on the server, wherein the path of the virtual directory points to the mapped address;
[0013] Based on the quantity of the multiple data to be backed up, create multiple empty files in the virtual directory;
[0014] The multiple data to be backed up are backed up in multiple empty files to obtain multiple backup files.
[0015] Optionally, backing up the multiple data to be backed up in the multiple empty files to obtain multiple backup files includes:
[0016] For the multiple data sets to be backed up, perform the following operations:
[0017] Based on the data name of the data to be backed up, name one empty file that does not have a file name among the multiple empty files to obtain the file name of the empty file;
[0018] Based on the filename of the empty file, the data to be backed up is saved in the empty file to obtain a backup file.
[0019] Optionally, after saving the data to be backed up in the empty file based on the filename of the empty file to obtain a backup file, the method further includes:
[0020] A backup identifier is set for the backup file, wherein the backup identifier is used to indicate that the backup file contains the data to be backed up;
[0021] Set the data processing permissions for the client associated with the backup file.
[0022] Optionally, the additional storage space contains multiple backup files, each backup file is associated with a backup identifier, the backup identifier being used to indicate that the corresponding backup file contains corresponding data to be backed up;
[0023] When it is determined that at least one piece of data to be processed, as indicated by the data processing instruction, is stored in the additional storage space, retrieving the at least one piece of data to be processed from the additional storage space includes:
[0024] When it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, the plurality of backup files associated with backup identifiers in the additional storage space are determined;
[0025] Obtain at least one piece of data to be processed from the plurality of backup files.
[0026] Optionally, after backing up the plurality of data to be backed up to the additional storage space, the method further includes:
[0027] Upon receiving a data deletion instruction sent by the client, and determining that at least one data to be deleted indicated by the data deletion instruction is stored in the additional storage space, the at least one data to be deleted is deleted from the additional storage space.
[0028] Secondly, an apparatus for processing backup data is provided, comprising:
[0029] Acquisition module: Receives the data pump backup command sent by the client, and based on the data pump backup command, exports multiple data to be backed up from the database associated with the server;
[0030] Processing module: Backs up the multiple data to be backed up in an additional storage space, wherein the additional storage space is a storage space associated with the client and the server through the same mapping address, and the additional storage space is associated with the client's data processing permissions, and the client has the right to process the data in the additional storage space;
[0031] The processing module is further configured to: receive a data processing instruction sent by the client, and when it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, retrieve the at least one data to be processed from the additional storage space, and return the at least one data to be processed to the client.
[0032] Optionally, the processing module is specifically used for:
[0033] Create a virtual directory on the server, wherein the path of the virtual directory points to the mapped address;
[0034] Based on the quantity of the multiple data to be backed up, create multiple empty files in the virtual directory;
[0035] The multiple data to be backed up are backed up in multiple empty files to obtain multiple backup files.
[0036] Optionally, the processing module is specifically used for:
[0037] For the multiple data sets to be backed up, perform the following operations:
[0038] Based on the data name of the data to be backed up, name one empty file that does not have a file name among the multiple empty files to obtain the file name of the empty file;
[0039] Based on the filename of the empty file, the data to be backed up is saved in the empty file to obtain a backup file.
[0040] Optionally, the processing module is further configured to:
[0041] After saving the data to be backed up in the empty file based on the file name of the empty file to obtain a backup file, a backup identifier is set for the backup file, wherein the backup identifier is used to indicate that the backup file contains the data to be backed up;
[0042] Set the data processing permissions for the client associated with the backup file.
[0043] Optionally, the additional storage space contains multiple backup files, each backup file is associated with a backup identifier, the backup identifier being used to indicate that the corresponding backup file contains corresponding data to be backed up, and the processing module is specifically used for:
[0044] When it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, the plurality of backup files associated with backup identifiers in the additional storage space are determined;
[0045] Obtain at least one piece of data to be processed from the plurality of backup files.
[0046] Optionally, the processing module is further configured to:
[0047] After backing up the plurality of data to be backed up in the additional storage space, when a data deletion instruction sent by the client is received, and it is determined that at least one data to be deleted indicated by the data deletion instruction is stored in the additional storage space, the at least one data to be deleted is deleted from the additional storage space.
[0048] Thirdly, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0049] Fourthly, a computer device is provided, comprising:
[0050] Memory, used to store program instructions;
[0051] A processor is configured to invoke program instructions stored in the memory and execute the method described in the first aspect according to the obtained program instructions.
[0052] Fifthly, a computer-readable storage medium is provided, the computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method as described in the first aspect.
[0053] In this embodiment, a data pump backup command sent by the client is received, and based on the data pump backup command, multiple data sets to be backed up are exported from the database associated with the server. These multiple data sets are then backed up in an additional storage space. This additional storage space is a storage space associated with the client and server through the same mapping address. The additional storage space is associated with and has data processing permissions set for the client, indicating that the client has the right to process the data in the additional storage space. When backing up data from the database to the client using Data Pump, associating the additional storage space with the client and server and then backing up the data in the additional storage space allows the client to find the backup data in the additional storage space. This solves the problem that when using the server-side tool program Data Pump to back up data to the client, the client cannot find the backup data due to permission issues. The data processing permissions associated with the additional storage space grant the client data processing permissions, enabling it to perform operations such as deletion and integration of the backup data according to data processing commands.
[0054] Furthermore, upon receiving a data processing instruction from the client and determining that at least one piece of data to be processed, as indicated by the instruction, is stored in the additional storage space, the server retrieves at least one piece of data to be processed from the additional storage space and returns it to the client. Since the additional storage space is associated with the client's data processing permissions, upon receiving the data processing instruction from the client, the server can retrieve at least one piece of data to be processed from the additional storage space and return it to the client. The client can then process the retrieved data as needed. Attached Figure Description
[0055] Figure 1This is one application scenario of the method for processing backup data provided in the embodiments of this application;
[0056] Figure 2 A flowchart illustrating a method for processing backup data provided in an embodiment of this application. Figure 1 ;
[0057] Figure 3 A flowchart illustrating a method for processing backup data provided in an embodiment of this application. Figure 2 ;
[0058] Figure 4 A schematic diagram illustrating the principle of a method for processing backup data provided in an embodiment of this application;
[0059] Figure 5 A flowchart illustrating a method for processing backup data provided in an embodiment of this application. Figure 3 ;
[0060] Figure 6 A schematic diagram of the structure of the apparatus for processing backup data provided in the embodiments of this application. Figure 1 ;
[0061] Figure 7 A schematic diagram of the structure of the apparatus for processing backup data provided in the embodiments of this application. Figure 2 . Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0063] It should be noted that in the embodiments of this application, the acquisition of data to be backed up and other related data is involved. When the above embodiments of this application are applied to specific products or technologies, each acquisition of data requires user permission or consent, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0064] The application fields of the method for processing backup data provided in the embodiments of this application will be briefly introduced below.
[0065] With the rapid development of the computer field, there are increasingly more methods for database backup, such as full backup, transaction log backup, and file backup. Since deletion operations in a database are irreversible, if data is accidentally deleted from a table or if database problems lead to data loss, it is necessary to process the backup data and re-enter the data from scratch. This re-entry workload is excessive, especially with large datasets. Backup data can also be processed, allowing for operations such as data consolidation.
[0066] In related technologies, taking Oracle databases as an example, the server-side utility Data Pump can be used for database backup. Data Pump backup involves performing import and export operations on the server side; that is, after creating a new logical directory, Data Pump exports data to the newly created logical directory for backup. When users need to process the backup data, the server can respond to processing commands to perform data processing on the backup data.
[0067] However, since Data Pump is a server-side application, using it on the client side can lead to problems such as the client being unable to detect or process the data generated by Data Pump operations. Because the Data Pump method cannot perform backups or process backup data on the client side, the resulting backup data is significantly limited when using Data Pump to back up a database.
[0068] It is evident that, among related technologies, the backup data obtained when using Data Pump to back up a database has significant limitations.
[0069] To address the limitations of processing backup data when using Data Pump to back up databases, this application proposes a method for processing backup data. Upon receiving a Data Pump backup command from the client, the server, based on the command, exports multiple data sets to be backed up from the database associated with the server. These sets are then backed up in an additional storage space. This additional storage space is associated with both the client and server via the same mapping address. The client has data processing permissions associated with this additional storage space, indicating that the client is authorized to process the data within it. Upon receiving a data processing command from the client and determining that at least one data set to be processed is stored in the additional storage space, the server retrieves at least one data set to be processed from the additional storage space and returns it to the client.
[0070] In this embodiment, a data pump backup command sent by the client is received, and based on the data pump backup command, multiple data items to be backed up are exported from the database associated with the server. These multiple data items are then backed up in an additional storage space. This additional storage space is a storage space associated with the client and server through the same mapping address. The additional storage space is associated with and has data processing permissions set for the client, indicating that the client has the right to process the data in the additional storage space. When backing up data from the database to the client using data pump, associating the additional storage space with the client and server and then attaching the data to the storage space allows the client to find the backup data in the additional storage space. This solves the problem that when using the server-side tool program's data pump to back up data to the client, the client cannot find the backup data due to permission issues. The data processing permissions associated with the additional storage space grant the client data processing permissions, enabling it to perform deletion, integration, and other processing on the backup data according to data processing commands.
[0071] Furthermore, upon receiving a data processing instruction from the client and determining that at least one piece of data to be processed, as indicated by the instruction, is stored in the additional storage space, the server retrieves at least one piece of data to be processed from the additional storage space and returns it to the client. Since the additional storage space is associated with the client's data processing permissions, upon receiving the data processing instruction from the client, the server can retrieve at least one piece of data to be processed from the additional storage space and return it to the client. The client can then process the retrieved data as needed.
[0072] The following describes the application scenarios of the method for processing backup data provided in this application.
[0073] Please refer to Figure 1 This diagram illustrates an application scenario of the method for processing backup data provided in this application. The application scenario includes a client 101 and a server 102. The client 101 and the server 102 can communicate with each other. The communication method can be wired, such as through a network cable or serial cable; or wireless, such as through Bluetooth or Wi-Fi. No specific limitation is imposed.
[0074] Client 101 generally refers to any device that can provide data to be backed up to server 102, such as a terminal device, a third-party application accessible to the terminal device, or a webpage accessible to the terminal device. Terminal devices include, but are not limited to, mobile phones, computers, intelligent transportation equipment, and smart appliances. Server 102 generally refers to any device that can process backup data, such as a terminal device or a server. Servers include, but are not limited to, cloud servers, local servers, or associated third-party servers. Both client 101 and server 102 can utilize cloud computing to reduce the consumption of local computing resources; similarly, they can also utilize cloud storage to reduce the consumption of local storage resources.
[0075] As one embodiment, the client 101 and the server 102 can be the same device. For example, this embodiment can be implemented using only the client 101 or only the server 102, etc., without any specific limitation. In this embodiment, the client 101 and the server 102 are described as different devices.
[0076] The following is based on Figure 1 Taking server 102 as an example, the method for processing backup data provided in this application embodiment will be described in detail. Please refer to... Figure 2 This is a flowchart illustrating a method for processing backup data provided in an embodiment of this application.
[0077] S201 receives the Data Pump backup command sent by the client and, based on the Data Pump backup command, exports multiple data items to be backed up from the database associated with the server.
[0078] Users can trigger backup operations through the client, generating Data Pump backup commands. The client sends the Data Pump backup command to the server, and the server receives the Data Pump backup command sent by the client; alternatively, other devices can send Data Pump backup commands to the client, which then forwards them to the server, etc., with no specific restrictions.
[0079] Upon receiving the data pump backup command from the client, the server exports multiple data sets to be backed up from the database associated with the server. These data sets can be the original data from the database, or they can consist of the original data and related data such as timestamps and tables corresponding to the original data; there are no specific restrictions.
[0080] S202 backs up multiple data items to be backed up in the additional storage space.
[0081] Multiple data sets to be backed up are stored in the additional storage space. The additional storage space is a storage space associated with the client and the server through the same mapping address. The client's data processing permissions are set in the additional storage space, which indicate that the client has the right to process the data in the additional storage space.
[0082] As one implementation, a virtual directory is created on the server side. Based on the amount of data to be backed up, multiple empty files are created within the virtual directory. The data to be backed up is then stored in these empty files, resulting in multiple backup files. Empty files can be newly created files in the virtual directory that do not contain any data to be backed up, or files whose backup data has been deleted after a data deletion command is sent by the client; there are no specific restrictions. Backup files can be files that contain the data to be backed up, or files that still contain backup data after a data processing command is sent by the client; there are no specific restrictions. The path of the virtual directory can point to the same mapped address associated with the additional storage space and the client and server.
[0083] On the server, create a virtual directory. Based on the amount of data to be backed up, create multiple empty files with corresponding names within the virtual directory. Back up the data to these empty folders, resulting in multiple backup files.
[0084] For example, multiple data sets to be backed up are categorized into three sets: the first set of backup data, the second set of backup data, and the third set of backup data. The name of the first set of backup data consists of the first username, the first registration time, and the first image name; the name of the second set of backup data consists of the second username, the second registration time, and the second image name; and the name of the third set of backup data consists of the third username, the third registration time, and the third image name. A virtual directory is created on the server. Since there are three sets of backup data, three empty files are created within this virtual directory: the first empty file, the second empty file, and the third empty file.
[0085] Name the first empty file according to the name of the first data to be backed up, and save the first data to be backed up into the first empty file to obtain the first backup file; name the second empty file according to the name of the second data to be backed up, and save the second data to be backed up into the second empty file to obtain the second backup file; name the third empty file according to the name of the third data to be backed up, and save the third data to be backed up into the third empty file to obtain the third backup file.
[0086] The path of the virtual directory can point to the same mapped address associated with the additional storage space and the client and server. Furthermore, the additional storage space has different association parameters in different operating systems, which enables the additional storage space to be associated with both the client and server, allowing the client to access multiple backup files stored in the virtual directory.
[0087] Attached storage space has different associated parameters in different operating systems. For example, in the AIX operating system, the parameters for read / write permissions, background execution, disallow interruption, read block size of 32768, write block size of 32768, error correction, service protocol version number of 3, and timeout value of 600 minutes are set. In the HPUX operating system, the parameters for read / write permissions, background execution, disallow interruption, read block size of 32768, write block size of 32768, error correction, service protocol version number of 3, disable attribute caching, other user identity parameters, and timeout value of 600 minutes are set. In the Linux operating system, the parameters for read / write permissions, background execution, disallow interruption, read block size of 32768, write block size of 32768, error correction, service protocol version number of 3, release network device parameters, timeout value of 600 minutes, and set the parameters to the same start time of 0 seconds are set.
[0088] As one example, after obtaining multiple data to be backed up, based on the data name of the data to be backed up, an empty file without a file name is named among the multiple empty files to obtain the file name of an empty file. Based on the file name of the empty file, the data to be backed up is saved in an empty file to obtain a backup file.
[0089] The acquired data to be backed up has corresponding names, which can be user names, registration times, images, etc., with no specific restrictions. One empty file (without a filename) in the virtual directory is renamed with the corresponding name, and the data to be backed up is saved in the empty file with the corresponding name, resulting in a backup file.
[0090] Taking the name of the data to be backed up as "user" as an example, the data to be backed up is user data in the database. Based on the name of the data to be backed up, an empty file without a file name is named "user" among multiple empty files, and the corresponding data to be backed up is backed up in the empty file, resulting in a backup file named "user".
[0091] Please refer to Figure 3 This is a flowchart illustrating a method for processing backup data provided in an embodiment of this application.
[0092] S301 creates a virtual directory on the server side, and creates multiple empty files in the virtual directory based on the number of data to be backed up.
[0093] S302 backs up multiple data to be backed up into multiple empty files, thus obtaining multiple backup files.
[0094] S303: After obtaining multiple data to be backed up, based on the data name of the data to be backed up, name one of the multiple empty files that does not have a file name, obtain the file name of the empty file, and based on the file name of the empty file, save the data to be backed up in the empty file, thus obtaining a backup file.
[0095] As one example, after saving the data to be backed up in an empty file and obtaining a backup file, a backup identifier is set for the backup file, and data processing permissions for the client are set for the backup file. The backup identifier can indicate that a backup file contains data to be backed up.
[0096] After obtaining a backup file, a backup identifier is set to associate the backup file with it. This identifier indicates that the backup file contains data to be backed up. The backup identifier can be a preset parameter of the Data Pump command, and there are no restrictions on its specific nature. Next, data processing permissions are set for the client associated with the backup file. Data processing permissions can be 777 permissions, etc., and there are no restrictions on their specific nature.
[0097] Taking a backup file named "User" in a virtual directory as an example, when backing up via Data Pump, the backup identifier associated with the backup file determines that the backup file named "User" is the required file and not empty, enabling the client to access the backup data in the "User" backup file. The backup file association settings for client data processing permissions ensure that the client has the necessary permissions to process the backup data, allowing it to perform actions such as deleting, merging, and archiving of the backup data in the "User" file.
[0098] As one embodiment, since the additional storage space contains multiple backup files, and each backup file is associated with a backup identifier, when it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, multiple backup files associated with backup identifiers are determined in the additional storage space. Multiple backup files with backup identifiers indicate that there is data to be backed up in the backup files, and at least one data to be processed is obtained from the multiple backup files.
[0099] When performing a backup via Data Pump, if it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, multiple backup files associated with backup identifiers are identified in the additional storage space. Based on the backup identifiers associated with the multiple backup files, and based on the file name, it is determined that the backup file is the required file and is not an empty file, indicating that the backup file contains data to be backed up. Then, at least one data to be processed is obtained from the multiple backup files.
[0100] After determining that the backup file is the required file based on the file name, it checks whether the file is empty. Based on the backup identifier set in the association settings, it determines whether the file should be exported. The backup identifier can be a preset parameter of Data Pump. After confirming that the preset parameters are reused and the file parameters are exported, it can determine the file-related parameter information and description. When it is confirmed that the file data in the file-related parameter information is not empty and the file-related parameter information is consistent with the information of the backup file corresponding to the data to be processed indicated by the data processing command, the file is exported.
[0101] S203: Receive a data processing instruction sent by the client, and when it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, retrieve at least one data to be processed from the additional storage space and return at least one data to be processed to the client.
[0102] The system receives data processing instructions from the client. These instructions can be deletion, consolidation, archiving, etc., with no specific restrictions. If it determines that at least one piece of data to be processed, as indicated by the data processing instruction, is stored in the additional storage space, it means that the backup file in the additional storage space contains the backup data required by the instruction. Therefore, it retrieves at least one piece of data to be processed from the backup file in the additional storage space and returns this data to the client.
[0103] Please refer to Figure 4 This is a schematic diagram illustrating the principle of a method for processing backup data provided in an embodiment of this application.
[0104] After receiving a data pump backup command from client 401, server 402 retrieves multiple data items to be backed up from database 403 associated with server 402, and backs up these multiple data items to additional storage space 404, which is associated with both server and client through the same mapping address. Upon receiving a data processing command from client 401, server 402 determines that at least one data item to be processed, as indicated by the data processing command, is stored in additional storage space 404. It then retrieves at least one data item to be processed from the backup file in additional storage space 404 and returns this data item to client 401.
[0105] Taking the name of the data to be backed up as "user" as an example, multiple data to be backed up are backed up in an empty file named "user" in the additional storage space. When a data processing instruction is received from the client, if it is determined that at least one data to be processed named "user" is stored in the additional storage space as indicated by the data processing instruction, at least one data to be processed named "user" is retrieved from the backup file named "user" in the additional storage space, and at least one data to be processed named "user" is returned to the client, and the client completes the data processing.
[0106] Please refer to Figure 5 This is a flowchart illustrating a method for processing backup data provided in an embodiment of this application.
[0107] S501 receives a data processing instruction sent by the client.
[0108] S502, determine that at least one data to be processed, whose name is user, as indicated by the data processing instruction, is stored in the additional storage space.
[0109] S503 retrieves at least one piece of data to be processed from a backup file in the additional storage space.
[0110] S504 returns at least one piece of data to be processed to the client.
[0111] As one embodiment, when the data processing instruction is a deletion instruction, after backing up multiple data to be backed up in the additional storage space, a data deletion instruction sent by the client is received, and when it is determined that at least one data to be deleted indicated by the data deletion instruction is stored in the additional storage space, at least one data to be deleted is deleted from the additional storage space.
[0112] After backing up multiple data items to be backed up in the additional storage space, the system receives a data deletion command from the client. If it determines that at least one data item to be deleted, as indicated by the data deletion command, is stored in the additional storage space, it means that the backup files in the additional storage space contain the backup data required for the deletion command. The system then retrieves at least one data item to be deleted from the backup files in the additional storage space and returns this data to the client, allowing the client to complete the data deletion process.
[0113] Taking the name of the data to be backed up as "user" as an example, multiple data to be backed up are backed up in an empty file named "user" in the additional storage space. When receiving the relevant data deletion instruction sent by the client, which is named "user" and indicates that at least one data to be deleted is stored in the additional storage space, at least one data to be deleted is retrieved from the backup file named "user" in the additional storage space and returned to the client. The data deletion process is completed on the client side.
[0114] Based on the same inventive concept, embodiments of this application provide an apparatus 600 for processing backup data, capable of implementing the functions corresponding to the aforementioned method for processing backup data. Please refer to... Figure 6 The device includes an acquisition module 601 and a processing module 602, wherein:
[0115] Module 601: Receives the Data Pump backup command sent by the client, and based on the Data Pump backup command, exports multiple data to be backed up from the database associated with the server.
[0116] Processing module 602: Backs up multiple data to be backed up in the additional storage space. The additional storage space is a storage space associated with the client and the server through the same mapping address. The additional storage space is associated with the client's data processing permissions, and the client has the right to process the data in the additional storage space.
[0117] The processing module 602 is further configured to: receive a data processing instruction sent by the client, and when it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, retrieve at least one data to be processed from the additional storage space and return at least one data to be processed to the client.
[0118] Optionally, the processing module 602 is specifically used for:
[0119] Create a virtual directory on the server side, where the path of the virtual directory points to the mapped address;
[0120] Based on the amount of data to be backed up, create multiple empty files in a virtual directory;
[0121] Multiple backup files are created by backing up multiple data sets to multiple empty files.
[0122] Optionally, the processing module 602 is specifically used for:
[0123] For multiple data sets to be backed up, perform the following operations:
[0124] Based on the data name of the data to be backed up, name one empty file that does not have a file name among multiple empty files to obtain the file name of an empty file;
[0125] Based on the filename of an empty file, the data to be backed up is saved in an empty file, thus obtaining a backup file.
[0126] Optionally, the processing module 602 is also used for:
[0127] Based on the filename of an empty file, the data to be backed up is saved in an empty file. After obtaining a backup file, a backup identifier is set for the backup file. The backup identifier is used to indicate that a backup file contains data to be backed up.
[0128] Associate a backup file with the client's data processing permissions.
[0129] Optionally, the additional storage space contains multiple backup files, each associated with a backup identifier. The backup identifier indicates that the corresponding backup file contains corresponding data to be backed up. The processing module 602 is specifically used for:
[0130] When it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, multiple backup files in the additional storage space that are associated with backup identifiers are determined.
[0131] Obtain at least one piece of data to be processed from multiple backup files.
[0132] Optionally, the processing module 602 is also used for:
[0133] After backing up multiple data to be backed up in the additional storage space, upon receiving a data deletion instruction from the client and determining that at least one data to be deleted indicated by the data deletion instruction is stored in the additional storage space, at least one data to be deleted is deleted from the additional storage space.
[0134] Please refer to Figure 7 The aforementioned device for processing backup data can run on a computer device 700. The current and historical versions of the data storage program, as well as the application software corresponding to the data storage program, can be installed on the computer device 700, which includes a processor 780 and a memory 720. In some embodiments, the computer device 700 may include a display unit 740, which includes a display panel 741 for displaying a user-interactive interface, etc.
[0135] In one possible embodiment, the display panel 741 may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).
[0136] The processor 780 is used to read a computer program and then execute the methods defined by the computer program. For example, the processor 780 reads a data storage program or file, thereby running the data storage program on the computer device 700 and displaying the corresponding interface on the display unit 740. The processor 780 may include one or more general-purpose processors, and may also include one or more DSPs (Digital Signal Processors) for performing related operations to implement the technical solutions provided in the embodiments of this application.
[0137] The memory 720 generally includes main memory and secondary storage. Main memory can be random access memory (RAM), read-only memory (ROM), and cache, etc. Secondary storage can be a hard disk, optical disk, USB flash drive, floppy disk, or magnetic tape drive, etc. The memory 720 is used to store computer programs and other data. The computer programs include applications corresponding to each client, and other data may include data generated after the operating system or applications are run, including system data (e.g., operating system configuration parameters) and user data. In this embodiment, program instructions are stored in the memory 720, and the processor 780 executes the program instructions in the memory 720 to implement any of the methods described in the preceding figures.
[0138] The aforementioned display unit 740 is used to receive input digital information, character information, or contact touch operations / non-contact gestures, and to generate signal inputs related to user settings and function control of the computer device 700. Specifically, in this embodiment, the display unit 740 may include a display panel 741. The display panel 741, for example, is a touch screen, which can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or on the display panel 741), and drive corresponding connection devices according to a pre-set program.
[0139] In one possible embodiment, the display panel 741 may include two parts: a touch detection device and a touch controller. The touch detection device detects the player's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 780. It can also receive and execute commands from the processor 780.
[0140] The display panel 741 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 740, in some embodiments, the computer device 700 may also include an input unit 730. The input unit 730 may include an image input device 731 and other input devices 732, wherein the other input devices may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.
[0141] In addition to the above, the computer device 700 may also include a power supply 790 for powering other modules, an audio circuit 760, a near-field communication module 770, and an RF circuit 710. The computer device 700 may also include one or more sensors 750, such as an accelerometer, a light sensor, and a pressure sensor. The audio circuit 760 specifically includes a speaker 761 and a microphone 762, for example, the computer device 700 can use the microphone 762 to collect the user's voice and perform corresponding operations.
[0142] As one embodiment, the number of processors 780 can be one or more, and the processors 780 and the memory 720 can be coupled together or relatively independent.
[0143] As one example, Figure 7 The processor 780 in the middle can be used to implement, for example Figure 6 The functions of the acquisition module 601 and the processing module 602 in the process.
[0144] As one example, Figure 7 The processor 780 in the text can be used to implement the functions of the server or terminal devices discussed above.
[0145] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0146] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of software products, for example, through a computer program product. This computer program product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0147] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0148] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for processing backup data, characterized in that, include: Receive the Data Pump backup command sent by the client, and based on the Data Pump backup command, export multiple data to be backed up from the Oracle database associated with the server; A virtual directory is created on the server to obtain additional storage space, and an empty file named after each piece of data to be backed up is created in the virtual directory; wherein, the additional storage space is a storage space associated between the client and the server through the same mapping address; The multiple data to be backed up are backed up in each empty file in the additional storage space to obtain backup files corresponding to each of the multiple data to be backed up; each backup file is associated with the client's data processing permissions, which indicate that the client has the right to process the data in the backup file; the path of the virtual directory points to the mapping address; When a data processing instruction sent by the client is received, and it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, the at least one data to be processed is retrieved from the additional storage space and returned to the client.
2. The method according to claim 1, characterized in that, The step of creating an empty file named after each piece of data to be backed up in the virtual directory includes: Based on the quantity of the multiple data to be backed up, create multiple empty files in the virtual directory; For the multiple data sets to be backed up, perform the following operations: Based on the data name of the data to be backed up, name one of the multiple empty files that does not have a file name, and obtain the file name of the empty file.
3. The method according to claim 2, characterized in that, The step of backing up the plurality of data to be backed up to each empty file in the additional storage space to obtain backup files corresponding to each of the plurality of data to be backed up includes: For the multiple data sets to be backed up, perform the following operations: Based on the filename of the empty file, the data to be backed up is saved in the empty file to obtain a backup file.
4. The method according to claim 3, characterized in that, After saving the data to be backed up into the empty file based on the filename of the empty file to obtain a backup file, the process further includes: A backup identifier is set for the backup file, wherein the backup identifier is used to indicate that the backup file contains the data to be backed up; Set the data processing permissions for the client associated with the backup file.
5. The method according to claim 1, characterized in that, The additional storage space contains multiple backup files, each backup file is associated with a backup identifier, and the backup identifier is used to indicate that the corresponding backup file contains corresponding data to be backed up. When it is determined that at least one piece of data to be processed, as indicated by the data processing instruction, is stored in the additional storage space, retrieving the at least one piece of data to be processed from the additional storage space includes: When it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, the plurality of backup files associated with backup identifiers in the additional storage space are determined; Obtain at least one piece of data to be processed from the plurality of backup files.
6. The method according to any one of claims 1 to 5, characterized in that, After obtaining the backup files corresponding to each of the plurality of data to be backed up, the method further includes: Upon receiving a data deletion instruction sent by the client, and determining that at least one data to be deleted indicated by the data deletion instruction is stored in the additional storage space, the at least one data to be deleted is deleted from the additional storage space.
7. An apparatus for processing backup data, characterized in that, include: Acquisition module: Receives the Data Pump backup command sent by the client, and based on the Data Pump backup command, exports multiple data to be backed up from the Oracle database associated with the server; Processing module: Creates a virtual directory on the server, obtains additional storage space, and creates an empty file in the virtual directory named after each piece of data to be backed up; wherein, the additional storage space is a storage space associated between the client and the server through the same mapping address; The multiple data to be backed up are backed up in each empty file in the additional storage space to obtain backup files corresponding to each of the multiple data to be backed up; each backup file is associated with the data processing permissions of the client, and the client has the right to process the data in the backup file; the path of the virtual directory points to the mapping address; The processing module is further configured to: receive a data processing instruction sent by the client, and when it is determined that at least one data to be processed indicated by the data processing instruction is stored in the additional storage space, retrieve the at least one data to be processed from the additional storage space, and return the at least one data to be processed to the client.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1 to 6.
9. A computer device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method as described in any one of claims 1 to 6 according to the obtained program instructions.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Data backup method and device
CN111240892A