Data backup method and device, equipment, storage medium and program product
By backing up the data to be backed up to the tape and adding it to the offline logical tape library during the data backup process, the problem of data tampering by users who do not have operation permissions is solved, and secure isolation is achieved during the data backup process.
Patent Information
- Application Number
- CN202510164031.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-06-03
AI Technical Summary
The prior art is difficult to prevent data tampering by users who do not have operational permissions during data backup.
When receiving the data to be backed up by the backup system, it is determined that the first tape in the tape library is located in the first logical tape library, back up the data to be backed up to the tape, and after the backup is completed, the tape is added to the second logical tape library, thereby realizing offline isolation of the data.
It effectively isolates data tampering by users who do not have operational permissions, and ensures the security and integrity of the data during the backup process.
Smart Images

Figure CN120086065A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing, and in particular, to a method, apparatus, device, storage medium, and program product for data backup. Background Art
[0002] In the current digital age, data has become one of the most valuable assets of enterprises. For financial institutions such as banks, it is particularly important to protect the integrity, availability, and confidentiality of data. With the continuous upgrading and sophistication of network attack means, traditional online backup solutions are facing unprecedented security challenges. Therefore, how to effectively isolate sensitive or critical business data from the production environment and ensure its long-term secure and reliable storage has become an urgent problem to be solved.
[0003] In summary, there is an urgent need for a technical solution to prevent users without operation permissions from tampering with data during the data backup process. Summary of the Invention
[0004] This application provides a method, apparatus, device, storage medium, and program product for data backup to solve the problem that users without operation permissions tamper with data during the data backup process.
[0005] In a first aspect, this application provides a method for data backup, including: when receiving the data to be backed up uploaded by a backup system, determining a first magnetic tape in a first logical tape library in a tape library; determining to back up the data to be backed up to the first magnetic tape, and obtaining a first moment when the first magnetic tape finishes receiving the data to be backed up; sending a tape status detection instruction to the tape library, and when the difference between a second moment when the status detection instruction is sent and the first moment is greater than a first preset value, determining that the data to be backed up is backed up, and sending an out-of-library instruction to the tape library, where the out-of-library instruction is used to instruct the tape library to add the first magnetic tape to a second logical tape library.
[0006] In a second aspect, this application provides a data backup apparatus, including: a determination module, configured to determine a first magnetic tape in a first logical tape library in a tape library when receiving the data to be backed up uploaded by a backup system; an acquisition module, configured to determine to back up the data to be backed up to the first magnetic tape, and obtain a first moment when the first magnetic tape finishes receiving the data to be backed up; a backup module, configured to send a tape status detection instruction to the tape library, and when the difference between a second moment when the status detection instruction is sent and the first moment is greater than a first preset value, determining that the data to be backed up is backed up, and sending an out-of-library instruction to the tape library, where the out-of-library instruction is used to instruct the tape library to add the first magnetic tape to a second logical tape library.
[0007] In a third aspect, an embodiment of the present application provides a data backup device, including: a memory and a processor;
[0008] The memory stores computer-executable instructions;
[0009] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementation manners of the first aspect.
[0010] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the above first aspect and / or various possible implementation manners of the first aspect.
[0011] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the above first aspect and / or various possible implementation manners of the first aspect.
[0012] For the data backup method, device, equipment, storage medium and program product provided by the present application, when receiving the data to be backed up uploaded by the backup system, the first tape in the first logical tape library in the tape library is determined; it is determined to back up the data to be backed up to the first tape, and the first time when the first tape finishes receiving the data to be backed up is obtained; a tape status detection instruction is sent to the tape library, and when the difference between the second time when the status detection instruction is sent and the first time is greater than a first preset value, it is determined that the data to be backed up is backed up, and an out-of-library instruction is sent to the tape library, where the out-of-library instruction is used to instruct the tape library to add the first tape to the second logical tape library. By this means, in the data backup process, the data can be effectively isolated from being tampered with by users without operation permissions by adding the tape to the offline logical tape library. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings here are incorporated into the description and form a part of this description, showing embodiments consistent with the present application, and are used together with the description to explain the principles of the present application.
[0014] Figure 1 It is a schematic flowchart of the data backup method provided by the present application;
[0015] Figure 2 It is a schematic structural diagram of the data backup device provided by the present application;
[0016] Figure 3 It is a schematic structural diagram of the data backup device equipment provided by the present application.
[0017] Through the above-mentioned accompanying drawings, specific embodiments of the present application have been shown, and will be described in more detail hereinafter. These drawings and the written description are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed Embodiments
[0018] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0019] It should be noted that the data backup method, device, equipment, storage medium, and program product provided by the present application can be used in the field of cloud computing and can also be used in any field other than cloud computing. The application fields of the data backup method, device, equipment, storage medium, and program product in the present application are not limited.
[0020] The technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0021] Figure 1 It is a schematic flowchart of the data backup method provided by the present application, including:
[0022] S101: When receiving the data to be backed up uploaded by the backup system, determine the first tape in the first logical tape library in the tape library;
[0023] Optionally, the backup system is any software system for backup, such as the NBU backup system (Veritas Netbackup). It is mainly used to back up and archive data and store the data in backup media such as tapes and disks.
[0024] The tape library is a tape library connected to the IBM tape system. It can be used by the backup system after being set as the medium for backing up data.
[0025] Optionally, the first logical tape library is a production logical tape library.
[0026] S102: Determine to back up the data to be backed up to the first tape, and obtain the first moment when the first tape finishes receiving the data to be backed up;
[0027] Optionally, back up the data objects to be backed up to tapes through the NBU backup software, where the NBU is pre-linked to the IBM tape system, obtains available tapes through internal algorithms, packs the data into backup images, and writes them to the tapes.
[0028] S103: Send a tape status detection instruction to the tape library. When the difference between the second moment when the status detection instruction is sent and the first moment is greater than a first preset value, determine that the data to be backed up is backed up completely, and send an out-of-library instruction to the tape library, where the out-of-library instruction is used to instruct the tape library to add the first tape to the second logical tape library.
[0029] Optionally, the second logical tape library is an offline cache logical tape library.
[0030] In the IBM tape system, the tape library is divided into multiple logical small tape libraries. Among them, the NBU system can only recognize the logical tape library configured for it and can only operate this logical tape library, but cannot operate other logical tape libraries. The IBM tape system can operate the transfer of tapes among various logical tape libraries. Thus, logical isolation on the backup system is achieved. That is, for a tape controlled by nbu, if the tape is moved by the IBM tape library to a logical tape library not controlled by nbu, nbu cannot operate and read / write this tape, thus achieving logical offline isolation.
[0031] Optionally, the execution entity of the above method is a three-party control system, which is connected to the backup system and the tape library at the same time.
[0032] The tasks performed by the three-party control system include: creating a database table list, inspecting data collection, internal logical judgment, and data control adjustment.
[0033] Optionally, the database table list includes: table fields: tape label (mediaid, the unique identifier of the tape),
[0034] The POOL where the tape is located (the logical tape pool in NBU, and empty tapes to be used are generally in Scratch), the number of backup images, the total size of backup images, the tape status (media_status: indicating whether the tape is full / active / frozen, etc.), the last usage time of the tape (ING or the time 'YYYYMMDDHHMISS' such as 20240505061059), the retention period of the tape (actually the retention time of each backup image in the tape, generally divided into 1 week, 2 weeks, 1 month, 2 months, 3 months, 6 months, 1 year, 2 years, 3 years, 5 years, 10 years, 15 years, permanent indefinite), the earliest time of the tape backup image, the last time of the tape backup image, the inspection and update time, the offline status (online, offline cache, offline out of the library), the offline cache time point, and the cache target logical tape library.
[0035] The main function of inspection data collection is to record the current backup situation in NBU into the database table, mainly to update the latest tape change situation to the table list to confirm whether tape control adjustment is required.
[0036] Step 1: Data collection on the NBU side. 10 o'clock every day is the backup low-peak time. Obtain the tape label, tape logical POOL, number of backup images, backup size, tape status, last usage time of the tape, retention period of the tape, earliest time of the images in the tape, last time, and the current inspection time point through the command line provided by NBU, and write them into the database table.
[0037] Step 2: Collect the logical tape library where the tape is currently located on the IBM tape library side. When it is found that the tape is in the production logical tape library, the offline status is online. If the tape is in the isolation logical tape library, the offline status is offline cache. If the tape cannot be found in each logical tape library, it means the tape has been taken out of the library, and the offline status is offline out of the library. At the same time, update the [Offline Status] and [Cache Target Logical Tape Library] in the table list.
[0038] The above data backup method, when receiving the data to be backed up uploaded by the backup system, determines the first tape in the first logical tape library in the tape library; determines to back up the data to be backed up to the first tape, and obtains the first moment when the first tape finishes receiving the data to be backed up; sends a tape status detection instruction to the tape library. When the difference between the second moment when the status detection instruction is sent and the first moment is greater than the first preset value, it is determined that the data to be backed up is completed, and an out-of-library instruction is sent to the tape library, where the out-of-library instruction is used to instruct the tape library to add the first tape to the second logical tape library. By this means, in the process of data backup, the data can be effectively isolated from being tampered with by users without operation permissions by adding the tape to the offline logical tape library.
[0039] In an optional embodiment, a query instruction is sent to the backup system at a preset period, and the retention duration corresponding to the data to be backed up fed back by the backup system based on the query instruction is received; in a case where the difference between the third moment when the query instruction is sent and the fourth moment when the storage-out instruction is sent is greater than the retention duration, it is determined to send a reuse instruction to the tape library, where the reuse instruction is used to instruct the tape library to move the first tape from the second logical tape library to the first logical tape library.
[0040] In an optional embodiment, after determining to send a reuse instruction to the tape library, the data stored in the first tape is deleted.
[0041] The system periodically (at a preset period) sends a query instruction to the backup system.
[0042] After receiving the query instruction, the backup system feeds back the retention duration corresponding to the data to be backed up. This retention duration refers to the length of time that the data should be retained in the backup system and is usually determined according to business requirements and regulatory requirements. The system records the third moment (T3) when the query instruction is sent and compares it with the fourth moment (T4) when the storage-out instruction was sent before.
[0043] If the difference between T4 and T3 is greater than the retention duration corresponding to the backed-up data, it indicates that the data has exceeded its predetermined retention period. In this case, the system determines that a reuse instruction needs to be sent to the tape library.
[0044] The function of the reuse instruction is to instruct the tape library to move the first tape back from the second logical tape library to the first logical tape library. In this way, the first tape can be recognized and used by the NBU system again, thereby realizing data reuse. Through this method, the system can ensure that data will not permanently occupy storage space after exceeding the retention period, and at the same time provides the possibility for data to be reused again. This mechanism helps to optimize storage resources and improve the efficiency and flexibility of data management.
[0045] Through the reuse instruction, the system can release the data that has exceeded the retention period from the tape library, avoiding long-term occupation of storage resources. This not only optimizes the utilization of storage resources but also provides more space for backing up new data. The reuse mechanism makes data management more flexible. Administrators can adjust the data retention policy according to actual needs to ensure that important data is properly preserved while cleaning up data that is no longer needed in a timely manner, thereby improving the overall data management efficiency.
[0046] The system can reduce the demand for physical storage media, thereby reducing storage costs. This mechanism is particularly suitable for large-scale data backup environments, significantly reducing the company's investment in storage. Optionally, step 1: First, for each production logical tape library, you need to pre-create an offline cache logical tape library and bind the relationship between the two;
[0047] Step 2: After the daily inspection, the logic judgment is triggered to check the online tapes in production (POOL, not Scratch). Check the last time the tape was used. If the time is ING, skip this tape; if the last time is more than 1 hour away from the current time and the last time is within this week, it means that this tape is no longer in use but has been used recently, so add this tape to the [Offline Cache List];
[0048] Step 3: If the tape offline status is [Offline Cache], check [Offline Cache Time Point], [Last Time Point of Offline Backup Image of Tape] and [Tape Retention Period] in the list. If:
[0049] If [Current time] >= MAX ([Offline cache time point], [Last time point of offline backup image of tape]) + [Tape retention period], it means that all data stored in the tape can expire. The tape needs to be added from the offline cache logical tape library to the production logical tape library so that NBU can control the tape, expire the data and reuse it (automatically add it to the Scratch POOL again). Then add this tape to the [Return to online list].
[0050] Step 4: If the tape offline status is [Offline out of the library], the tape time is also calculated if:
[0051] [Current time] >= [Last time point of offline tape backup image] + [Tape retention period]
[0052] This means that the data retained in the tape can expire, and the administrator needs to be prompted to add the tape back to the tape library, so the tape will be added to the [Reminder Return List].
[0053] Step 5: If the tape status is [Online] and the tape's POOL is Scratch, add the tape to the [Empty Tape List].
[0054] In an optional embodiment, the usage status of the tape in the first logical tape library is determined, wherein the usage status includes: in use, to be used; a second tape in the tape library is determined to be in use, and whether the second tape is allowed to be determined as the first tape based on the task size of the backup task being executed by the second tape.
[0055] The system first needs to check the usage status of all tapes in the first logical tape library. The usage status usually includes "in use" and "awaiting use".
[0056] The "in use" status indicates that the tape is currently occupied by a backup task, while the "awaiting use" status indicates that the tape is available and not occupied by any backup task. After determining the usage status of the tapes in the first logical tape library, the system will look for a second tape with the usage status of "in use". The second tape refers to the tape that is currently executing a backup task.
[0057] Based on the task size of the backup task being executed by the second tape, the system will determine whether to allow the second tape to be determined as the first tape.
[0058] In an optional embodiment, when the corresponding first data volume of the backup task is greater than or equal to the corresponding second data volume of the second tape, it is prohibited to determine the second tape as the first tape; when the corresponding first data volume of the backup task is less than the corresponding second data volume of the second tape, it is allowed to determine the second tape as the first tape.
[0059] When the corresponding first data volume of the backup task is greater than or equal to the corresponding second data volume of the second tape, it is prohibited to determine the second tape as the first tape; when the corresponding first data volume of the backup task is less than the corresponding second data volume of the second tape, it is allowed to determine the second tape as the first tape.
[0060] If the first data volume is greater than or equal to the second data volume, this means that the remaining space on the second tape is not sufficient to complete the entire backup task. In this case, it is prohibited to determine the second tape as the first tape to avoid backup failure or data corruption due to insufficient space.
[0061] Conversely, if the first data volume is less than the second data volume, this indicates that there is enough space on the second tape to accommodate the entire backup task. In this case, it is allowed to determine the second tape as the first tape to continue the backup operation
[0062] In an optional embodiment, determine the number of tapes of the corresponding first tape in the first logical tape library; when the number of tapes is less than a second preset value, initiate a prompt message to the target object, where the prompt message is used to prompt the target object to fill in blank tapes, and the prompt message carries at least the number of tapes.
[0063] The system first needs to determine the number of currently available tapes in the first logical tape library. This typically involves querying the tape library's management system or using a specific hardware interface to obtain real-time data. The system compares the obtained number of tapes with a preset threshold (the second preset value). This preset value is determined based on business requirements and historical data to ensure that there are sufficient tapes to handle backup tasks at any given time. If the number of tapes is less than the second preset value, indicating that the tapes in the tape library are insufficient to meet the upcoming backup requirements, the system will initiate a prompt message to the target object.
[0064] The purpose of this prompt message is to notify the target object (which may be an IT administrator or an automated system) that actions need to be taken, such as filling more blank tapes into the tape library.
[0065] The prompt message will at least carry the current number of tapes, so that the target object can understand the actual situation of the tape library.
[0066] The prompt message may also include other relevant information, such as the recommended number of tapes to be filled, the urgency, and possible impacts, etc., to help the target object make a quick decision.
[0067] In an optional embodiment, after sending the data to be backed up to the first tape, the usage status of the first tape is monitored in real time; the fifth moment when the usage status of the first tape switches from being in use to being available for use is determined; and the fifth moment is determined as the first moment when the first tape has received all the data to be backed up.
[0068] Once the transfer of the data to be backed up to the first tape starts, the system will initiate a real-time monitoring mechanism to track the usage status of the tape. This monitoring mechanism can detect whether the tape is being written with data (in use) or is idle and available for other tasks (available for use). The system continuously monitors until it detects that the usage status of the first tape switches from "in use" to "available for use". This moment is called the fifth moment. This change in status usually means that the data writing operation on the tape has been completed and the tape is ready for the next operation or to be released for other tasks.
[0069] For the [Offline Cache Inventory], first call the IBM tape system API to move the tape to the offline cache logical tape library. Then, at the NBU backup system command line, perform an inventory refresh of the tape status operation (at this time, the tape will be in a non-online state in the NBU system and NBU cannot use it for backup).
[0070] For the
Return to Online List
[0071] For the
Reminder to Return List
[0072] For the
Empty Tape List
[0073] The above method realizes the logical isolation of tapes in the two systems and the offline ability by operating the NBU backup system and the IBM tape system separately. Through logical isolation and offline ability, the operation ability of the NBU backup system on offline tapes is blocked, and then the reading ability of the NBU backup system itself on tapes is realized. By restricting the reading of offline tapes, the isolation of backup data and production is achieved, thereby improving the protection ability of the overall system.
[0074] Through logical isolation and offline ability, the operation ability of the NBU backup system on offline tapes is blocked, and then the reading ability of the NBU backup system itself on tapes is restricted. This effectively prevents unauthorized access and potential data leakage risks, and improves the protection ability of the overall system. By restricting the reading of offline tapes, the isolation of backup data and production is achieved, thereby avoiding the long-term occupation of storage resources. When the data exceeds the retention period, the system will determine that a reuse instruction needs to be issued to the tape library to release the storage space for new data, improving the utilization rate of storage resources.
[0075] The data backup method provided by the embodiment of the present application determines the first tape located in the first logical tape library in the tape library when receiving the data to be backed up uploaded by the backup system; determines to back up the data to be backed up to the first tape, and obtains the first moment when the first tape finishes receiving the data to be backed up; sends a tape status detection instruction to the tape library. When the difference between the second moment when the status detection instruction is sent and the first moment is greater than the first preset value, it is determined that the data to be backed up is backed up, and an out-of-library instruction is sent to the tape library, where the out-of-library instruction is used to instruct the tape library to add the first tape to the second logical tape library means, effectively isolating the effect of unauthorized users from tampering with data in the data backup process by adding the tape to the offline logical tape library.
[0076] Figure 2 The structural schematic diagram of the backup device for the data provided by this application is as follows Figure 2 As shown, the backup device 20 for the data provided in this embodiment includes:
[0077] A determination module 201, configured to determine a first tape in a first logical tape library in the tape library when receiving the data to be backed up uploaded by the backup system;
[0078] An acquisition module 202, configured to determine to back up the data to be backed up to the first tape, and acquire a first moment when the first tape finishes receiving the data to be backed up;
[0079] A backup module 203, configured to send a tape status detection instruction to the tape library, and determine that the data to be backed up is backed up when the difference between a second moment when the status detection instruction is sent and the first moment is greater than a first preset value, and send an out-of-library instruction to the tape library, where the out-of-library instruction is used to instruct the tape library to add the first tape to a second logical tape library.
[0080] In a possible implementation manner, the backup module 203 is configured to send a query instruction to the backup system at a preset period, and receive a retention duration corresponding to the data to be backed up fed back by the backup system based on the query instruction; and determine to send a reuse instruction to the tape library when the difference between a third moment when the query instruction is sent and a fourth moment when the out-of-library instruction is sent is greater than the retention duration, where the reuse instruction is used to instruct the tape library to move the first tape from the second logical tape library to the first logical tape library.
[0081] In a possible implementation manner, the backup module 203 is configured to delete the data stored in the first tape.
[0082] In a possible implementation manner, the determination module 201 is configured to determine a usage status of the tapes in the first logical tape library, where the usage status includes: in use, to be used; determine a second tape in the tape library whose usage status is in use, and determine whether to allow the second tape to be determined as the first tape according to a task size of the backup task being executed by the second tape.
[0083] In a possible implementation manner, the determination module 201 is configured to prohibit the second tape from being determined as the first tape when a first data volume corresponding to the backup task is greater than or equal to a second data volume corresponding to the second tape; and allow the second tape to be determined as the first tape when the first data volume corresponding to the backup task is less than the second data volume corresponding to the second tape.
[0084] In a possible implementation, a determination module 201 is configured to determine the number of tapes of the corresponding first tape in the first logical tape library; in a case where the number of tapes is less than a second preset value, a prompt message is sent to a target object, where the prompt message is used to prompt the target object to fill blank tapes, and the prompt message carries at least the number of tapes.
[0085] In a possible implementation, an acquisition module 202 is configured to, after sending the data to be backed up to the first tape, monitor the usage status of the first tape in real time; determine a fifth moment when the usage status of the first tape switches from being in use to being to be used; and determine the fifth moment as a first moment when the first tape finishes receiving the data to be backed up.
[0086] The data backup device provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here in this embodiment.
[0087] Figure 3 It is a schematic structural diagram of the data backup device provided in this application. As Figure 3 shown, the electronic device 30 provided in this embodiment includes: at least one processor 301 and a memory 302. Optionally, the device 30 further includes a communication component 303. Among them, the processor 301, the memory 302, and the communication component 303 are connected through a bus.
[0088] In a specific implementation process, at least one processor 301 executes computer execution instructions stored in the memory 302, so that at least one processor 301 executes the above method.
[0089] The specific implementation process of the processor 301 can be referred to the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here in this embodiment.
[0090] In the above embodiment, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, abbreviated: CPU), or may also be other general-purpose processors, digital signal processors (English: Digital Signal Processor, abbreviated: DSP), application specific integrated circuits (English: Application Specific Integrated Circuit, abbreviated: ASIC), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
[0091] The memory may include a random access memory (RAM), and may also include non-volatile memory (NVM), such as at least one disk memory.
[0092] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the buses in the drawings of this application are not limited to only one bus or one type of bus.
[0093] This application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0094] This application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the above method is implemented.
[0095] The above-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a disk, or an optical disc. The readable storage medium can be any available medium accessible by a general-purpose or special-purpose computer.
[0096] An exemplary readable storage medium is coupled to the processor, enabling the processor to read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application-specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in a device.
[0097] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0098] Furthermore, it should be noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0099] It should be understood that the above device embodiments are illustrative only, and the devices of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0100] When the integrated unit / module is implemented in the form of hardware, the hardware can be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic storage medium or magneto-optical storage medium, such as resistive random access memory RRAM (Resistive Random Access Memory), dynamic random access memory DRAM (Dynamic Random Access Memory), static random access memory SRAM (Static Random-Access Memory), enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), high-bandwidth memory HBM (High-Bandwidth Memory), hybrid memory cube HMC (Hybrid Memory Cube), etc.
[0101] In the above embodiments, the descriptions of the respective embodiments each have their own focuses. For the parts not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as falling within the scope described in this specification.
[0102] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present application are pointed out by the following claims.
[0103] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.
Claims
1. A data backup method, characterized in that: include: In the case of receiving the data to be backed up uploaded by the backup system, determining a first tape in the tape library located in the first logical tape library; Determine to back up the data to be backed up to the first tape, and obtain the first moment when the first tape receives the data to be backed up; A tape status detection instruction is initiated to the tape library. When the difference between the second moment when the status detection instruction is issued and the first moment is greater than a first preset value, it is determined that the backup of the data to be backed up is complete, and a removal instruction is initiated to the tape library, wherein the removal instruction is used to instruct the tape library to add the first tape to a second logical tape library.
2. The method according to claim 1, characterized in that After initiating a library-out instruction to the tape library, the method further comprises: Initiating a query instruction to the backup system according to a preset period, and receiving the retention time corresponding to the data to be backed up fed back by the backup system based on the query instruction; When the difference between the third moment of initiating the query instruction and the fourth moment of initiating the outbound instruction is greater than the retention time, it is determined to initiate a multiplexing instruction to the tape library, wherein the multiplexing instruction is used to instruct the tape library to move the first tape from the second logical tape library to the first logical tape library.
3. The method according to claim 2, characterized in that After determining to initiate a multiplexing instruction to the tape library, the method further includes: The data stored in the first magnetic tape is deleted.
4. The method according to claim 1, characterized in that: Before determining the first tape in the tape library that is located in the first logical tape library, the method further includes: Determine the use status of the magnetic tape in the first logical tape library, wherein the use status includes: in use and to be used; A second tape in the tape library is determined to be in use, and whether the second tape is allowed to be determined as the first tape according to the task size of the backup task being executed by the second tape.
5. The method according to claim 4, characterized in that Determining whether to allow the second tape to be determined as the first tape according to the task size of the backup task being executed by the second tape includes: In a case where the first data volume corresponding to the backup task is greater than or equal to the second data volume corresponding to the second tape, prohibiting the second tape from being determined as the first tape; In a case where the first data volume corresponding to the backup task is smaller than the second data volume corresponding to the second tape, it is allowed to determine the second tape as the first tape.
6. The method according to claim 1, characterized in that In the case of receiving the to-be-backed-up data uploaded by the backup system, after determining the first tape in the tape library located in the first logical tape library, the method further includes: Determine the number of tapes corresponding to the first magnetic tape in the first logical tape library; When the number of magnetic tapes is less than a second preset value, a prompt message is sent to the target object, wherein the prompt message is used to prompt the target object to fill blank magnetic tapes, and the prompt message carries at least the number of magnetic tapes.
7. The method according to claim 1, characterized in that Determining to back up the data to be backed up to the first magnetic tape, and obtaining the first moment when the first magnetic tape receives the data to be backed up, comprises: After sending the data to be backed up to the first magnetic tape, monitoring the use status of the first magnetic tape in real time; Determine a fifth time point when the use state of the first magnetic tape is switched from being in use to being ready for use; The fifth moment is determined as the first moment when the first magnetic tape completes receiving the data to be backed up.
8. A data backup device, comprising: A determination module, configured to determine a first tape in a first logical tape library in a tape library when receiving the data to be backed up uploaded by the backup system; An acquisition module, used for determining to back up the data to be backed up to the first magnetic tape, and acquiring a first moment when the first magnetic tape completes receiving the data to be backed up; The backup module is used to initiate a tape status detection instruction to the tape library. When the difference between the second moment when the status detection instruction is issued and the first moment is greater than a first preset value, it is determined that the backup of the data to be backed up is completed, and an outbound instruction is initiated to the tape library, wherein the outbound instruction is used to instruct the tape library to add the first tape to a second logical tape library.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.