Log backup method of Docker cluster, node and computing device
By deploying log backup tasks on Docker cluster nodes, collecting and pushing log information to the object storage server, it solves the problems of Docker cluster log backup security and management efficiency, and realizes safe storage and centralized management of container logs.
Patent Information
- Application Number
- CN202410599327.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-23
AI Technical Summary
Existing technology makes it difficult to effectively perform log backup of Docker clusters, resulting in log information being easily lost, and the logs are scattered in cluster deployment mode and are inconvenient for centralized management.
Deploy log backup tasks on each node of the Docker cluster, obtain container characteristic information, determine whether backup is needed, collect and save log information in the external storage space of the node, and push the log information to the object storage server through the API of the object storage service. Storage in a decentralized and domain-based manner.
It improves the security and management efficiency of Docker container log backup, ensures that log information is not lost when the container disappears, and realizes centralized backup and management of Docker clusters.
Smart Images

Figure CN118535387A
Abstract
Description
Technical Field
[0001] One or more embodiments of this specification relate to container technology in the field of communications, and in particular, to a log backup method, node, and computing device of a Docker cluster. Background Art
[0002] Docker is an open source project implemented in Go language that allows users to easily create and use containers. Docker packages the program and all its dependencies into a Docker container and quickly publishes it to a Linux or Windows host, thus shielding the differences in the environment and allowing the program to perform consistently in any operating system's operating environment.
[0003] Based on the advantages of Docker containers, Docker clusters have emerged. For example, multiple Docker containers can be deployed on one node to form a Docker cluster, or multiple Docker containers on multiple nodes can be used to form a Docker cluster.
[0004] Therefore, how to perform log backup for Docker cluster is an urgent problem to be solved. Summary of the invention
[0005] One or more embodiments of the present invention describe a log backup method, node, and computing device for a Docker cluster, which can perform a more secure and effective log backup for a Docker cluster.
[0006] According to a first aspect, a log backup method for a Docker cluster is provided, wherein the Docker cluster includes at least one node, each node is deployed with at least one Docker container, and the Docker cluster includes at least two Docker containers; the method includes:
[0007] Each node in the Docker cluster executes:
[0008] This node deploys the log backup task for the Docker container;
[0009] The node obtains characteristic information of all Docker containers on the node according to the log backup task;
[0010] The node traverses the acquired characteristic information of each Docker container, determines whether it is necessary to perform log backup for the current Docker container, and if so, collects the log information of the Docker container, and saves the collected log information of the Docker container in the storage space outside the Docker container in the node;
[0011] The node calls the application program interface API provided by the server of the object storage service to push the log information of the Docker container stored in the node to the server of the object storage service, so as to use the object storage service to save the log information of the Docker container.
[0012] The log backup task includes:
[0013] Collect the log information of the Docker container every predetermined period of time;
[0014] and / or,
[0015] Compress the collected log information and generate container log files in a standard format;
[0016] and / or,
[0017] Determine whether to split the container log file based on the size of the container log file generated after collection;
[0018] and / or,
[0019] The function of Docker container for log backup is required.
[0020] The characteristic information of the Docker container includes: the name of the Docker container.
[0021] The step of determining whether to perform log backup on the Docker container includes:
[0022] It is determined whether the function of the current Docker container meets the function of the Docker container that needs to perform log backup included in the log backup task. If yes, it is determined that log backup needs to be performed on the current Docker container.
[0023] Wherein, the method further comprises:
[0024] Execute an action on a first container executed earlier in the first Docker container, and generate first log information corresponding to the execution of the action on the first container;
[0025] Execute an action on a second container executed later in the first Docker container, and generate second log information corresponding to the execution of the action on the second container;
[0026] Determine a first serial number, and determine a second serial number; wherein the order between the first serial number and the second serial number is the same as the order between the execution of the action by the first container and the execution of the action by the second container; and
[0027] The first log information carries the first serial number, and the second log information carries the second serial number;
[0028] Then, using the object storage service to save the log information of the Docker container includes:
[0029] The first log information and the second log information are stored in different domains in a server of the object storage service.
[0030] The method of using the object storage service to save the log information of the Docker container includes:
[0031] In a rights-based and domain-based manner, the log information of each Docker container is stored in the server of the object storage service.
[0032] According to a second aspect, a node is provided, in which at least one Docker container is deployed, and the node is deployed in a Docker cluster including at least two Docker containers; the node includes:
[0033] The log backup task deployment module is configured to deploy the log backup task for the Docker container;
[0034] A Docker container information acquisition module is configured to acquire characteristic information of all Docker containers on the node according to the log backup task;
[0035] The log information processing module is configured to traverse the acquired characteristic information of each Docker container, determine whether it is necessary to perform log backup on the Docker container, and if so, collect the log information of the Docker container, and save the collected log information of the Docker container in a storage space outside the Docker container in the node;
[0036] The upload module is configured to call the application program interface API provided by the server of the object storage service to push the log information of the Docker container stored in the node to the server of the object storage service, so as to use the object storage service to save the log information of the Docker container.
[0037] The log information processing module is configured to execute:
[0038] It is determined whether the function of the current Docker container meets the function of the Docker container that needs to perform log backup included in the log backup task. If yes, it is determined that log backup needs to be performed on the current Docker container.
[0039] The log information processing module is further configured to execute:
[0040] Execute an action on a first container executed earlier in the first Docker container, and generate first log information corresponding to the execution of the action on the first container;
[0041] Execute an action on a second container executed later in the first Docker container, and generate second log information corresponding to the execution of the action on the second container;
[0042] Determine a first serial number, and determine a second serial number; wherein the order between the first serial number and the second serial number is the same as the order between the execution of the action by the first container and the execution of the action by the second container; and
[0043] The first log information carries the first serial number, and the second log information carries the second serial number;
[0044] Then, the upload module is configured to execute: sending the first log information carrying the first serial number and the second log information carrying the second serial number to the server of the object storage service through the same or different log streams, so that the server of the object storage service can store the first log information and the second log information in different domains.
[0045] According to a third aspect, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described in any embodiment of the present specification is implemented.
[0046] The log backup method, node, and computing device of the Docker cluster provided in the embodiments of this specification have at least the following beneficial effects:
[0047] For the specific network structure of Docker cluster, the log backup task for Docker container can be deployed in the node, so that the node can actively perform log backup of Docker container according to the log backup task;
[0048] Since the node stores the collected log information of the Docker container in the storage space outside the Docker container in the node instead of inside the Docker container, even if the Docker container disappears later, the log information of the Docker container will not disappear with the disappearance of the Docker container because it is stored outside the Docker container. Therefore, the security of the log backup of the Docker container is greatly improved.
[0049] In addition, because each node in the Docker cluster will send the collected log information of the Docker container to the server of the object storage service, the server of the object storage service centrally saves and manages the log information of all Docker containers in the Docker cluster. Therefore, more effective log backup and management can be performed for the specific network structure of the Docker cluster. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0051] Figure 1 It is a schematic diagram of a system architecture used in an embodiment of this specification.
[0052] Figure 2 It is a flow chart of a log backup method of a Docker cluster in one embodiment of this specification.
[0053] Figure 3 It is a flow chart of a log processing method for ensuring that each container execution action of a Docker container can be correctly restored in an embodiment of this specification.
[0054] Figure 4 It is a schematic diagram of the structure of the nodes in the Docker cluster in the embodiment of this specification. DETAILED DESCRIPTION
[0055] The solution provided in this specification is described below in conjunction with the accompanying drawings.
[0056] First of all, it should be noted that the terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise.
[0057] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0058] In order to facilitate understanding of the method provided in this specification, the system architecture involved and applicable to this specification is first described. The system architecture is a Docker cluster, which includes at least one node, each node is deployed with at least one Docker container, and the Docker cluster includes at least two Docker containers to form a Docker cluster. For example, Figure 1 As shown in the figure, the Docker cluster includes 3 nodes, Node 1 includes 2 Docker containers, Node 2 and Node 3 each include 1 Docker container. Figure 1 The four Docker containers in the Docker cluster form a Docker cluster.
[0059] It should be understood that Figure 1 The number of nodes and the number of Docker containers in the nodes are only for reference. Any number can be selected and deployed according to the implementation requirements.
[0060] It can be understood that in the embodiments of the present invention, a node can be any software or hardware with computing and processing capabilities.
[0061] Figure 2 This is a flow chart of a log backup method for a Docker cluster in one embodiment of this specification. The execution subject of this method is each node in the Docker cluster. Figure 2 , the method comprising:
[0062] Step 201: The node deploys a log backup task for the Docker container.
[0063] Step 202: The node obtains characteristic information of all Docker containers on the node according to the log backup task.
[0064] Step 203: The node traverses the acquired characteristic information of each Docker container to determine whether it is necessary to perform log backup on the current Docker container. If yes, execute step 206; otherwise, execute step 204.
[0065] Step 204: Determine whether all Docker containers of the node have been traversed. If so, execute step 205; otherwise, return to step 203.
[0066] Step 205: End the current process.
[0067] Step 206: The Docker container node collects log information of the Docker container.
[0068] Step 207: The node stores the collected log information of the Docker container in a storage space in the node that is outside the Docker container.
[0069] Step 208: The node calls the application program interface API provided by the server of the object storage service to push the log information of the Docker container stored in the node to the server of the object storage service, so as to use the object storage service to save the log information of the Docker container.
[0070] Currently, after a Docker container is built, the content log of the Docker container will be lost when the Docker container disappears, making it impossible to locate the fault later. For example, if a program has a memory leak, it will disappear after restart. Therefore, it is necessary to back up the Docker container. At the same time, in cluster deployment mode, the logs of the Docker container are scattered in various containers, which is not convenient for centralized log management. In addition, the practice of storing logs in the Docker container will also cause the saved log information to be lost when the Docker container disappears. In response to these problems, according to the above Figure 2 As can be seen from the process shown, in the embodiment of the present invention, for the specific network structure of the Docker cluster, a log backup task for the Docker container can be deployed in the node, so that the node can actively perform the log backup of the Docker container according to the log backup task, and because the node stores the collected log information of the Docker container in the storage space outside the Docker container in the node, rather than storing it inside the Docker container, even if the Docker container disappears later, the log information of the Docker container will not disappear with the disappearance of the Docker container because it is stored outside the Docker container, thus greatly improving the security of the log backup of the Docker container. At the same time, because each node in the Docker cluster will send the collected log information of the Docker container to the server of the object storage service, the server of the object storage service centrally stores and manages the log information of all Docker containers in the Docker cluster, so it can perform more effective log backup and management for the specific network structure of the Docker cluster.
[0071] Below Figure 2 Each of the steps shown is explained separately.
[0072] First, for step 201: the node deploys a log backup task for the Docker container.
[0073] In the embodiment of the present invention, each node in the Docker cluster provides an API interface to the outside, so that the backup log task can be deployed in each of them.
[0074] In an embodiment of the present invention, the log backup task can be set according to the business requirements for the Docker container and / or Docker cluster. For example, the log backup task can include:
[0075] Collect the log information of the Docker container every predetermined period of time;
[0076] and / or,
[0077] Compress the collected log information and generate container log files in a standard format;
[0078] and / or,
[0079] Determine whether to split the container log file based on the size of the container log file generated after collection;
[0080] and / or,
[0081] The function of Docker container for log backup is required.
[0082] Next, for step 202: the node obtains characteristic information of all Docker containers on the node according to the log backup task.
[0083] The characteristic information of the Docker container may be the name of the Docker container.
[0084] Next, for step 203: the node traverses the acquired characteristic information of each Docker container to determine whether it is necessary to perform log backup for the current Docker container. If yes, execute step 206; otherwise, execute step 204.
[0085] In one embodiment of the present invention, in this step 203, it can be determined whether the function of the current Docker container meets the function of the Docker container that needs to be backed up for logs included in the log backup task. If so, it is determined that the current Docker container needs to be backed up for logs. For example, the log backup task requires backing up the log information of the Docker container that completes the front-end function, but does not need to back up the logs of the Docker container that completes the back-end function. Then, in this step 203, the node determines whether the name of the current Docker container traversed is the name of the Docker container that completes the front-end function. If so, it is determined that the current Docker container needs to be backed up for logs.
[0086] Next, in step 204 and step 205, it is to determine whether the traversal is completed, ensuring that the determination process of step 203 can be executed once for each Docker container in the node.
[0087] Next, for step 206: the node collects log information of the current Docker container.
[0088] For example, according to the log backup task requirements, the log information of the Docker container in the node is collected every five minutes, and a container log file in a standard format is generated. At the same time, the log information of the Docker container in the node three days ago is deleted regularly to save node storage space. For another example, the log backup task includes a daily scheduled task to find the log information file collected yesterday and compress it, and save it in a standard storage format. For another example, the log backup task determines whether the log file needs to be further split based on the size of the compressed log file. Each node needs to collect the log information of the Docker container according to the log backup task.
[0089] After the scheduled task starts, determine whether the backup log file path on the node exists. If it does, the system prompts: it already exists and does not need to be created; if it does not exist, the system creates a new log backup file on the node.
[0090] Next, for step 207: the node stores the collected log information of the Docker container in a storage space in the node that is located outside the Docker container.
[0091] In this step 207, since the node stores the collected log information of the Docker container in the storage space outside the Docker container in the node instead of storing it inside the Docker container, even if problems such as the disappearance of the Docker container occur later, the log information of the Docker container will not disappear with the disappearance of the Docker container because it is stored outside the Docker container, thereby greatly improving the security of the log backup of the Docker container.
[0092] Step 208: The node calls the application program interface API provided by the server of the object storage service to push the log information of the Docker container stored in the node to the server of the object storage service, so as to use the object storage service to save the log information of the Docker container.
[0093] Through the processing of step 208, each node in the Docker cluster will send the collected log information of the Docker container to the server of the object storage service, and the server of the object storage service will centrally save and manage the log information of all Docker containers in the Docker cluster. Therefore, more effective log backup and management can be performed for the specific network structure of the Docker cluster.
[0094] After the log information of the Docker container stored in the node is pushed to the server of the object storage service, the log information of each Docker container can be stored in the server of the object storage service in a rights-based and domain-based manner. It can be seen that in the embodiment of the present invention, with the help of the rights-based and domain-based characteristics of object storage, different permissions have different log ranges, which indicates log security and reduces the risk of log leakage.
[0095] In one embodiment of the present invention, the log information of the Docker container for at least six months can be saved in the server of the object storage service, meeting the requirements of the cloud center, etc.
[0096] It can be seen that in the embodiment of the present invention, by leveraging the massive, low-cost, and high-durability capabilities of object storage, the logs of each cluster node are stored in the object storage, which greatly reduces the storage space of the cluster nodes.
[0097] In current communication systems, distributed databases that use multiple log streams have emerged, such as OceanBase. In a distributed database that uses multiple log streams, all logs corresponding to a Docker container will be written to multiple log streams in the distributed database, and different log streams may be distributed across multiple machine nodes. This type of distributed database can also be used in the server of the object storage service to store the log information of the Docker container.
[0098] In many scenarios, there is a sequence between the execution actions of each container in the Docker container. Therefore, when restoring the execution actions of each container in the Docker container based on the log, this sequence needs to be considered in order to correctly restore or synchronize data. Therefore, if a distributed database is used in the object storage service server to store the log information of the Docker container, it is necessary to consider how to ensure that the execution actions of each container in the Docker container are restored / synchronized in the correct execution order based on the log. However, there is currently no effective solution. To solve this problem, see Figure 3 In one embodiment of the present invention, the process further includes the following steps:
[0099] Step 301: Execute an action on a first container that is executed earlier in a first Docker container in a Docker cluster, and generate first log information corresponding to the execution action of the first container;
[0100] Step 302: Execute an action on a second container that is executed later in the first Docker container, and generate second log information corresponding to the execution action of the second container;
[0101] Step 303: Determine a first sequence number and a second sequence number; wherein the order of the first sequence number and the second sequence number is the same as the order of execution of the first container and the second container; and
[0102] Step 304: Carry the first serial number in the first log information, and carry the second serial number in the second log information.
[0103] Corresponds to Figure 3 The process shown, accordingly, in the above step 208, the use of the object storage service to save the log information of the Docker container includes step 2081: storing the first log information and the second log information in different domains in the server of the object storage service.
[0104] Because different log information for the same Docker container can be written into different log streams and stored in different domains in the object storage service server, if no special processing method is adopted, it will be impossible to distinguish the order of container execution actions corresponding to different log information stored in different domains, resulting in the inability to restore the various container execution actions of the Docker container in the correct order according to the various log information of the Docker container. Figure 3It can be seen from the process shown that in the embodiment of the present invention, firstly, a sequence number with a sequence is used, then the sequence of the sequence number is the same as the execution sequence of the container execution action, and finally the sequence number is carried in the log information of the corresponding container execution action, so as to ensure that the subsequent execution actions of the Docker container corresponding to the relevant log information can be restored in the correct order according to the sequence number information carried in each log information in different domains in the server of the object storage service. For example, the sequence of sequence number 1 carried in log information 1 is prior to the sequence of sequence number 2 carried in log information 2, then, it can be determined that the execution order of container execution action 1 corresponding to log information 1 is prior to the execution order of container execution action 2 corresponding to log information 2.
[0105] In one embodiment of the present specification, a node is provided, in which at least one Docker container is deployed, and the node is deployed in a Docker cluster including at least two Docker containers; see Figure 4 , the node includes:
[0106] The log backup task deployment module 401 is configured to deploy a log backup task for a Docker container;
[0107] The Docker container information acquisition module 402 is configured to acquire characteristic information of all Docker containers on the node according to the log backup task;
[0108] The log information processing module 403 is configured to traverse the acquired characteristic information of each Docker container, determine whether it is necessary to perform log backup on the Docker container, and if so, collect the log information of the Docker container, and save the collected log information of the Docker container in a storage space outside the Docker container in the node;
[0109] The upload module 404 is configured to call the application program interface API provided by the server of the object storage service to push the log information of the Docker container stored in the node to the server of the object storage service so as to use the object storage service to save the log information of the Docker container.
[0110] exist Figure 4 In one embodiment of the node of the present invention shown, the log backup task deployed by the log backup task deployment module 401 includes:
[0111] Collect the log information of the Docker container every predetermined period of time;
[0112] and / or,
[0113] Compress the collected log information and generate container log files in a standard format;
[0114] and / or,
[0115] Determine whether to split the container log file based on the size of the container log file generated after collection;
[0116] and / or,
[0117] The function of Docker container for log backup is required.
[0118] exist Figure 4 In one embodiment of the node of the present invention shown, the characteristic information of the Docker container includes: the name of the Docker container.
[0119] exist Figure 4 In one embodiment of the node of the present invention shown, the log information processing module 403 is configured to execute:
[0120] It is determined whether the function of the current Docker container meets the function of the Docker container that needs to perform log backup included in the log backup task. If yes, it is determined that log backup needs to be performed on the current Docker container.
[0121] exist Figure 4 In one embodiment of the node of the present invention shown, the log information processing module 403 is further configured to execute:
[0122] Execute an action on a first container executed earlier in the first Docker container, and generate first log information corresponding to the execution of the action on the first container;
[0123] Execute an action on a second container executed later in the first Docker container, and generate second log information corresponding to the execution of the action on the second container;
[0124] Determine a first serial number, and determine a second serial number; wherein the order between the first serial number and the second serial number is the same as the order between the execution of the action by the first container and the execution of the action by the second container; and
[0125] The first log information carries the first serial number, and the second log information carries the second serial number;
[0126] Then, the upload module 404 is configured to execute: sending the first log information carrying the first serial number and the second log information carrying the second serial number to the server of the object storage service through the same or different log streams, so that the server of the object storage service can store the first log information and the second log information in different domains.
[0127] It should be noted that the above-mentioned devices are usually implemented on the server side, and can be set on independent servers respectively, or some or all of the devices can be combined and set on the same server. The server can be a single server or a server cluster composed of multiple servers. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system. The above-mentioned devices can also be implemented on a computer terminal with strong computing power.
[0128] One embodiment of the present specification provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute a method in any one of the embodiments of the present specification.
[0129] An embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method in any embodiment of the specification is implemented.
[0130] It is to be understood that the structures illustrated in the embodiments of this specification do not constitute specific limitations on the devices of the embodiments of this specification. In other embodiments of the specification, the above-mentioned device may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0131] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0132] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0133] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A log backup method for a Docker cluster, characterized in that: The Docker cluster includes at least one node, each node is deployed with at least one Docker container, and the Docker cluster includes at least two Docker containers; the method includes: Each node in the Docker cluster executes: This node deploys the log backup task for the Docker container; The node obtains characteristic information of all Docker containers on the node according to the log backup task; The node traverses the acquired characteristic information of each Docker container, determines whether it is necessary to perform log backup for the current Docker container, and if so, collects the log information of the Docker container, and saves the collected log information of the Docker container in the storage space of the node outside the Docker container; The node calls the application program interface API provided by the server of the object storage service to push the log information of the Docker container stored in the node to the server of the object storage service, so as to use the object storage service to save the log information of the Docker container.
2. The method according to claim 1, characterized in that in, The log backup task includes: Collect the log information of the Docker container every predetermined period of time; and / or, Compress the collected log information and generate container log files in a standard format; and / or, Determine whether to split the container log file based on the size of the container log file generated after collection; and / or, The function of Docker container for log backup is required.
3. The method according to claim 1, characterized in that in, The characteristic information of the Docker container includes: the name of the Docker container.
4. The method according to claim 1, characterized in that: in, The determining whether to perform log backup on the Docker container includes: It is determined whether the function of the current Docker container meets the function of the Docker container that needs to perform log backup included in the log backup task. If yes, it is determined that log backup needs to be performed on the current Docker container.
5. The method according to claim 1, characterized in that in, The method further comprises: Execute an action on a first container executed earlier in the first Docker container, and generate first log information corresponding to the execution of the action on the first container; Execute an action on a second container executed later in the first Docker container, and generate second log information corresponding to the execution of the action on the second container; Determine a first serial number, and determine a second serial number; wherein the order between the first serial number and the second serial number is the same as the order between the execution of the action by the first container and the execution of the action by the second container; and The first log information carries the first serial number, and the second log information carries the second serial number; Then, using the object storage service to save the log information of the Docker container includes: The first log information and the second log information are stored in different domains in a server of the object storage service.
6. The method according to claim 1, characterized in that in, The use of the object storage service to save the log information of the Docker container includes: In a rights-based and domain-based manner, the log information of each Docker container is stored in the server of the object storage service.
7. A node, characterized in that: At least one Docker container is deployed in the node, and the node is deployed in a Docker cluster including at least two Docker containers; the node includes: The log backup task deployment module is configured to deploy the log backup task for the Docker container; A Docker container information acquisition module is configured to acquire characteristic information of all Docker containers on the node according to the log backup task; The log information processing module is configured to traverse the acquired characteristic information of each Docker container, determine whether it is necessary to perform log backup on the Docker container, and if so, collect the log information of the Docker container, and save the collected log information of the Docker container in a storage space outside the Docker container in the node; The upload module is configured to call the application program interface API provided by the server of the object storage service to push the log information of the Docker container stored in the node to the server of the object storage service, so as to use the object storage service to save the log information of the Docker container.
8. The node according to claim 7, characterized in that: The log information processing module is configured to execute: It is determined whether the function of the current Docker container meets the function of the Docker container that needs to perform log backup included in the log backup task. If yes, it is determined that log backup needs to be performed on the current Docker container.
9. The node according to claim 7 or 8, characterized in that: in, The log information processing module is further configured to execute: Execute an action on a first container executed earlier in the first Docker container, and generate first log information corresponding to the execution of the action on the first container; Execute an action on a second container executed later in the first Docker container, and generate second log information corresponding to the execution of the action on the second container; Determine a first serial number, and determine a second serial number; wherein the order between the first serial number and the second serial number is the same as the order between the execution of the action by the first container and the execution of the action by the second container; and The first log information carries the first serial number, and the second log information carries the second serial number; Then, the upload module is configured to execute: sending the first log information carrying the first serial number and the second log information carrying the second serial number to the server of the object storage service through the same or different log streams, so that the server of the object storage service can store the first log information and the second log information in different domains.
10. A computing device comprising a memory and a processor, characterized in that: The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 6 is implemented.
