Log backup method and device, equipment and storage medium
By adopting modular architecture and distributed storage in the log backup system, the poor scalability and single point of failure of traditional log storage and backup methods are solved, and a high availability and flexible log backup solution is realized.
Patent Information
- Application Number
- CN202510136304.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-05-30
AI Technical Summary
Traditional log storage and backup methods have problems such as network bottlenecks, single point failure risk, poor scalability, and inability to flexibly adapt to storage needs of different scales.
The log backup method adopts a modular architecture, and through the distributed architecture of server, client and shared storage center, it realizes cross-platform deployment and multi-point storage, reduces the risk of single point of failure, and has the ability to dynamically expand.
Improve the integrity and availability of log data, reduce data loss caused by failures, effectively deal with network instability and congestion, and reduce operation and maintenance costs and complexity.
Smart Images

Figure CN120066856A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data backup, and particularly to a log backup method, apparatus, device and storage medium. Background Art
[0002] In modern distributed systems, logs are crucial as the key basis for system operation status monitoring and fault troubleshooting, and their storage and backup are of great importance. However, traditional log storage and backup methods have many defects. For example, when collecting logs from a large number of distributed nodes, it is easy to cause network bottlenecks or single-point failures. Some systems rely on a single log storage device or server, which has a single-point failure risk. Once a failure occurs, it may result in the loss of log data. Moreover, log transmission is highly dependent on network connections. When the network is unstable or congested, data transmission failures or partial losses are likely to occur.
[0003] At the same time, the existing technologies perform poorly in terms of scalability. Most log system architectures are in a fixed mode and lack the ability to dynamically expand. When the business scale expands or the log data volume surges, system expansion often requires redeployment or manual adjustment, which greatly increases the complexity of operation and maintenance. In addition, many systems cannot flexibly adapt to different scales of storage requirements, resulting in waste of hardware and resources and high expansion costs. Summary of the Invention
[0004] The present invention provides a log backup method, apparatus, device and storage medium, which enhance scalability through a modular architecture and have the ability to be deployed across platforms, and can be compatible with multiple operating systems and hardware environments.
[0005] According to one aspect of the present invention, there is provided a log backup method applied to a log backup system, including: a server, a client and a shared storage center. The method includes:
[0006] Starting a backup service through the server;
[0007] Reading backup configuration information through the client, determining backup logs according to the backup configuration information, and uploading the backup logs to a target server based on the backup service;
[0008] Saving the backup logs to the shared storage center through the target server.
[0009] Optionally, starting the backup service through the server includes: when obtaining the backup configuration information, loading a service configuration file of a specified transmission protocol; initializing the operating environment according to the service configuration file to start the backup service.
[0010] Optionally, determining a backup log according to backup configuration information includes: parsing the backup configuration information to determine a target file path and a target file name; determining a file to be backed up based on the target file path and the target file name; monitoring the file to be backed up to determine incremental logs generated in the file to be backed up, and copying the incremental logs to generate a backup log.
[0011] Optionally, before uploading the backup log to a target server based on a backup service, the method further includes: obtaining a connection configuration list, where the connection configuration list includes identifiers of each server; determining a server to be connected from the connection configuration list based on a preset selection policy; sending a connection request to the server to be connected to determine the connection status of the server to be connected, and determining the target server based on the connection status.
[0012] Optionally, determining the target server based on the connection status includes: determining whether the connection status is a successful connection; if so, using the server to be connected as the target server; otherwise, determining the next server to be connected from the connection configuration list based on the preset selection policy until the connection is successful.
[0013] Optionally, saving the backup log to a shared storage center through the target server includes: determining a target client identifier corresponding to the backup log; determining a target storage directory from the shared storage center according to the target client identifier; and saving the backup log to the target storage directory.
[0014] Optionally, before saving the backup log to the shared storage center through the target server, the method further includes: performing integrity verification on the backup log to determine a log verification status, where the log verification status includes verification passed and verification failed; when the log verification status is verification passed, performing specified format conversion on the backup log to generate a converted backup log; where saving the backup log to the shared storage center through the target server includes: saving the converted backup log to the shared storage center through the target server.
[0015] According to another aspect of the present invention, there is provided a log backup device, which includes:
[0016] A backup service startup module, configured to start a backup service through a server;
[0017] A backup log upload module, configured to read backup configuration information through a client, determine a backup log according to the backup configuration information, and upload the backup log to a target server based on the backup service;
[0018] A backup log storage module, configured to save the backup log to a shared storage center through the target server.
[0019] According to another aspect of the present invention, there is provided an electronic device, which includes:
[0020] at least one processor;
[0021] and a memory communicatively connected to the at least one processor;
[0022] wherein, the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute a log backup method according to any embodiment of the present invention.
[0023] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for implementing a log backup method according to any embodiment of the present invention when executed by a processor.
[0024] The technical solution of the embodiment of the present invention reduces the risk of single-point failure through a distributed architecture and multi-point storage, ensures the integrity and availability of log data in various complex situations, and reduces data loss caused by failures. It can effectively cope with problems such as network instability and congestion, ensure the stability and continuity of log data transmission, and avoid affecting the backup work due to network conditions. The flexible architecture and automated backup process reduce the need for manual intervention and redeployment, reducing the workload and operation and maintenance costs of operation and maintenance personnel.
[0025] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0027] Figure 1 is a flowchart of a log backup method provided according to Embodiment 1 of the present invention;
[0028] Figure 2 is a flowchart of another log backup method provided according to Embodiment 2 of the present invention;
[0029] Figure 3 is a schematic structural diagram of a log backup device provided according to Embodiment 3 of the present invention;
[0030] Figure 4 It is a schematic structural diagram of an electronic device for implementing a log backup method according to an embodiment of the present invention. Detailed implementation manners
[0031] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0033] Embodiment 1
[0034] Figure 1 A flowchart of a log backup method is provided for Embodiment 1 of the present invention. This embodiment can be applied to a log backup system, including: a server, a client, and a shared storage center. This method can be executed by a log backup device, which can be implemented in the form of hardware and / or software, and the log backup device can be configured in a computer controller. As Figure 1 shown, this method includes:
[0035] S110. Start a backup service through the server.
[0036] Among them, the log backup system consists of a server, clients, and a shared storage center. The server is mainly responsible for managing the backup process and providing backup service interfaces; the clients are used to read backup configurations, filter backup logs, and upload them; the shared storage center is the place where backup logs are finally stored, used to ensure long-term data preservation, and can be accessed by different servers and clients to achieve data sharing. The backup service refers to a program or process started and run by the server, which provides functional support for clients to upload backup logs, and defines the rules, protocols, and interaction methods for data transmission between the clients and the server.
[0037] Optionally, starting the backup service through the server includes: when obtaining backup configuration information, loading the service configuration file of the specified transmission protocol; initializing the running environment according to the service configuration file to start the backup service.
[0038] Among them, the backup configuration information will clearly specify the transmission protocol, and the server identifies the protocol type based on the configuration information, such as HTTP, FTP, SFTP, etc. The server can parse the field information about the transmission protocol in the configuration file. For example, if the configuration file is in JSON format, the server obtains the value of the "protocol" field by parsing the JSON data structure to determine the transmission protocol used. After determining the transmission protocol, the server will load the corresponding service configuration file according to the protocol type. For example, for the HTTP protocol, the configuration file may be stored in the " / etc / httpd / conf / " directory and named "httpd.conf". The server reads the content of the configuration file through the file system interface according to the path and file name corresponding to the protocol. The service configuration file contains various parameters required to run the backup service, such as network ports, buffer sizes, the number of thread pools, etc. The server can allocate system resources based on the obtained parameters. The server will be initialized according to parameters such as the transmission mode and transmission rate limit in the configuration file to ensure that the backup service runs according to the configuration requirements.
[0039] S120. Read the backup configuration information through the client, determine the backup logs according to the backup configuration information, and upload the backup logs to the target server based on the backup service.
[0040] Among them, the backup configuration information contains parameters for guiding the client to perform log backup, such as the source path of the backup logs, the target file name, the backup frequency, the address of the target server, etc., which determine how the backup task is executed. In a complex system, there may be multiple servers, and the target server refers to the server determined by the client through a selection strategy and used to receive and process the backup logs uploaded by the client.
[0041] Optionally, determine the backup log according to the backup configuration information, including: parsing the backup configuration information to determine the target file path and target file name; determining the file to be backed up based on the target file path and target file name; monitoring the file to be backed up to determine the incremental log generated in the file to be backed up, and copying the incremental log to generate the backup log.
[0042] Among them, the backup configuration information is often stored in a specific format, such as XML, JSON or custom text format. The client will adopt corresponding parsing methods according to different configuration information formats to parse out the final target file path and target file name to determine the complete path of the file to be backed up. Further, after determining the complete path of the file to be backed up, the client can further check whether the file exists. When the file exists, the backup operation will continue. If the file does not exist, it will be processed according to the backup configuration strategy, such as recording the problem, waiting for the file to appear or stopping the backup task.
[0043] Specifically, the client will continuously monitor the file to be backed up. Once there is a write operation on the file to be backed up, the incremental log can be determined. Specifically, the client will record the last read position of the file. When the file changes each time, the new content can be read from the last position as the incremental log, and the incremental log will be copied to generate the backup log.
[0044] Optionally, before uploading the backup log to the target server based on the backup service, the method further includes: obtaining a connection configuration list, where the connection configuration list includes each server identifier; determining the server to be connected from the connection configuration list based on a preset selection strategy; sending a connection request to the server to be connected to determine the connection status of the server to be connected, and determining the target server based on the connection status.
[0045] Among them, before the client prepares to upload the backup log to the server to be connected, it will first determine the server to be connected from the list according to the preset selection strategy. The preset selection strategy can be a load balancing strategy, a geographical location strategy or a priority strategy. When executing the load balancing strategy, the client will query the load information of each server in the list and select the server with the lightest load as the server to be connected. The load balancing strategy can avoid the impact of high load on a certain server on the efficiency of log upload. When executing the geographical location strategy, if the client and the server are located in different geographical locations, the client can select the server closest to itself as the server to be connected to reduce network latency. When executing the priority strategy, a priority can be set for each server in the connection configuration list, and the client will give priority to selecting the server with the highest priority as the server to be connected. After the client determines the server to be connected, it will use the address and port information of the server to establish a connection with the server and perform the backup log upload operation.
[0046] Specifically, the client will send a connection request to the server to be connected to verify whether the server is connectable and its connection status. After sending the connection request, the client will wait for the response from the server to be connected. If a response is received within the specified time, it indicates that the server to be connected is connectable and the connection is in good condition; if no response is received after the timeout, it means that there may be problems with the connection, such as network failures or the server not being started.
[0047] Optionally, determining the target server based on the connection status includes: determining whether the connection status is a successful connection. If so, using the server to be connected as the target server; otherwise, determining the next server to be connected from the connection configuration list based on a preset selection strategy until the connection is successful.
[0048] Furthermore, if the connection to the server to be connected is successful, this server can be determined as the target server and used as the destination for uploading backup logs. If the connection fails, the server will, according to a preset retry mechanism or other strategies, such as reselecting another server to be connected and sending a connection request, until a server with a successful connection is found as the target server.
[0049] S130. Save the backup logs to the shared storage center through the target server.
[0050] Among them, the shared storage center can be a Network - Attached Storage (NAS). The shared storage center can be connected to each server through the network and can be accessed by each server.
[0051] The technical solution of the embodiment of the present invention, through a distributed architecture and multi - point storage, reduces the risk of single - point failures, ensures the integrity and availability of log data in various complex situations, and reduces data loss caused by failures. It can effectively handle problems such as network instability and congestion, ensure the stability and continuity of log data transmission, and avoid affecting backup work due to network conditions. Through a flexible architecture and an automated backup process, it reduces the need for manual intervention and redeployment, and reduces the workload and operation and maintenance costs of operation and maintenance personnel.
[0052] Embodiment 2
[0053] Figure 2 The following is a flowchart of a log backup method provided by the second embodiment of the present invention. This embodiment adds the specific process of saving the backup logs to the shared storage center through the target server on the basis of the first embodiment. Among them, the specific content of steps S210 - S220 is substantially the same as that of steps S110 - S120 in the first embodiment, so it will not be elaborated in this embodiment. As Figure 2 shown, this method includes:
[0054] S210. Start the backup service through the server.
[0055] Optionally, starting the backup service through the server includes: when obtaining the backup configuration information, loading the service configuration file of the specified transport protocol; initializing the running environment according to the service configuration file to start the backup service.
[0056] S220. Read the backup configuration information through the client, determine the backup log according to the backup configuration information, and upload the backup log to the target server based on the backup service.
[0057] Optionally, determining the backup log according to the backup configuration information includes: parsing the backup configuration information to determine the target file path and target file name; determining the file to be backed up based on the target file path and target file name; monitoring the file to be backed up to determine the incremental log generated in the file to be backed up, and copying the incremental log to generate the backup log.
[0058] Optionally, before uploading the backup log to the target server based on the backup service, the method further includes: obtaining a connection configuration list, where the connection configuration list includes the identifiers of each server; determining the server to be connected from the connection configuration list based on a preset selection policy; sending a connection request to the server to be connected to determine the connection status of the server to be connected, and determining the target server based on the connection status.
[0059] Optionally, determining the target server based on the connection status includes: judging whether the connection status is a successful connection. If so, using the server to be connected as the target server; otherwise, determining the next server to be connected from the connection configuration list based on a preset selection policy until the connection is successful.
[0060] S230. Determine the target client identifier corresponding to the backup log.
[0061] S240. Determine the target storage directory from the shared storage center according to the target client identifier.
[0062] S250. Save the backup log to the target storage directory.
[0063] It can be known that before uploading the backup log, the client will embed its own identifier in the log data structure. When processing the backup log, the server can determine the corresponding target client identifier from the backup log. To manage the backup logs of multiple clients in an orderly manner, a directory structure planning based on the client identifier can be adopted. That is, when the target server obtains the target client identifier, according to the directory mapping rules preset in the shared storage center, using the client identifier as an index, it locates the corresponding target storage directory in the directory structure of the storage center. For example, the shared storage center can adopt a tree-like directory structure and create subdirectories at all levels with the client identifier as the subdirectory name under the directory. The target server will match the target client identifier with the directory structure of the storage center to determine the specific target storage directory.
[0064] Specifically, when performing the storage operation of the backup log, the target server can use the interfaces provided by the shared storage center, such as the file system Application Programming Interface (API) or a specific storage service Software Development Kit (SDK) to initiate a storage request. During the transmission process, the backup log data will be split according to a certain data block size and transmitted to the shared storage center in the form of a stream through the network. After receiving the data, the shared storage center writes the data into the corresponding file according to the target storage directory specified by the target server.
[0065] Optionally, before saving the backup log to the shared storage center through the target server, the method further includes: performing an integrity check on the backup log to determine the log check situation, where the log check situation includes passing the check and failing the check; when the log check situation is passing the check, performing a specified format conversion on the backup log to generate a converted backup log; and saving the backup log to the shared storage center through the target server includes: saving the converted backup log to the shared storage center through the target server.
[0066] Among them, integrity verification can ensure that the backup log has not been tampered with during transmission or storage and that the data is complete. Integrity verification can adopt verification algorithms, such as cyclic redundancy check or message digest algorithm. Taking the MD5 algorithm as an example, after receiving the backup log, the target server will calculate a hash value for the entire content of the log file using the MD5 algorithm. At the same time, before uploading the backup log, the client will also calculate the hash value of the backup log based on the same MD5 algorithm and attach it to a specific position of the log data for transmission. After calculating the hash value, the target server will compare it with the hash value transmitted by the client. If the two hash values are exactly the same, it indicates that no data loss or tampering has occurred during the transmission of the backup log. At this time, the log verification status is verification passed. If the comparison result is inconsistent, it is determined that the log verification status is verification failed.
[0067] It should be noted that when the log verification status is verification passed, in order to meet the specific storage requirements of the shared storage center or the convenience of subsequent data processing, it is also necessary to perform specified format conversion on the backup log to ensure that the backup log is accurately stored in a compliant format, providing a basis for subsequent possible query, analysis, and other operations.
[0068] The technical solution of the embodiment of the present invention, through a distributed architecture and multi-point storage, reduces the risk of single-point failure, ensures the integrity and availability of log data in various complex situations, and reduces data loss caused by failures. It can effectively cope with problems such as network instability and congestion, ensure the stability and continuity of log data transmission, and avoid affecting the backup work due to network conditions. By means of a flexible architecture and an automated backup process, it reduces the need for manual intervention and redeployment, reducing the workload and operation and maintenance costs of operation and maintenance personnel.
[0069] Embodiment III
[0070] Figure 3 It is a schematic structural diagram of a log backup device provided by Embodiment III of the present invention. As Figure 3 shown, the device includes: a backup service startup module 310, which is used to start the backup service through the server;
[0071] a backup log upload module 320, which is used to read backup configuration information through the client, determine the backup log according to the backup configuration information, and upload the backup log to the target server based on the backup service;
[0072] a backup log storage module 330, which is used to save the backup log to the shared storage center through the target server.
[0073] Optionally, the backup service startup module 310 is specifically configured to: when obtaining backup configuration information, load the service configuration file of the specified transport protocol; initialize the operating environment according to the service configuration file to start the backup service.
[0074] Optionally, the backup log upload module 320 specifically includes: a backup log determination unit, configured to: parse the backup configuration information to determine the target file path and the target file name; determine the file to be backed up based on the target file path and the target file name; monitor the file to be backed up to determine the incremental log generated in the file to be backed up, and copy the incremental log to generate a backup log.
[0075] Optionally, the backup log upload module 320 further includes: a target server determination unit, configured to: obtain a connection configuration list, where the connection configuration list includes each server identifier; determine the server to be connected from the connection configuration list based on a preset selection policy; send a connection request to the server to be connected to determine the connection status of the server to be connected, and determine the target server based on the connection status.
[0076] Optionally, the target server determination unit specifically includes: a target server determination subunit, configured to: determine whether the connection status is a successful connection, if so, use the server to be connected as the target server; otherwise, determine the next server to be connected from the connection configuration list based on a preset selection policy until the connection is successful.
[0077] Optionally, the backup log storage module 330 is specifically configured to: determine the target client identifier corresponding to the backup log; determine the target storage directory from the shared storage center according to the target client identifier; save the backup log to the target storage directory.
[0078] Optionally, the apparatus further includes: a backup log verification and conversion module, configured to perform integrity verification on the backup log to determine the log verification situation before saving the backup log to the shared storage center through the target server, where the log verification situation includes verification passed and verification failed; when the log verification situation is verification passed, perform specified format conversion on the backup log to generate a converted backup log; where saving the backup log to the shared storage center through the target server includes: saving the converted backup log to the shared storage center through the target server.
[0079] The technical solution of the embodiment of the present invention reduces the risk of single-point failure through a distributed architecture and multi-point storage, ensures the integrity and availability of log data under various complex conditions, and reduces data loss caused by failures. It can effectively cope with problems such as network instability and congestion, ensure the stability and continuity of log data transmission, and avoid affecting backup work due to network conditions. The flexible architecture and automated backup process reduce the need for manual intervention and redeployment, reducing the workload and operation and maintenance costs of operation and maintenance personnel.
[0080] A log backup device provided by an embodiment of the present invention can execute a log backup method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
[0081] Embodiment 4
[0082] Figure 4 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0083] As Figure 4 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0084] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0085] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a log backup method.
[0086] In some embodiments, a log backup method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the log backup method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute a log backup method by any other suitable means (e.g., by means of firmware).
[0087] The various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0088] A computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0089] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0090] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and the input received from the user can be in any form (including acoustic input, voice input, or tactile input).
[0091] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0092] A computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs that run on the respective computers and have a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0093] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and this is not limited herein.
[0094] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A log backup method, characterized in that: Applied to the log backup system, including: server, client and shared storage center, the method includes: Start the backup service through the server; Reading the backup configuration information through the client, determining the backup log according to the backup configuration information, and uploading the backup log to the target server based on the backup service; The backup log is saved to a shared storage center through the target server.
2. The method according to claim 1, characterized in that The starting of the backup service through the server includes: When the backup configuration information is obtained, the service configuration file of the specified transport protocol is loaded; Initialize the operating environment according to the service configuration file to start the backup service.
3. The method according to claim 1, characterized in that Determining the backup log according to the backup configuration information includes: Parsing the backup configuration information to determine a target file path and a target file name; Determine the file to be backed up based on the target file path and the target file name; The file to be backed up is monitored to determine the incremental log generated in the file to be backed up, and the incremental log is copied to generate the backup log.
4. The method according to claim 1, characterized in that: Before uploading the backup log to the target server based on the backup service, the method further includes: Obtaining a connection configuration list, wherein the connection configuration list includes identifications of each server; Determining a server to be connected from the connection configuration list based on a preset selection strategy; A connection request is sent to the server to be connected to determine the connection status of the server to be connected, and a target server is determined based on the connection status.
5. The method according to claim 4, characterized in that The determining of the target server based on the connection condition includes: Determine whether the connection is successful, and if so, use the server to be connected as the target server; Otherwise, the next server to be connected is determined from the connection configuration list based on a preset selection strategy until the connection is successful.
6. The method according to claim 1, characterized in that The step of saving the backup log to a shared storage center through the target server includes: Determine a target client identifier corresponding to the backup log; Determining a target storage directory from the shared storage center according to the target client identifier; The backup log is saved to the target storage directory.
7. The method according to claim 6, characterized in that Before the target server saves the backup log to the shared storage center, the method further includes: Performing integrity check on the backup log to determine the log verification status, wherein the log verification status includes verification pass and verification fail; When the log verification status is that the verification is passed, the backup log is converted into a specified format to generate a converted backup log; The step of saving the backup log to a shared storage center through the target server includes: The converted backup log is saved to a shared storage center through the target server.
8. A log backup device, characterized in that: The device includes: The backup service startup module is used to start the backup service through the server; A backup log uploading module is used to read the backup configuration information through the client, determine the backup log according to the backup configuration information, and upload the backup log to the target server based on the backup service; The backup log storage module is used to save the backup log to a shared storage center through the target server.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 7 when executed.