CN116302708A - Data backup method, device, equipment and storage medium based on load balancing - Google Patents

Data backup method, device, equipment and storage medium based on load balancing Download PDF

Info

Publication number
CN116302708A
CN116302708A CN202310313147.5A CN202310313147A CN116302708A CN 116302708 A CN116302708 A CN 116302708A CN 202310313147 A CN202310313147 A CN 202310313147A CN 116302708 A CN116302708 A CN 116302708A
Authority
CN
China
Prior art keywords
backup
target
database
data
load balancing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310313147.5A
Other languages
Chinese (zh)
Inventor
刘映希
陶念真
比干强
王亦佳
刘欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202310313147.5A priority Critical patent/CN116302708A/en
Publication of CN116302708A publication Critical patent/CN116302708A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1461Backup scheduling policy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a data backup method, a device, equipment and a storage medium based on load balancing, wherein a backup task is generated by calling a preset backup script corresponding to a backup attribute based on the backup attribute of a data center, so that the corresponding backup task can be automatically generated according to the backup attribute, and manual operation of a user is not needed; the backup tasks are distributed to target backup executors, the target backup executors are backup executors of resource areas where target databases of the data center are located, and the target backup executors are controlled to execute the backup tasks based on a target load balancing strategy so as to carry out data backup on the target databases, so that the executors can be intelligently distributed according to the resource areas, multithreading parallel execution is realized, further, data backup efficiency of the data center is improved, and labor cost involved in data backup is reduced.

Description

Data backup method, device, equipment and storage medium based on load balancing
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for data backup based on load balancing.
Background
In the operation and maintenance process of the data center, the system backup is mainly carried out on the data center in a manual script backup mode and a cloud manufacturer RDS backup mode.
At present, a manual script backup mode performs backup through a backup scheme built by operation and maintenance personnel, but the backup of all user data is difficult to complete within a fixed time period, so that the product use of a user is affected or the data recovery cannot be performed by using the latest backup. The cloud manufacturer RDS backup mode creates automatic backup of the database instance in the backup period of the database instance, and stores the automatic backup according to the appointed backup retention period, but the backup retention period has limited duration, so that the operation and maintenance support workload is increased. It can be seen that the prior art backup approach is very inefficient.
Disclosure of Invention
The application provides a data backup method, device, equipment and storage medium based on load balancing, which can improve the data backup efficiency of a data center and reduce the labor cost involved in data backup.
In order to solve the above technical problems, in a first aspect, the present application provides a data backup method based on load balancing, including:
based on the backup attribute of the data center, calling a preset backup script corresponding to the backup attribute to generate a backup task;
distributing the backup task to a target backup execution machine, wherein the target backup execution machine is a backup execution machine of a resource area where a target database of the data center is located;
and controlling the target backup execution machine to execute the backup task based on a target load balancing strategy so as to carry out data backup on the target database.
In some implementations, the generating a backup task by calling a preset backup script corresponding to the backup attribute based on the backup attribute of the data center includes:
the backup attribute of the data center is obtained, wherein the backup attribute comprises a backup period, a backup time window and a database attribute, and the data center comprises at least one target database;
for each target database, calling a preset backup script corresponding to the database attribute based on the database attribute;
and generating a backup task corresponding to the target database based on the preset backup script, the backup period and the backup time window.
In some implementations, the database attribute includes a database type and a database volume, and the calling the preset backup script corresponding to the database attribute based on the database attribute includes:
determining a backup strategy corresponding to the database volume;
and calling the preset backup script of the backup strategy based on the preset corresponding relation between the database type and the preset backup script.
In some implementations, the distributing the backup task to the target backup execution machine includes:
for each target database of the data center, matching a resource area where the target database is located with a resource area where the backup execution machine is located, and determining the target backup execution machine which is located in the same resource area as the target database;
and sending the backup task corresponding to the target database to the target backup execution machine.
In some implementations, the target load balancing policy includes a data service concurrency connection policy and an executor concurrency distribution policy, and the controlling, based on the target load balancing policy, the target backup executor to execute the backup task to perform data backup on the target database includes:
based on the data service concurrency quantity connection strategy, controlling the target database to be connected to the target backup executor by preset data service concurrency quantity;
and controlling the target backup execution machine to execute the backup task with preset execution machine concurrency based on the execution machine concurrency distribution strategy.
In some implementations, before the target backup execution machine is controlled to execute the backup task based on the target load balancing policy to perform data backup on the target database, the method further includes:
responding to user input information, and configuring the executive machine concurrency of the target backup executive machine and the data service concurrency of the target database;
generating an executive machine concurrency quantity distribution strategy based on the executive machine concurrency quantity;
and generating the data service concurrency quantity connection strategy based on the data service concurrency quantity.
In some implementations, after controlling the target backup execution machine to execute the backup task based on the target load balancing policy to perform data backup on the target database, the method further includes:
and storing backup data obtained after the target database data is backed up into a cloud storage bucket of a resource area where the target database is located.
In a second aspect, the present application further provides a data backup device based on load balancing, including:
the calling module is used for calling a preset backup script corresponding to the backup attribute based on the backup attribute of the data center to generate a backup task;
the distribution module is used for distributing the backup task to a target backup execution machine, wherein the target backup execution machine is a backup execution machine of a resource area where a target database of the data center is located;
and the control module is used for controlling the target backup execution machine to execute the backup task based on a target load balancing strategy so as to carry out data backup on the target database.
In a third aspect, the present application further provides a computer device, comprising a processor and a memory for storing a computer program which, when executed by the processor, implements the load balancing based data backup method according to the first aspect.
In a fourth aspect, the present application further provides a computer readable storage medium storing a computer program, which when executed by a processor implements the load balancing based data backup method according to the first aspect.
In a fifth aspect, the present application also provides a computer program product which, when run on a computer device, causes the computer device to perform the load balancing based data backup method as described in the first aspect.
Compared with the prior art, the application has the following beneficial effects:
the backup tasks are generated by calling the preset backup scripts corresponding to the backup attributes based on the backup attributes of the data center, so that the corresponding backup tasks can be automatically generated according to the backup attributes, and manual operation of a user is not needed; the backup tasks are distributed to target backup executors, the target backup executors are backup executors of resource areas where target databases of the data center are located, and the target backup executors are controlled to execute the backup tasks based on a target load balancing strategy so as to carry out data backup on the target databases, so that the executors can be intelligently distributed according to the resource areas, multithreading parallel execution is realized, further, data backup efficiency of the data center is improved, and labor cost involved in data backup is reduced.
Drawings
Fig. 1 is a flow chart of a data backup method based on load balancing according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a task generation process according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a task distribution process according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a task execution process according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a data backup device based on load balancing according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Referring to fig. 1, fig. 1 is a flow chart of a data backup method based on load balancing according to an embodiment of the present application. The data backup method based on load balancing can be applied to computer equipment, wherein the computer equipment comprises, but is not limited to, smart phones, notebook computers, tablet computers, desktop computers, physical servers, cloud servers and the like. As shown in fig. 1, the load balancing-based data backup method of the present embodiment includes steps S101 to S103, which are described in detail below:
step S101, based on the backup attribute of the data center, a preset backup script corresponding to the backup attribute is called to generate a backup task.
In this embodiment, the backup attribute is an attribute of data needed to be backed up by the data center, which includes, but is not limited to, a backup period, a backup time window, a type of database to be backed up, a database volume, and the like. It can be understood that the backup attribute of the embodiment can be set according to the user backup personalized requirement, so as to meet the personalized operation and maintenance scene of the data center.
The preset backup script is an executable file for backing up the data of the database, and can be SQL script and the like; the backup task is a task which is distributed to the execution machine to realize data backup according to a preset backup script. It should be noted that the data center includes at least one database, which may have a plurality of different types of sub-databases. The preset backup scripts corresponding to different database types are different, and each database corresponds to at least one backup task.
Step S102, distributing the backup task to a target backup execution machine, wherein the target backup execution machine is a backup execution machine of a resource area where a target database of the data center is located.
In this step, the backup executor may be an Agent executor, where an Agent is server software that may work between a client and a server, and is used to proxy a request between a user and a browser, so as to be responsible for proxy browser and communication between the browser and the server.
It will be appreciated that multiple databases of a data center may be deployed in multiple resource areas, each resource area corresponding to one or more backup execution machines. And distributing the backup tasks corresponding to the database to the backup executors under the resource areas based on the difference of the resource areas where the database is located.
And step S103, based on a target load balancing strategy, controlling the target backup execution machine to execute the backup task so as to carry out data backup on the target database.
In this step, the target load balancing policy is a policy for controlling the backup execution machine to perform data backup, which may include an execution machine concurrency volume distribution policy and a data service concurrency volume connection policy. The concurrent quantity distribution policy of the execution machine is used for controlling the task quantity executed by the backup execution machine at the same time, and the concurrent quantity connection policy of the data service is used for controlling the quantity of the backup execution machines connected with the database, which can be Remote Data Service (RDS). It should be appreciated that the data service is an online cloud database service based on a cloud computing platform, and that one data service may be deployed to multiple databases at the same time.
It should be noted that, in this embodiment, the backup task is generated by calling the preset backup script corresponding to the backup attribute based on the backup attribute of the data center, so that the corresponding backup task can be automatically generated according to the backup attribute, and manual operation of a user is not required; the backup task is distributed to a target backup execution machine, and the target backup execution machine is a backup execution machine of a resource area where a target database of a data center is located, so that the execution machine can be intelligently distributed according to the resource area to realize multi-thread parallel execution; based on the target load balancing strategy, the target backup execution machine is controlled to execute the backup task so as to carry out data backup on the target database, thereby carrying out load balancing on the execution machine so as to realize high concurrency execution tasks. The data backup efficiency of the data center is improved, and the labor cost involved in data backup is reduced.
In some embodiments, the step S101 includes:
the backup attribute of the data center is obtained, wherein the backup attribute comprises a backup period, a backup time window and a database attribute, and the data center comprises at least one target database;
for each target database, calling a preset backup script corresponding to the database attribute based on the database attribute;
and generating a backup task corresponding to the target database based on the preset backup script, the backup period and the backup time window.
In this embodiment, the backup attribute may be customized by the user through the visual interface to be invoked by the computer device when executing step S101. Optionally, for the preset backup script corresponding to each target database, a backup task is generated by combining the backup period and the backup time window, where the backup task carries the backup period, the backup time window and the preset backup script. Or writing the backup period and the backup time window into a preset backup script to generate a backup task, wherein the backup task carries the backup task comprising the backup period and the backup time window.
Optionally, the database attribute includes a database type and a database volume, and the calling process of the preset backup script includes:
determining a backup strategy corresponding to the database volume, wherein the backup strategy corresponds to a plurality of backup scripts, and different backup scripts respectively correspond to different database types;
and calling a preset backup script of the backup strategy based on a preset corresponding relation between the database type and the backup script.
In this embodiment, the backup policy corresponding to the database volume is determined based on a preset correspondence between the database volume and the backup policy. Illustratively, as shown in the task generating process schematic diagram in fig. 2, by acquiring all databases deployed by the product, a backup period and a backup time window of each database are acquired; then intelligently distributing a backup strategy according to the database volume, wherein the backup strategy is a logic backup for the database volume smaller than 100G; for database volumes less than or equal to 100G and less than 500G, the backup strategy is to logically backup to the slave library; for the database volume of more than or equal to 500G, the backup strategy is physical backup; because the database languages of different database types are different, backup scripts corresponding to multiple database languages are respectively set for each backup strategy, so that a database executing the backup strategy can identify the corresponding backup script.
It should be noted that, in this embodiment, a backup policy and a preset backup script are selected intelligently according to the database type and the database volume, so as to meet the data backup requirements of multiple databases, and meanwhile, reduce the manual operations of users participating in data backup, so that the generation efficiency of the backup task is improved and the labor cost is reduced.
In some embodiments, the step S102 includes:
for each target database of the data center, matching a resource area where the target database is located with a resource area where the backup execution machine is located, and determining the target backup execution machine which is located in the same resource area as the target database;
and sending the backup task corresponding to the target database to the target backup execution machine.
In this embodiment, the Agent executor of the resource area deployed by the database may be configured through a definable interface and manage all the resource areas. As shown in a task distribution schematic diagram in fig. 3, matching the resource area of each database with the resource area of the Agent executor, selecting the Agent executor in the same resource area as the database, and distributing the backup task of the database to the Agent executor.
For example, if a certain data center includes two databases, one database is in north-beijing four (denoted as resource area a) and the other database is in north-beijing one (denoted as resource area B), backup tasks are generated for the two databases respectively in step S101, and according to the resource area matching, the backup tasks corresponding to the database of the resource area a are distributed to the Agent executor of the resource area a, and the backup tasks corresponding to the database of the resource area B are distributed to the Agent executor of the resource area B.
It should be noted that, in this embodiment, the resource region is matched with the target backup execution machine, so as to implement parallel execution of tasks by multiple execution machines, and adapt to a scenario that multiple products are deployed in multiple databases and multiple resource regions, so that the method has high expandability.
In some embodiments, the target load balancing policy includes a data service concurrency volume connection policy and an executive concurrency volume distribution policy, and the step S103 includes:
based on the data service concurrency quantity connection strategy, controlling the target database to be connected to the target backup executor by preset data service concurrency quantity;
and controlling the target backup execution machine to execute the backup task with preset execution machine concurrency based on the execution machine concurrency distribution strategy.
In this embodiment, the data service concurrency connection policy and the executive machine concurrency distribution policy may be preset policies, and may be configured by a user according to real-time requirements, specifically: responding to user input information, and configuring the executive machine concurrency of the target backup executive machine and the data service concurrency of the target database; generating an executive machine concurrency quantity distribution strategy based on the executive machine concurrency quantity; and generating the data service concurrency quantity connection strategy based on the data service concurrency quantity.
As shown in the task execution process schematic diagram in fig. 4, the concurrent quantity distribution policy of the execution machine is used to control the quantity of tasks that a backup execution machine simultaneously executes. For example, the concurrency value of the Agent executor is set to be 20, if the existing thread number of the executor is greater than or equal to the preset executor concurrency value, the rest backup tasks are queued for consumption, meanwhile, the Agent execution opportunity is judged again every 0.1 second, and if the thread number of the executor is less than the preset executor concurrency value, the tasks can be directly executed.
The data service concurrency connection policy is used to control the number of clients (in particular, execution machines) that support the connection simultaneously for a data service (in particular, a database), wherein an independent concurrency connection number can be set for each data service. Before each backup task is executed, checking whether the number of occupied connections of the target data service to be connected is larger than or equal to the preset data service concurrency, if yes, waiting for the connection number to be released, then connecting the execution machine with the data service again (polling every 1 minute), and if not, directly connecting the execution machine with the data service.
It should be noted that, the backup execution machine of the embodiment may support multithreading to concurrently execute the backup task, and the number of execution machines and the concurrency of data services may also be flexibly configured according to the application scenario.
In some embodiments, after the step S103, the method further includes:
and storing backup data obtained after the target database data is backed up into a cloud storage bucket of a resource area where the target database is located.
In this embodiment, after the backup is completed, the backup data is stored into the corresponding cloud storage bucket according to the resource area to which the database belongs, so as to prolong the backup retention time according to the service characteristics, thereby meeting the customer personalized data center automation operation and maintenance scenario. Meanwhile, the embodiment realizes the control of the backup all-link from automatically generating the backup strategy task, intelligently distributing the backup task, and unifying the alarm and the data display, thereby effectively solving the problems of slow backup, labor consumption and the like.
In order to execute the data backup method based on load balancing corresponding to the method embodiment, corresponding functions and technical effects are realized. Referring to fig. 5, fig. 5 shows a block diagram of a data backup device based on load balancing according to an embodiment of the present application. For convenience of explanation, only the portions related to the present embodiment are shown, and the load balancing-based data backup apparatus provided in the embodiments of the present application includes:
the invoking module 501 is configured to invoke a preset backup script corresponding to a backup attribute based on the backup attribute of the data center, and generate a backup task;
the distributing module 502 is configured to distribute the backup task to a target backup executing machine, where the target backup executing machine is a backup executing machine in a resource area where a target database of the data center is located;
and the control module 503 is configured to control the target backup execution machine to execute the backup task based on a target load balancing policy, so as to perform data backup on the target database.
In some embodiments, the invoking module 501 includes:
the data center comprises at least one target database, wherein the data center comprises a backup period, a backup time window and database attributes;
the calling unit is used for calling a preset backup script corresponding to the database attribute based on the database attribute for each target database;
and the generating unit is used for generating a backup task corresponding to the target database based on the preset backup script, the backup period and the backup time window.
In some embodiments, the database attribute includes a database type and a database volume, and the calling unit is specifically configured to:
determining a backup strategy corresponding to the database volume, wherein the backup strategy corresponds to a plurality of backup scripts, and different backup scripts respectively correspond to different database types;
and calling the preset backup script of the backup strategy based on the preset corresponding relation between the database type and the preset backup script.
In some embodiments, the distribution module 502 includes:
the determining unit is used for matching the resource area where the target database is located with the resource area where the backup execution machine is located for each target database of the data center, and determining the target backup execution machine which is located in the same resource area as the target database;
and the sending unit is used for sending the backup task corresponding to the target database to the target backup execution machine.
In some embodiments, the target load balancing policy includes a data service concurrency connection policy and an executive concurrency distribution policy, and the control module 503 includes:
the first control unit is used for controlling the target database to be connected to the target backup execution machine by preset data service concurrency based on the data service concurrency connection strategy;
and the second control unit is used for controlling the target backup executor to execute the backup task according to the concurrency quantity of the executor based on the concurrency quantity distribution strategy of the executor.
In some embodiments, the apparatus further comprises:
the configuration module is used for responding to the input information of the user and configuring the concurrent quantity of the execution machine of the target backup execution machine and the concurrent quantity of the data service of the target database;
the first generation module is used for generating the concurrent quantity distribution strategy of the execution machine based on the concurrent quantity of the execution machine;
and the second generation module is used for generating the data service concurrency quantity connection strategy based on the data service concurrency quantity.
In some embodiments, the apparatus further comprises:
and the storage module is used for storing the backup data obtained after the data backup of the target database to a cloud storage bucket of the resource area where the target database is located.
The data backup device based on load balancing can implement the data backup method based on load balancing in the method embodiment. The options in the method embodiments described above are also applicable to this embodiment and will not be described in detail here. The rest of the embodiments of the present application may refer to the content of the method embodiments described above, and in this embodiment, no further description is given.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 6, the computer device 6 of this embodiment includes: at least one processor 60 (only one is shown in fig. 6), a memory 61 and a computer program 62 stored in the memory 61 and executable on the at least one processor 60, the processor 60 implementing the steps in any of the method embodiments described above when executing the computer program 62.
The computer device 6 may be a smart phone, a tablet computer, a desktop computer, a cloud server, or the like. The computer device may include, but is not limited to, a processor 60, a memory 61. It will be appreciated by those skilled in the art that fig. 6 is merely an example of computer device 6 and is not intended to be limiting of computer device 6, and may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The processor 60 may be a central processing unit (Central Processing Unit, CPU), the processor 60 may also be other general purpose processors, digital signal processors (Digital SignalProcessor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may in some embodiments be an internal storage unit of the computer device 6, such as a hard disk or a memory of the computer device 6. The memory 61 may in other embodiments also be an external storage device of the computer device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the computer device 6. The memory 61 is used for storing an operating system, application programs, boot loader (BootLoader), data, other programs, etc., such as program codes of the computer program. The memory 61 may also be used for temporarily storing data that has been output or is to be output.
In addition, the embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the steps in any of the above-mentioned method embodiments.
The present embodiments provide a computer program product which, when run on a computer device, causes the computer device to perform the steps of the method embodiments described above.
In several embodiments provided herein, it will be understood that each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device to perform all or part of the steps of the method described in the various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing embodiments have been provided for the purpose of illustrating the objects, technical solutions and advantages of the present application in further detail, and it should be understood that the foregoing embodiments are merely examples of the present application and are not intended to limit the scope of the present application. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art, which are within the spirit and principles of the present application, are intended to be included within the scope of the present application.

Claims (10)

1. A data backup method based on load balancing, comprising:
based on the backup attribute of the data center, calling a preset backup script corresponding to the backup attribute to generate a backup task;
distributing the backup task to a target backup execution machine, wherein the target backup execution machine is a backup execution machine of a resource area where a target database of the data center is located;
and controlling the target backup execution machine to execute the backup task based on a target load balancing strategy so as to carry out data backup on the target database.
2. The load balancing-based data backup method as claimed in claim 1, wherein the step of retrieving a preset backup script corresponding to the backup attribute based on the backup attribute of the data center to generate a backup task includes:
the backup attribute of the data center is obtained, wherein the backup attribute comprises a backup period, a backup time window and a database attribute, and the data center comprises at least one target database;
for each target database, calling a preset backup script corresponding to the database attribute based on the database attribute;
and generating a backup task corresponding to the target database based on the preset backup script, the backup period and the backup time window.
3. The load balancing-based data backup method as claimed in claim 2, wherein the database attributes include a database type and a database volume, and the invoking the preset backup script corresponding to the database attributes based on the database attributes comprises:
determining a backup strategy corresponding to the database volume, wherein the backup strategy corresponds to a plurality of backup scripts, and different backup scripts respectively correspond to different database types;
and calling a preset backup script of the backup strategy based on a preset corresponding relation between the database type and the backup script.
4. The load balancing-based data backup method of claim 1, wherein distributing the backup task to a target backup executor comprises:
for each target database of the data center, matching a resource area where the target database is located with a resource area where the backup execution machine is located, and determining the target backup execution machine which is located in the same resource area as the target database;
and sending the backup task corresponding to the target database to the target backup execution machine.
5. The load balancing-based data backup method as claimed in claim 1, wherein the target load balancing policy includes a data service concurrency connection policy and an executor concurrency distribution policy, and the controlling the target backup executor to execute the backup task based on the target load balancing policy to perform data backup on the target database includes:
based on the data service concurrency quantity connection strategy, controlling the target database to be connected to the target backup executor by preset data service concurrency quantity;
and controlling the target backup execution machine to execute the backup task with preset execution machine concurrency based on the execution machine concurrency distribution strategy.
6. The load balancing-based data backup method as claimed in claim 5, wherein the controlling the target backup execution machine to execute the backup task based on the target load balancing policy, before performing data backup on the target database, further comprises:
responding to user input information, and configuring the executive machine concurrency of the target backup executive machine and the data service concurrency of the target database;
generating an executive machine concurrency quantity distribution strategy based on the executive machine concurrency quantity;
and generating the data service concurrency quantity connection strategy based on the data service concurrency quantity.
7. The load balancing-based data backup method as claimed in claim 1, wherein after controlling the target backup execution machine to execute the backup task based on the target load balancing policy to perform data backup on the target database, the method further comprises:
and storing backup data obtained after the target database data is backed up into a cloud storage bucket of a resource area where the target database is located.
8. A load balancing based data backup apparatus, comprising:
the calling module is used for calling a preset backup script corresponding to the backup attribute based on the backup attribute of the data center to generate a backup task;
the distribution module is used for distributing the backup task to a target backup execution machine, wherein the target backup execution machine is a backup execution machine of a resource area where a target database of the data center is located;
and the control module is used for controlling the target backup execution machine to execute the backup task based on a target load balancing strategy so as to carry out data backup on the target database.
9. A computer device comprising a processor and a memory for storing a computer program which when executed by the processor implements the load balancing based data backup method of any of claims 1 to 7.
10. A computer readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the load balancing based data backup method according to any of claims 1 to 7.
CN202310313147.5A 2023-03-20 2023-03-20 Data backup method, device, equipment and storage medium based on load balancing Pending CN116302708A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310313147.5A CN116302708A (en) 2023-03-20 2023-03-20 Data backup method, device, equipment and storage medium based on load balancing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310313147.5A CN116302708A (en) 2023-03-20 2023-03-20 Data backup method, device, equipment and storage medium based on load balancing

Publications (1)

Publication Number Publication Date
CN116302708A true CN116302708A (en) 2023-06-23

Family

ID=86828613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310313147.5A Pending CN116302708A (en) 2023-03-20 2023-03-20 Data backup method, device, equipment and storage medium based on load balancing

Country Status (1)

Country Link
CN (1) CN116302708A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116938724A (en) * 2023-09-19 2023-10-24 广东保伦电子股份有限公司 Method for expanding and shrinking capacity of server in audio-video conference
CN117170941A (en) * 2023-11-02 2023-12-05 建信金融科技有限责任公司 Data backup method, device, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116938724A (en) * 2023-09-19 2023-10-24 广东保伦电子股份有限公司 Method for expanding and shrinking capacity of server in audio-video conference
CN116938724B (en) * 2023-09-19 2024-01-30 广东保伦电子股份有限公司 Method for expanding and shrinking capacity of server in audio-video conference
CN117170941A (en) * 2023-11-02 2023-12-05 建信金融科技有限责任公司 Data backup method, device, electronic equipment and storage medium
CN117170941B (en) * 2023-11-02 2024-02-13 建信金融科技有限责任公司 Data backup method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108733476B (en) Method and device for executing multiple tasks
US9032373B1 (en) End to end testing automation and parallel test execution
US8762187B2 (en) Easy process modeling platform
CN116302708A (en) Data backup method, device, equipment and storage medium based on load balancing
CN109067841B (en) Service current limiting method, system, server and storage medium based on ZooKeeper
WO2016183553A1 (en) Query dispatch and execution architecture
CN107807815B (en) Method and device for processing tasks in distributed mode
EP2088504A1 (en) Representation of data transformation processes for parallelization
CN112738060B (en) Method and device for processing micro-service data, micro-service processing platform and medium
CN111897633A (en) Task processing method and device
CN113220431B (en) Cross-cloud distributed data task scheduling method, device and storage medium
US20110185360A1 (en) Multiprocessing transaction recovery manager
CN111026367A (en) Micro-service arranging method and device, terminal equipment and storage medium
US9424083B2 (en) Managing metadata for a distributed processing system with manager agents and worker agents
CN111784318A (en) Data processing method and device, electronic equipment and storage medium
CN112860343A (en) Configuration changing method, system, device, electronic equipment and storage medium
US9805038B2 (en) Efficient conflict resolution among stateless processes
CN111459629A (en) Azkaban-based project operation method and device and terminal equipment
US11663349B2 (en) System and method for managing data object creation
CN117076096A (en) Task flow execution method and device, computer readable medium and electronic equipment
CN107958414B (en) Method and system for eliminating long transactions of CICS (common integrated circuit chip) system
CN103631594A (en) Asynchronous scheduling method and asynchronous scheduling system for general flow
US9059992B2 (en) Distributed mobile enterprise application platform
CN115934272A (en) Online batch task processing method and device
CN111294377A (en) Network request sending method of dependency relationship, terminal device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination