Process-controllable backup method, device, system, equipment and medium
By maintaining the traversal state of metadata, the backup task can be dynamically paused and resumed, solving the problems of resource waste and low recovery efficiency after task interruption in traditional backup systems, and improving the flexibility and efficiency of the backup system.
Patent Information
- Application Number
- CN202511063667.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-07
AI Technical Summary
Existing backup technologies are difficult to interrupt flexibly during task execution and are inefficient during recovery, resulting in wasted resources and lengthy backup times, making them unable to adapt to dynamically changing operating environments.
By maintaining the traversal status of metadata and marking the traversal progress of files in a preset set, the backup task can be dynamically paused and accurately restored, avoiding repeated scanning of backed-up data, and the progress information can be saved using the traversal set.
Significantly reduces the consumption of computing resources, storage, and network bandwidth, enhances the elastic scheduling capability of the backup system in highly sensitive/high-reliability scenarios, shortens the backup time window, and ensures data integrity.
Smart Images

Figure CN120909845A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of backup, in particular to a process controllable backup method, device, system, equipment and medium. BACKGROUND
[0002] In the key industry fields of finance, insurance, medical treatment, banking, etc., information systems carry a large amount of core business data. These data not only have great value, but also are related to business continuity, compliance requirements, and even public interests. Therefore, establishing an efficient and reliable data backup mechanism is a basic link to protect data security and business resilience.
[0003] At present, the traditional backup system widely used in the industry has significant limitations when performing large-scale data backup tasks. One of the core problems is the rigidity of backup task execution. Once such a system starts the backup process, it is usually difficult to perform flexible interruption operations during execution. When encountering sudden emergencies (such as sudden high load of system resources, higher priority task requests) or unpredictable resource conflicts, administrators often lack effective means to immediately suspend the ongoing backup task to release resources or respond to higher priority needs. This "non-interruptible" feature can easily lead to long-term occupation of system resources (such as CPU, memory, network bandwidth, and storage IO) in unnecessary cases, resulting in resource waste. More seriously, in the case of intense resource contention, the backup task itself may fail due to insufficient resources, affecting the effectiveness of data protection.
[0004] Another prominent problem is the low recovery efficiency after the interruption of the backup task. After the task is suspended or fails, the traditional backup system usually cannot effectively identify and utilize the data part that has been successfully backed up before the task interruption if the backup process needs to be restarted. Most solutions require subsequent backup operations to start from scratch, re-scanning all source data and attempting to backup. This means that even if a significant proportion of the backup work has been completed before the task, these already backed up data still need to be processed again (including repeated scanning, reading, transmitting, and writing) when the recovery runs. This invalid repetition of already backed up data not only greatly prolongs the overall backup time window, reduces the efficiency of backup operations, but also causes additional consumption of computing resources, network bandwidth, and storage space, making the backup process lengthy and costly.
[0005] In summary, the existing backup technology has obvious deficiencies in flexible interruption control and efficient breakpoint resumption after task execution. The lack of effective pause / resume mechanisms makes it difficult for the backup system to adapt to dynamically changing operating environments, and it is unable to provide efficient and reliable data protection services while ensuring reasonable use of resources. SUMMARY
[0006] Embodiments of the present application provide a process-controllable backup method, device, system, equipment and medium, aiming at solving the problem of low efficiency and high resource consumption in the prior art backup scheme.
[0007] In a first aspect, the embodiments of the present application provide a process-controllable backup method, which comprises:
[0008] sending a directory path to be backed up to an agent end, wherein the agent end traverses a file in the directory path to be backed up and sends metadata of the file to the server;
[0009] receiving the metadata, and maintaining a traversal state of the metadata in a preset traversal set according to a traversal progress of the file;
[0010] if the traversal state of the metadata is traversal completed, controlling the agent end to backup the file, and deleting the traversal state of the metadata from the traversal set after the backup of the file is completed;
[0011] judging whether to trigger a backup pause;
[0012] if the backup pause is triggered, saving the traversal set;
[0013] if the backup resumption is triggered, obtaining the traversal state of the metadata in the traversal set;
[0014] if the traversal state of the metadata is in traversal, controlling the agent end to traverse a file corresponding to the metadata, and turning to the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file;
[0015] if the traversal state of the metadata is traversal completed, turning to the step of controlling the agent end to backup the file.
[0016] Optionally, before the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file, the method further comprises:
[0017] receiving a file traversal progress message sent by the agent end every preset time interval, and determining the traversal progress of the file according to the file traversal progress message.
[0018] Optionally, the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file comprises:
[0019] if the traversal progress of the file is incomplete traversal, marking the traversal state of the metadata as in traversal;
[0020] If the traversal progress of the file is completed, the traversal state of the metadata is marked as completed.
[0021] Optionally, the controlling the agent to backup the file comprises:
[0022] sending a backup instruction containing the metadata to the agent, wherein the agent performs a backup operation on the file corresponding to the metadata in response to the backup instruction.
[0023] Optionally, the determining whether to trigger the suspension of backup comprises:
[0024] determining whether an external suspension instruction is received, or a preset high-priority task requests resources, or system resource occupation exceeds a preset threshold;
[0025] If the external suspension instruction is received, or the preset high-priority task requests resources, or the system resource occupation exceeds the preset threshold, it is determined that the suspension of backup is triggered.
[0026] Optionally, the controlling the agent to traverse the file corresponding to the metadata comprises:
[0027] sending a traversal instruction containing the metadata to the agent, wherein the agent performs a traversal operation on the file corresponding to the metadata in response to the traversal instruction.
[0028] In a second aspect, an embodiment of the present application further provides a process-controllable backup device, which comprises units for executing the above method.
[0029] In a third aspect, an embodiment of the present application further provides a computer device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program.
[0030] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program can implement the above method when being executed by a processor.
[0031] In a fifth aspect, an embodiment of the present application further provides a process-controllable backup system, which comprises a server and an agent, the server is connected with the agent, and the server is configured to execute the method in the first aspect.
[0032] Embodiments of the present application provide a process controllable backup method, device, system, equipment and medium. The method comprises: sending a directory path to be backed up to an agent end, wherein the agent end traverses files in the directory path to be backed up and sends metadata of the files to the server; receiving the metadata, maintaining a traversal state of the metadata in a preset traversal set according to a traversal progress of the files; if the traversal state of the metadata is traversal completed, controlling the agent end to backup the files, and deleting the traversal state of the metadata from the traversal set after the backup of the files is completed; judging whether to trigger a pause backup; if the pause backup is triggered, saving the traversal set; if a resume backup is triggered, obtaining the traversal state of the metadata in the traversal set; if the traversal state of the metadata is in traversal, controlling the agent end to traverse the files corresponding to the metadata, and turning to the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the files; if the traversal state of the metadata is traversal completed, turning to the step of controlling the agent end to backup the files. The present application realizes dynamic pause and accurate recovery of a backup task, and through maintaining the traversal state (in traversal / traversal completed) of the metadata in the traversal set, the progress can be frozen when the task is interrupted; when the task is resumed, the data is directly transmitted according to the state mark, the "in traversal" directory is rescaned to ensure data integrity, and the "traversal completed" file is directly backed up to skip redundant operations. The mechanism completely avoids the defects of full rescan in the traditional recovery scheme, significantly reduces the consumption of computing resources, storage and network bandwidth, and improves the elastic scheduling capability of the backup system in high sensitivity / high reliability scenarios such as finance and medical treatment. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0034] Figure 1 The flowchart of the process controllable backup method provided by the embodiments of the present application is shown in the figure.
[0035] Figure 2 The structural block diagram of the process controllable backup system provided by the embodiments of the present application is shown in the figure.
[0036] Figure 3 The schematic block diagram of the computer equipment provided by the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION
[0037] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described, obviously, the described embodiments are a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the protection scope of the present application.
[0038] It should be understood that the terms "comprising" and "including" as used in the specification and the appended claims indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0039] It should also be understood that the terms used in the present application specification are only for the purpose of describing particular embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clearly indicated by the context, the singular forms "a", "an" and "the" are intended to include the plural forms as well.
[0040] It should be further understood that the term "and / or" as used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0041] As used in the present application specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted as meaning "upon determining" or "in response to determining" or "upon detecting [a described condition or event]" or "in response to detecting [a described condition or event]" depending on the context.
[0042] Referring to Figure 1 The present application embodiment provides a backup method with controllable progress, which comprises the following steps:
[0043] S1, sending a directory path to be backed up to an agent end, wherein the agent end traverses files in the directory path to be backed up and sends metadata of the files to the server.
[0044] In a specific implementation, the directory path to be backed up can be determined by a user or determined based on a preset file backup rule, and the present application does not specifically limit this.
[0045] The server sends a directory path to be backed up to the agent end to inform the agent end of the location of the file to be backed up. The agent end refers to a terminal used to perform a file backup task.
[0046] Correspondingly, after receiving the directory path to be backed up, the agent end traverses the file in the directory path to be backed up and sends metadata of the file to the server.
[0047] It should be noted that the metadata refers to basic information describing the properties of the file itself rather than the content of the file, and is a core data carrier for realizing the pause / resume function of the backup task. The metadata plays a role in identifying the file.
[0048] S2, receiving the metadata, maintaining the traversal state of the metadata in a preset traversal set according to the traversal progress of the file.
[0049] In a specific implementation, the server receives the metadata. The traversal state of the metadata is maintained in a preset traversal set according to the traversal progress of the file.
[0050] In the embodiment of the application, the agent end sends a file traversal progress message to the server every preset time interval, and the file traversal progress message records the traversal progress of each file.
[0051] Correspondingly, the server receives the file traversal progress message sent by the agent end every preset time interval, and determines the traversal progress of the file according to the file traversal progress message. Further, the traversal state of the metadata is maintained in a preset traversal set according to the traversal progress of the file.
[0052] In some preferred embodiments, the above step of "maintaining the traversal state of the metadata in a preset traversal set according to the traversal progress of the file" specifically includes the following steps: if the traversal progress of the file is incomplete traversal, marking the traversal state of the metadata as "traversing"; if the traversal progress of the file is complete traversal, marking the traversal state of the metadata as "traversal complete".
[0053] In the embodiment of the application, the mapping rule of the traversal state and the progress message (incomplete → traversing, complete → traversal complete) is clearly defined, so that the state marking is strongly associated with the file system operation. For example, when the agent end scans a large video file (such as 50 GB), if the file is not completely traversed (may be due to block reading delay), it is marked as "traversing"; only when the agent end confirms that the file is completely traversed, it is marked as "traversal complete".
[0054] S3, if the traversal state of the metadata is traversal completed, controlling the agent to backup the file, and deleting the traversal state of the metadata from the traversal set after the backup of the file is completed.
[0055] In specific implementation, if the traversal state of the metadata is traversal completed, the agent is controlled to backup the file. Further, the traversal state of the metadata is deleted from the traversal set after the backup of the file is completed. Further, the state of the metadata can be marked as backup completed.
[0056] In some preferred embodiments, the step of "controlling the agent to backup the file" specifically comprises the step of: sending a backup instruction containing the metadata to the agent, wherein the agent performs a backup operation on the file corresponding to the metadata in response to the backup instruction.
[0057] In specific implementation, the server constructs a backup instruction based on the metadata, and sends the backup instruction containing the metadata to the agent. The agent correspondingly receives the backup instruction, and parses the backup instruction to obtain the metadata. Further, the agent performs a backup operation on the file corresponding to the metadata in response to the backup instruction.
[0058] S4, determining whether to trigger a backup pause.
[0059] In specific implementation, a backup pause rule is set by a person skilled in the art in advance, and the server determines whether to trigger a backup pause based on the backup pause rule.
[0060] For example, in some preferred embodiments, the step of "determining whether to trigger a backup pause" specifically comprises the step of: determining whether an external pause instruction is received, or a preset high-priority task requests resources, or system resource occupation exceeds a preset threshold; if the external pause instruction is received, or the preset high-priority task requests resources, or the system resource occupation exceeds the preset threshold, it is determined that the backup pause is triggered.
[0061] In the embodiments of the application, three conditions (external instruction / high-priority task / resource overrun) of triggering a pause are defined, so that the backup task has dynamic response capability. Taking resource overrun as an example: when the system detects that the CPU occupation exceeds a preset threshold (such as 90%), the pause is automatically triggered, and the current traversal set is saved; the task is resumed after the resources are released.
[0062] S5, if the backup pause is triggered, saving the traversal set.
[0063] In specific implementation, if the backup pause is triggered, the traversal set is saved, and all backup tasks are stopped.
[0064] S6, if the backup is triggered to be recovered, obtaining the traversal state of the metadata in the traversal set.
[0065] In a specific implementation, the backup recovery rule is set by a person skilled in the art in advance, and it is determined whether the backup is triggered to be recovered. For example, the backup is recovered when the recovery instruction is received.
[0066] In a specific implementation, the backup recovery rule is set by a person skilled in the art in advance, and it is determined whether the backup is triggered to be recovered. For example, the backup is recovered when the recovery instruction is received.
[0067] S7, if the traversal state of the metadata is in traversal, controlling the agent to traverse the file corresponding to the metadata, and turning to the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file.
[0068] In a specific implementation, if the traversal state of the metadata is in traversal, the agent is controlled to traverse the file corresponding to the metadata, and the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file is turned to.
[0069] It can be seen that only the file corresponding to the metadata in the state of traversal needs to be re-traversed, and all files do not need to be re-traversed, thereby effectively reducing the amount of data that needs to be traversed.
[0070] In some preferred embodiments, the above step of "controlling the agent to traverse the file corresponding to the metadata" specifically includes the following steps: sending a traversal instruction containing the metadata to the agent, wherein the agent performs a traversal operation on the file corresponding to the metadata in response to the traversal instruction.
[0071] In a specific implementation, the server generates a traversal instruction based on the metadata and sends the traversal instruction containing the metadata to the agent.
[0072] The agent parses the traversal instruction to obtain the metadata after receiving the traversal instruction. Further, the agent performs a traversal operation on the file corresponding to the metadata in response to the traversal instruction.
[0073] S8, if the traversal state of the metadata is in traversal, turning to the step of controlling the agent to backup the file.
[0074] In a specific implementation, if the traversal state of the metadata is in traversal, the step of controlling the agent to backup the file is turned to.
[0075] It can be seen that only the file corresponding to the metadata with the state of traversal completion needs to be re-backed up, and all files do not need to be re-backed up, thereby effectively reducing the amount of data to be backed up.
[0076] The embodiment of the application provides a backup method with controllable progress, comprising: sending a directory path to be backed up to an agent end, wherein the agent end traverses files in the directory path to be backed up and sends metadata of the files to the server; receiving the metadata, maintaining a traversal state of the metadata in a preset traversal set according to a traversal progress of the files; if the traversal state of the metadata is traversal completion, controlling the agent end to back up the files, and deleting the traversal state of the metadata from the traversal set after the backup of the files is completed; judging whether to trigger a pause backup; if the pause backup is triggered, saving the traversal set; if the resume backup is triggered, obtaining the traversal state of the metadata in the traversal set; if the traversal state of the metadata is in traversal, controlling the agent end to traverse files corresponding to the metadata, and turning to the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the files; if the traversal state of the metadata is traversal completion, turning to the step of controlling the agent end to back up the files. The application dynamically maintains the traversal state of the metadata and controls the backup process based on the state, and effectively solves the core defects that the traditional backup system cannot be flexibly interrupted and efficiently resumed.
[0077] Specifically, when the backup task is performed, the system continuously updates the state marks (such as “in traversal” or “traversal completion”) of the file metadata in the traversal set, forming a real-time snapshot of the backup progress; if the task is triggered to pause due to external instructions or resource conflicts, the system realizes progress freezing by completely saving the traversal set, and completely retains the intermediate state of the unfinished directories and files; when the task resumes running, the system directly reads the state records in the traversal set, accurately distinguishes the processing logic: reinitiates file traversal for the directories marked as “in traversal”, ensuring that the newly added files during the pause period are included in the backup range; directly resumes the backup operation for the files marked as “traversal completion”, skipping the files that have been backed up. The breakpoint positioning mechanism driven by the state completely avoids the redundant operation of scanning the full data from the beginning in the traditional scheme.
[0078] For example, in the large financial transaction log backup scenario, if the task is suspended due to urgent settlement requirements, when resuming, thousands of processed transaction records can be accurately skipped, and only new log entries need to be scanned, avoiding repeated reading and writing of storage media. At the same time, by deleting the metadata state of the completed backup, the database storage load is effectively reduced. Finally, under the premise of ensuring data integrity, the recovery efficiency after the interruption of the backup task is significantly improved, and the invalid occupation of computing resources, network bandwidth and storage space is reduced, which is especially suitable for high-sensitivity / high-reliability scenarios such as bank core systems or medical image storage that require dynamic adjustment of backup priorities.
[0079] Based on the process controllable backup technical solution of the application, the application cases in key industry fields are as follows:
[0080] Financial field application
[0081] In the securities trading system, high-frequency transaction logs (about TB level data) need to be backed up after closing every day. Traditional backup is easily interrupted by night settlement task resource occupation, and it takes several hours to restart full scanning. After using the present solution, when the backup is suspended due to the settlement task, the system freezes the state of the 200,000 scanned log files; when resuming, only the newly added logs in the "traversal" are rescaned (about 5% data), and the 95% files marked as "traversal completed" are skipped, reducing the backup window from 6 hours to 30 minutes, ensuring that data protection is completed before opening.
[0082] Insurance field application
[0083] The provincial medical insurance platform needs to backup tens of millions of electronic insurance images every day. After the traditional backup is interrupted due to network fluctuations, rescaning a large number of small files causes IO congestion during peak business hours. The present solution automatically suspends when the network delay exceeds the threshold, saving the traversal state of the image files; after the network recovers, only the directories that were not completed during the suspension (such as newly added claim images) are rescaned, and the files marked as completed are directly transferred for backup, avoiding 99% of redundant scanning and reducing the peak backup resource occupation by 80%, ensuring smooth operation of core business.
[0084] Medical field application
[0085] The tertiary hospital system generates tens of thousands of medical images (CT / MRI) every hour. If an emergency review request is encountered during the backup process, the system automatically suspends according to the resource threshold and records the scanned file state; after the high-priority task is completed, only the newly added emergency images during the suspension period (about 3% of the total) need to be rescaned, and the 10GB image files that have been "traversed" are directly triggered for incremental backup. This reduces the image backup interruption recovery time from 3 hours to 10 minutes, and avoids repeated transmission of bandwidth occupation on the diagnosis network.
[0086] Banking field application
[0087] The bank core system account flow backup needs to be completed within a 2-hour window. When a sudden large amount of transfer causes CPU overload, the present solution immediately suspends the backup and saves the traversal set; after the resources are released, the state is accurately restored: the "traversing" daily new flow directory is rescanned (to ensure data integrity), and the 800,000 historical flows of "traversal completion" are directly continued. Compared with the traditional solution of restarting and scanning 20TB of data, the present solution reduces 92% of IO operations, strictly meeting the backup timeliness requirement of the supervision.
[0088] Referring to Figure 2 The embodiment of the present application provides a process-controllable backup system, which comprises a server 100 and an agent end 200, the server 100 is connected with the agent end 200, and the server 100 is used for executing the process-controllable backup method provided in any of the above embodiments.
[0089] Corresponding to the above process-controllable backup method, the present application also provides a process-controllable backup device. The process-controllable backup device comprises units for executing the above process-controllable backup method, and the process-controllable backup device can be configured in a desktop computer, a tablet computer, a laptop computer, and the like. Specifically, the process-controllable backup device comprises:
[0090] A sending unit is configured to send a to-be-backed-up directory path to an agent end, wherein the agent end traverses files in the to-be-backed-up directory path and sends metadata of the files to the server;
[0091] A maintaining unit is configured to receive the metadata, maintain a traversal state of the metadata in a preset traversal set according to a traversal progress of the files;
[0092] A deleting unit is configured to, if the traversal state of the metadata is traversal completion, control the agent end to backup the files, and delete the traversal state of the metadata from the traversal set after the backup of the files is completed;
[0093] A judging unit is configured to judge whether to trigger a backup suspension;
[0094] A saving unit is configured to, if the backup suspension is triggered, save the traversal set;
[0095] An obtaining unit is configured to, if the backup resumption is triggered, obtain the traversal state of the metadata in the traversal set;
[0096] A first jumping unit is configured to, if the traversal state of the metadata is traversal, control the agent end to traverse files corresponding to the metadata, and jump to the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the files;
[0097] a second jump unit, configured to jump to the step of controlling the agent to backup the file if the traversal state of the metadata is traversal completed.
[0098] In some preferred embodiments, the process-controllable backup apparatus further comprises:
[0099] a receiving unit, configured to receive a file traversal progress message sent by the agent every preset time interval, and determine the traversal progress of the file according to the file traversal progress message.
[0100] In some preferred embodiments, the maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file comprises:
[0101] if the traversal progress of the file is incomplete traversal, marking the traversal state of the metadata as in traversal;
[0102] if the traversal progress of the file is complete traversal, marking the traversal state of the metadata as traversal completed.
[0103] In some preferred embodiments, the controlling the agent to backup the file comprises:
[0104] sending a backup instruction containing the metadata to the agent, wherein the agent performs a backup operation on the file corresponding to the metadata in response to the backup instruction.
[0105] In some preferred embodiments, the determining whether to trigger the suspension of backup comprises:
[0106] determining whether an external suspension instruction is received, or a preset high-priority task requests resources, or system resource occupation exceeds a preset threshold;
[0107] if an external suspension instruction is received, or a preset high-priority task requests resources, or system resource occupation exceeds a preset threshold, determining to trigger the suspension of backup.
[0108] In some preferred embodiments, the controlling the agent to traverse the file corresponding to the metadata comprises:
[0109] sending a traversal instruction containing the metadata to the agent, wherein the agent performs a traversal operation on the file corresponding to the metadata in response to the traversal instruction.
[0110] It should be noted that the specific implementation process of the process-controllable backup apparatus and each unit can be clearly understood by those skilled in the art, which can be referred to the corresponding description in the foregoing method embodiments. For the convenience and brevity of description, it will not be repeated here.
[0111] The process-controllable backup apparatus can be implemented in the form of a computer program, which can run on a computer device as shown in the drawings. Figure 3
[0112] Please refer to Figure 3 , Figure 3 is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a terminal or a server, wherein the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, or other electronic devices with communication functions. The server can be a standalone server or a server cluster composed of multiple servers.
[0113] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, wherein the memory can include a non-volatile storage medium 503 and an internal memory 504.
[0114] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, can cause the processor 502 to perform a process-controllable backup method.
[0115] The processor 502 is configured to provide computing and control capabilities to support the operation of the entire computer device 500.
[0116] The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503, and the computer program 5032, when executed by the processor 502, can cause the processor 502 to perform a process-controllable backup method.
[0117] The network interface 505 is configured to perform network communication with other devices. Those skilled in the art can understand that the above structure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device 500 to which the scheme of the present application is applied. Specifically, the computer device 500 can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0118] The processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps:
[0119] sending a directory path to be backed up to an agent end, wherein the agent end traverses files in the directory path to be backed up and sends metadata of the files to the server;
[0120] receiving the metadata, and maintaining a traversal state of the metadata in a preset traversal set according to a traversal progress of the file;
[0121] if the traversal state of the metadata is traversal completed, controlling the agent to backup the file, and deleting the traversal state of the metadata from the traversal set after the backup of the file is completed;
[0122] determining whether to trigger a backup pause;
[0123] if the backup pause is triggered, saving the traversal set;
[0124] if the backup resume is triggered, obtaining the traversal state of the metadata in the traversal set;
[0125] if the traversal state of the metadata is in traversal, controlling the agent to traverse the file corresponding to the metadata, and returning to the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file;
[0126] if the traversal state of the metadata is traversal completed, returning to the step of controlling the agent to backup the file.
[0127] In some preferred embodiments, before the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file, the method further comprises:
[0128] receiving a file traversal progress message sent by the agent every preset time interval, and determining the traversal progress of the file according to the file traversal progress message.
[0129] In some preferred embodiments, the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file comprises:
[0130] if the traversal progress of the file is incomplete traversal, marking the traversal state of the metadata as in traversal;
[0131] if the traversal progress of the file is complete traversal, marking the traversal state of the metadata as traversal completed.
[0132] In some preferred embodiments, the step of controlling the agent to backup the file comprises:
[0133] sending a backup instruction containing the metadata to the agent, wherein the agent performs a backup operation on the file corresponding to the metadata in response to the backup instruction.
[0134] In some preferred embodiments, the step of determining whether to trigger a backup pause comprises:
[0135] determining whether an external pause instruction is received, or a preset high-priority task requests a resource, or a system resource occupation exceeds a preset threshold value;
[0136] If an external pause instruction is received, or a preset high-priority task requests a resource, or a system resource occupation exceeds a preset threshold value, it is determined that a pause backup is triggered.
[0137] In some preferred embodiments, the control of the agent end traversing the file corresponding to the metadata comprises:
[0138] sending a traversal instruction containing the metadata to the agent end, wherein the agent end performs a traversal operation on the file corresponding to the metadata in response to the traversal instruction.
[0139] It should be understood that, in the embodiments of the present application, the processor 502 can be a central processing unit (CPU), and the processor 502 can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0140] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the above-mentioned embodiments.
[0141] Therefore, the present application also provides a storage medium. The storage medium can be a computer-readable storage medium. The storage medium stores a computer program. The computer program is executed by a processor to make the processor perform the following steps:
[0142] sending a directory path to be backed up to the agent end, wherein the agent end traverses the file in the directory path to be backed up and sends metadata of the file to the server;
[0143] receiving the metadata, and maintaining a traversal state of the metadata in a preset traversal set according to a traversal progress of the file.
[0144] If the traversal state of the metadata is traversal completed, the backup of the file is controlled, and after the backup of the file is completed, the traversal state of the metadata is deleted from the traversal set;
[0145] It is judged whether the backup is triggered to be paused;
[0146] If the backup is triggered to be paused, the traversal set is saved;
[0147] If the backup is triggered to be resumed, the traversal state of the metadata in the traversal set is acquired;
[0148] If the traversal state of the metadata is in traversal, the file corresponding to the metadata is controlled to be traversed by the agent, and the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file is proceeded to;
[0149] If the traversal state of the metadata is traversal completed, the step of controlling the backup of the file by the agent is proceeded to.
[0150] In some preferred embodiments, before the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file, the method of the application further comprises:
[0151] Every interval of the preset time interval, the file traversal progress message sent by the agent is received, and the traversal progress of the file is determined according to the file traversal progress message.
[0152] In some preferred embodiments, the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the file comprises:
[0153] If the traversal progress of the file is not completed traversal, the traversal state of the metadata is marked as in traversal;
[0154] If the traversal progress of the file is completed traversal, the traversal state of the metadata is marked as traversal completed.
[0155] In some preferred embodiments, the step of controlling the backup of the file by the agent comprises:
[0156] The backup instruction containing the metadata is sent to the agent, and the agent performs the backup operation on the file corresponding to the metadata in response to the backup instruction.
[0157] In some preferred embodiments, the step of judging whether the backup is triggered to be paused comprises:
[0158] It is judged whether an external pause instruction is received, or a preset high-priority task requests resources, or system resource occupation exceeds a preset threshold;
[0159] If an external pause instruction is received, or a preset high-priority task requests a resource, or system resource occupation exceeds a preset threshold, it is determined that a pause backup is triggered.
[0160] In some preferred embodiments, the control agent traverses the file corresponding to the metadata, including:
[0161] The control agent is sent a traversal instruction containing the metadata, wherein the control agent performs a traversal operation on the file corresponding to the metadata in response to the traversal instruction.
[0162] The storage medium is an entity, non-transient storage medium, for example, can be a U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), a magnetic disk or optical disk and various entity storage medium that can store program codes. The computer readable storage medium can be non-volatile, but also can be volatile.
[0163] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in the above description in general terms. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0164] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and actual implementation can have another division manner. For example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed.
[0165] The steps in the method of the embodiments of the present application can be adjusted, combined and deleted in sequence according to actual needs. The units in the device of the embodiments of the present application can be combined, divided and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.
[0166] The integrated unit, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art that contributes to the present application, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application.
[0167] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0168] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, these modifications and variations of the present application also belong to the scope of the claims of the present application and its equivalent technologies, and the present application also intends to include these modifications and variations.
[0169] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A process-controllable backup method, characterized by, The method comprises: sending a directory path to be backed up to an agent, wherein the agent traverses files in the directory path to be backed up and sends metadata of the files to the server; receiving the metadata, and maintaining a traversal state of the metadata in a preset traversal set according to a traversal progress of the files; if the traversal state of the metadata is traversal completed, controlling the agent to back up the files, and deleting the traversal state of the metadata from the traversal set after the backup of the files is completed; determining whether to trigger a backup pause; if the backup pause is triggered, saving the traversal set; if a backup resumption is triggered, obtaining the traversal state of the metadata in the traversal set; if the traversal state of the metadata is in traversal, controlling the agent to traverse the files corresponding to the metadata, and returning to the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the files; if the traversal state of the metadata is traversal completed, returning to the step of controlling the agent to back up the files.
2. The process-controllable backup method according to claim 1, characterized by, Before the step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the files, the method further comprises: receiving a file traversal progress message sent by the agent every preset time interval, and determining the traversal progress of the files according to the file traversal progress message.
3. The process-controllable backup method according to claim 2, characterized by, The step of maintaining the traversal state of the metadata in the preset traversal set according to the traversal progress of the files comprises: if the traversal progress of the files is incomplete traversal, marking the traversal state of the metadata as in traversal; if the traversal progress of the files is complete traversal, marking the traversal state of the metadata as traversal completed.
4. The process-controllable backup method according to claim 1, characterized by, The step of controlling the agent to back up the files comprises: sending a backup instruction containing the metadata to the agent, wherein the agent performs a backup operation on the files corresponding to the metadata in response to the backup instruction.
5. The process-controllable backup method according to claim 1, characterized by, The step of determining whether to trigger the backup pause comprises: determining whether an external pause instruction is received, or a preset high-priority task requests resources, or system resource occupation exceeds a preset threshold; if the external pause instruction is received, or the preset high-priority task requests resources, or the system resource occupation exceeds the preset threshold, it is determined that the backup pause is triggered.
6. The process-controllable backup method according to claim 1, characterized by, The step of controlling the agent to traverse the files corresponding to the metadata comprises: sending a traversal instruction containing the metadata to the agent, wherein the agent performs a traversal operation on the files corresponding to the metadata in response to the traversal instruction.
7. A process-controllable backup system, characterized by The backup system comprises a server and an agent, the server is connected with the agent, and the server is configured to execute the method according to any one of claims 1-6.
8. A process-controllable backup apparatus characterized by comprising: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1-6.
9. A computer device, comprising: 10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program which, when executed by the processor, can implement the method of any one of claims 1-6.
Citation Information
Cited By
A method and system for automated generation of vertical domain knowledge question-answer pairs
CN122507865A