Configuration restoration method and device for SDN system, and medium
By unifying the backup time nodes and paths in the SDN system and generating configuration comparison images, the cumbersome and complex configuration restore process in the event of SDN system failure is solved, and fast and accurate troubleshooting and configuration restore are achieved.
Patent Information
- Application Number
- CN202411705850.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-14
AI Technical Summary
When an SDN system fails, it is impossible to quickly and accurately configure and restore the SDN system. The backup and restore process in the prior art is cumbersome, and due to the different equipment backup time, the search process for failed equipment is complicated.
By backing up the device module of the SDN system at the same backup time node and storing the backup data to the same path, a configuration comparison image is generated to determine the failed device and the restore time node, and a fast and accurate configuration restore is achieved.
It enables users to quickly download and view backup data of each device module, generate configuration comparison images to facilitate finding fault problems, and improves the troubleshooting efficiency of the SDN system and the accuracy of configuration restoration.
Smart Images

Figure CN119621427A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of SDN systems, and in particular to a configuration restoration method, device and medium for an SDN system. Background Art
[0002] SDN technology achieves flexible network configuration and management by separating the network control plane from the data forwarding plane. However, the SDN system may encounter various problems during operation, such as traffic blockage, configuration errors, etc. These problems usually need to be solved by restoring the SDN system data to a previous time point, that is, restoring the SDN system configuration through the backup data of the SDN system at a certain time point.
[0003] However, in the current SDN system, each device (e.g., SDN controller, network device, and firewall device) is usually backed up independently during the backup process, that is, the backup time is different, and each device is backed up to a local device. Based on this, in the process of restoring the configuration of the SDN system, first, the user directly downloads and views the SDN backup data from the SDN controller, and the user sends a command to each network device or firewall device through the SDN controller to obtain the backup data, and saves the backup data as, so as to download and view the backup data of each network device or firewall device. Then, within a certain period of time, the user compares the backup data of each device, and thus determines the faulty device and the restoration time node by combining the comparison results of multiple devices, and uses the backup data of the restoration time node to restore the configuration of the faulty device.
[0004] However, in most restoration processes that require manual operation and intuitive judgment by users, the download and viewing process is cumbersome, and because the backup time of each device is different during the backup data comparison process, when comparing the backup differences of a device between adjacent backup times, it is impossible to compare the backup differences of other devices between the adjacent backup times, which makes the faulty device search process complicated.
[0005] In summary, when an SDN system fails, it is impossible to quickly and accurately restore the configuration of the SDN system. Summary of the invention
[0006] The embodiments of the present application provide a configuration restoration method, device and medium for an SDN system, which are used to solve the problem that the configuration of the SDN system cannot be restored quickly and accurately when a failure occurs in the SDN system.
[0007] The present application embodiment adopts the following technical solutions:
[0008] On the one hand, an embodiment of the present application provides a configuration restoration method for an SDN system, the method comprising: performing a backup operation on the SDN system to obtain backup data of the SDN system; the device modules of the SDN system include an SDN controller, a switch and a firewall; the backup time nodes of different device modules are the same; the backup data of the SDN system at the same backup time node is stored in the same backup path; in a backup data sequence, the backup data of the same device module at different backup time nodes are compared to determine whether there is a configuration difference between the same device module at different backup time nodes; the backup data sequence includes the backup data of different device modules at each backup time node; generating a configuration comparison image of the SDN system; the configuration comparison image is used to indicate whether there is a configuration difference between the same device module at different backup time nodes; when a fault occurs in the SDN system, the faulty device module and the restoration time node are determined according to the configuration comparison image; and the configuration of the faulty device module is restored according to the backup data at the restoration time node.
[0009] In one example, the backup data of the same device module at different backup time nodes are compared to determine whether there are configuration differences for the same device module between different backup time nodes, specifically including: comparing the backup data of a single device module at adjacent backup time nodes in order from early to late; if the backup data of adjacent backup time nodes are inconsistent, determining that there are configuration differences for the single device module between different backup time nodes; if the backup data of adjacent backup time nodes are consistent, determining that there are no configuration differences for the single device module between different backup time nodes.
[0010] In one example, generating a configuration comparison image of the SDN system specifically includes: generating backup time images of a single device module at different backup time nodes; in the backup time image, differentially identifying the latter backup time node among the adjacent backup time nodes; the identification content is that the backup data is different from the previous backup time node; and generating a configuration comparison image of the SDN system based on the backup time images of different device modules.
[0011] In one example, determining the faulty device module and the restoration time node based on the configuration comparison image specifically includes: in the configuration comparison image, determining the target backup time node with a difference identifier that is closest to the current time for a single device module; comparing whether different device modules have difference identifiers at the same target backup time node; and determining the faulty device module and the restoration time node based on the comparison results of each target backup time node.
[0012] In one example, the determining of the faulty device module and the restoration time node based on the comparison result of each target backup time node specifically includes: combining the comparison results of each target backup time node to obtain a search condition; matching the search condition in a set fault rule library to determine the device module with a configuration abnormality at the first target backup time node, and determining the device module with the configuration abnormality as a faulty device module; determining the second target backup time node or backup time node that is adjacent to the left of the first target backup time node, and determining the second target backup time node or backup time node that is adjacent to the left of the first target backup time node as the restoration time node.
[0013] In one example, the backing up operation on the SDN system to obtain the backup data of the SDN system specifically includes: receiving a backup request of the SDN system, packaging all files of the SDN controller to obtain a controller configuration file, and backing up the controller configuration file to a path specified by the controller; packaging the current configuration of the switch device to obtain a switch configuration file, storing the switch configuration file to a path specified by the switch, and backing up the switch configuration file to the path specified by the controller; packaging the current configuration of the firewall device to obtain a firewall configuration file, storing the firewall configuration file to a path specified by the firewall, and backing up the firewall configuration file to the path specified by the controller.
[0014] In one example, the method further includes: determining the backup results of the SDN controller, the switch device, and the firewall device; the backup results include success and failure; and generating detailed information of the current backup request based on the backup results to display the detailed information on the backup status interface.
[0015] In one example, the method also includes: generating a backup status interface for the backup request, and returning the backup status interface to the client user interface; the backup status interface includes a backup file path, a backup type, a backup time, a backup result, and a backup operation; the backup operation includes downloading, restoring, and deleting; the backup type includes manual backup and scheduled backup; upon receiving a backup download request, downloading the controller configuration file, the switch configuration file, and the firewall configuration file to the client from the path specified by the controller.
[0016] On the other hand, an embodiment of the present application provides a configuration restoration device for an SDN system, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the configuration restoration methods for the SDN system described above.
[0017] On the other hand, an embodiment of the present application provides a non-volatile computer storage medium for configuration restoration of an SDN system, storing computer executable instructions, wherein the computer executable instructions can execute any of the above-mentioned methods for configuration restoration of an SDN system.
[0018] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0019] By storing the backup data configuration files saved in different paths of different devices in the same backup path, users can directly download and view the backup data of each device module in the backup path without sending commands to the switch or firewall and saving the backup data. The backup data of different device modules at each time node can be viewed more quickly. In addition, the configuration comparison image is automatically generated, so that the configuration status of each device module can be understood in a timely manner, and when the SDN fails, the fault problem can be found in time according to the configuration comparison image. In addition, by backing up different device modules at the same time node, when the SDN fails, on the basis of comparing whether there are configuration differences between the same device module at different backup time nodes, the configuration status of different device modules at the same backup time node can be compared, which is convenient for quickly finding the source of the fault and effectively improving the efficiency of troubleshooting backup. In summary, the SDN system can be quickly and accurately configured and restored. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solution of the present application, some embodiments of the present application will be described in detail below in conjunction with the accompanying drawings, in which:
[0021] Figure 1 A flowchart of a configuration restoration method for an SDN system provided in an embodiment of the present application;
[0022] Figure 2 A backup time node cycle configuration diagram provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of a backup path provided in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of a configuration comparison image provided in an embodiment of the present application;
[0025] Figure 5 A schematic diagram of a backup status interface provided in an embodiment of the present application;
[0026] Figure 6A structural diagram of a configuration restoration device for an SDN system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0028] Some embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0029] Figure 1 A flow chart of a configuration restoration method for an SDN system provided in an embodiment of the present application. The method can be applied to different business areas. Certain input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.
[0030] The analysis method involved in the embodiment of the present application can be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For the convenience of understanding and description, the following embodiments are described in detail by taking the SDN controller as an example.
[0031] Figure 1 The process in may include the following steps:
[0032] S101: Perform a backup operation on the SDN system to obtain backup data of the SDN system; the device modules of the SDN system include an SDN controller, a switch and a firewall; the backup time nodes of different device modules are the same; the backup data of the SDN system at the same backup time node is stored in the same backup path.
[0033] In some embodiments of the present application, when backing up the SDN backup system, upon receiving a one-key backup request, the backup operation needs to be started, and within the set backup period, a backup request is regularly initiated to start the backup operation. The user customizes the time period as needed, that is, the period can be 1 day or 1 month.
[0034] Based on this, the backup process is as follows:
[0035] When receiving a backup request from the SDN system, all files of the SDN controller are packaged to obtain a controller configuration file, and the controller configuration file is backed up to a path specified by the controller.
[0036] It should be noted that the data files of the SDN controller may also be packaged, that is, the controller-specified path may include the full configuration file and the database configuration file.
[0037] In addition, the current configuration of the switch device is packaged to obtain the switch configuration file. The command for generating the configuration file is: copy running-config [storage location:] file name, and the switch configuration file is stored in the switch specified path. For example, the command: copy running-config bootflash: / / / 172.20.1.185_2024-10-22_16:00:14.cfg stores the configuration file generated by the switch in the node path of bootflash: / / / , and 172.20.1.185_2024-10-22_16:00:14.cfg is the name of the configuration file of the custom current time node. Finally, the switch configuration file is backed up to the controller specified path.
[0038] Similarly, the generation and storage of firewall configuration files are similar to those of switches. That is, the current configuration of the firewall device is packaged to obtain the firewall configuration file, the firewall configuration file is stored in the firewall specified path, and the firewall configuration file is backed up to the controller specified path.
[0039] After the backup is completed, the backup results of the SDN controller, switch device and firewall device are determined. The backup results include success and failure. According to the backup results, detailed information of the current backup request is generated to display the detailed information on the backup status interface.
[0040] Based on this, a backup status interface of the backup request is generated and returned to the client user interface. The backup status interface includes the backup file path, backup type, backup time, backup result, and backup operation. The backup operation includes download, restore, and delete. The backup type includes manual backup and scheduled backup.
[0041] Therefore, when clicking Restore, the user can restore the system to the backup version of the current backup time node as needed.
[0042] At the same time, the data that has been backed up or the data that failed to be backed up can be downloaded, that is, the user downloads the relevant backup data to the local for reference. Therefore, when the backup download request is received, the controller configuration file, the switch configuration file and the firewall configuration file are downloaded to the client from the path specified by the controller.
[0043] It should be noted that the backup time nodes of different device modules are the same, that is, the backup data of the SDN system is backed up at the same time. At one time node, the SDN controller, switch and firewall are backed up at the same time, and after the backup of the SDN controller, switch and firewall is completed, the system will eventually store all backup files in the same backup path, which is a custom controller path.
[0044] It should be noted that the SDN system backup data at different backup time nodes can be stored in different backup paths or in the same backup path.
[0045] S102: In a backup data sequence, backup data of the same device module at different backup time nodes are compared to determine whether there is a configuration difference between the same device module at different backup time nodes; the backup data sequence includes backup data of different device modules at each backup time node.
[0046] In some embodiments of the present application, any two backup time nodes can be selected for comparison. However, when an SDN system fails, the latter backup data is usually compared to see if there is a difference with the previous backup data. Therefore, adjacent backup data are automatically compared in advance.
[0047] Based on this, the backup data of a single device module at adjacent backup time nodes are compared in order from early to late.
[0048] If the backup data of adjacent backup time nodes are inconsistent, it is determined that there is a configuration difference between the single device module at different backup time nodes. If the backup data of adjacent backup time nodes are consistent, it is determined that there is no configuration difference between the single device module at different backup time nodes.
[0049] S103: Generate a configuration comparison image of the SDN system; the configuration comparison image is used to indicate whether there is a configuration difference between the same device module at different backup time nodes.
[0050] In some embodiments of the present application, a configuration comparison image is generated to allow the user to intuitively view the difference between two backups of data.
[0051] Based on this, a backup time image of a single device module at different backup time nodes is generated. In the backup time image, a difference mark is made for the next backup time node among the adjacent backup time nodes.
[0052] It should be noted that the marking content is that the backup data at the previous backup time node is different. For example, the marking form is to highlight the backup time node in the backup time image.
[0053] Finally, a configuration comparison image of the SDN system is generated according to the backup time images of different device modules.
[0054] S104: When a fault occurs in the SDN system, a faulty device module and a restoration time node are determined according to the configuration comparison image.
[0055] In some embodiments of the present application, first, according to the configuration comparison image, the target backup time node with a difference mark closest to the current time of a single device module is determined. Then, the difference marks of different device modules at the same target backup time node are compared. Finally, according to the comparison results of each target backup time node, the faulty device module and the restoration time node are determined.
[0056] Furthermore, according to the comparison results of each target backup time node, the faulty device module and the restoration time node are determined. The process is as follows:
[0057] First, combine the comparison results of each target backup time node to obtain the retrieval condition. For example, the target backup time node of the controller is A, the target backup time node of the switch is B, and the target backup time of the firewall is C. The time of A is earlier than the time of B, and the time of B is earlier than the time of C. This means that the comparison result at the A time node is: the controller has a difference identifier, and neither the switch nor the firewall has a difference identifier. The comparison result at the B time node is: the switch has a difference identifier, and neither the controller nor the firewall has a difference identifier. At the C time node, the firewall has a difference identifier, and neither the controller nor the switch has a difference identifier. The retrieval condition is: the comparison results of the A, B, and C time nodes.
[0058] For another example, it is also possible that the target backup time nodes of the controller and the switch are both A, that is, the backup data of the controller and the switch at time node A are different from the previous configuration.
[0059] Then, in the set fault rule library, the search conditions are matched to determine the device module with abnormal configuration at the first target backup time node, and the device module with abnormal configuration is determined as the faulty device module. For example, in the case of the comparison results of the above A, B and C time nodes, due to the current SDN system failure, the controller closest to the current time is the only difference from the previous backup, which means that the controller configuration represented by the backup data of the controller at time node A may have problems. At this time, the first target backup time node is time node A, and the faulty device module is the controller.
[0060] It should be noted that there may be two or more faulty device modules.
[0061] In addition, the second target backup time node or backup time node adjacent to the left of the first target backup time node is determined, and the second target backup time node or backup time node adjacent to the left is determined as the restoration time node. For example, when the first target backup time node is time node A, the left adjacent time node is the backup time node. If the first target backup time node is time node B, and time node A is adjacent to time node B, because A is also a target backup time node, the time node adjacent to the left of the first target backup time node is the second target backup time node.
[0062] It should be noted that the configuration comparison image can also be sent to the user client (for example, the user operation interface of the SDN controller), and the user judges the faulty device module and the restoration time point based on the configuration comparison image, and uploads the judgment result, so that the controller obtains the faulty device module and the restoration time point according to the judgment result. At this time, the user's judgment result shall prevail.
[0063] S105: Restore the configuration of the faulty device module according to the backup data of the restoration time node.
[0064] That is to say, after backing up the overall data of the SDN system, if you need to restore the device module data to a previous time point, first determine the time point when the device module needs to be restored.
[0065] It should be noted that if different backup time nodes are in different backup paths, it is necessary to determine the designated backup path of this node in the SDN controller, and select the configuration file of the device module in the designated backup path to replace the currently running configuration of the device module.
[0066] It should be noted that the backup file restoration method is to overwrite the currently running configuration file with the backup file. For SDN controller files, it can be done by directly overwriting. For the backup files of switches and firewalls, it is necessary to use the commands provided by the device to overwrite the currently running configuration file.
[0067] In some embodiments of the present application, there are two ways to restore the SDN controller data: the first way is to directly replace the original installation file with the newly backed up full file, that is, replace the entire file with the backed up ICE file. The second way is to only restore the previously backed up database. Import the database into the SDN system and make the data consistent with the previously backed up data. The backed up data can be imported into the SDN controller using a script file.
[0068] For the recovery of SDN system device data, use the switch and firewall related command lines to directly specify the previously backed up configuration file as the current running configuration.
[0069] It should be noted that although the embodiments of the present application are based on Figure 1 Steps S101 to S105 are described in sequence, but this does not mean that steps S101 to S105 must be performed in a strict order. Figure 1 The order shown in the figure is to introduce and explain step S101 to step S105 in sequence, in order to facilitate those skilled in the art to understand the technical solution of the embodiment of the present application. In other words, in the embodiment of the present application, the order between step S101 to step S105 can be appropriately adjusted according to actual needs.
[0070] pass Figure 1 The method can be used to perform scheduled backup and recovery of the entire system, including the SDN controller and related devices. The system can be automatically backed up on a scheduled basis without manual intervention. The configuration of the backup data at different time nodes can be compared to view the difference between the two backup data. The backup data can be downloaded to a specified path for viewing.
[0071] Based on this, the backup data at the same backup time node is stored in the same backup path, which can realize the comprehensive and fast download of SDN system data, avoiding the steps of exporting from switches or firewalls. Backing up all SDN data at the same time node can realize the comparison of all configuration files in the same time node path, and find the differences of backup files of different device modules at the same time node, which greatly reduces the complexity of the comparison process.
[0072] In summary, the entire backup and restore process is highly automated, which reduces manual intervention and the workload of operation and maintenance personnel. Through regular backup and fast data recovery functions, the reliability and security of the SDN system are improved, ensuring business continuity and stability.
[0073] Figure 2 A backup time node period configuration diagram is provided for an embodiment of the present application.
[0074] exist Figure 2 In the configuration of backup time and data retention time, the automatic backup time of the SDN system, for devices such as switches and firewalls, there is no need to configure the backup time and data retention time separately. It should be noted that the backup of each part of the SDN in this application is independent of each other, and the backup of one part will not affect the backup of other parts.
[0075] Figure 3A schematic diagram of a backup path provided in an embodiment of the present application.
[0076] exist Figure 3 In the same time node, the SDN controller backup file, switch backup file and firewall backup file are all stored in the controller path. This path is for the convenience of users to view and download backup files. It should be noted that different time nodes can correspond to multiple different controller specified paths.
[0077] Figure 4 A schematic diagram of a configuration comparison image provided in an embodiment of the present application.
[0078] exist Figure 4 In the configuration time machine interface, the configuration difference comparison is displayed. The configuration files of both switches on October 16 are different from those on October 15. The data on October 16 is highlighted, and the staff can quickly find the backup problem through the interface display content. If there is a difference with the previous backup, it will be highlighted in the configuration time machine interface. If there is no difference or no backup data, it will not be highlighted; and according to the backup time images of different device modules, the configuration comparison image of the SDN system is generated.
[0079] Figure 5 A schematic diagram of a backup status interface provided in an embodiment of the present application.
[0080] exist Figure 5 After the backup is completed, you will be redirected to this interface, which displays the backup completion status of each part. The SDN controller backup is successful, the switch backup fails, and the firewall has not been backed up. At the same time, this interface includes the configuration of the time node and various operations on the backup file, such as deletion, restoration, and downloading.
[0081] Figure 6 A structural diagram of a configuration restoration device for an SDN system provided in an embodiment of the present application includes:
[0082] at least one processor; and,
[0083] a memory communicatively connected to the at least one processor; wherein,
[0084] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the above-mentioned configuration restoration methods for the SDN system.
[0085] Some embodiments of the present application provide a non-volatile computer storage medium for restoring the configuration of an SDN system, storing computer executable instructions, wherein the computer executable instructions can execute any of the above-mentioned methods for restoring the configuration of an SDN system.
[0086] Each embodiment in this application 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 and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0087] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0088] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0089] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0090] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.
[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0092] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0093] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM), and non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0094] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0095] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0096] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the technical principle of the present application should all fall within the protection scope of the present application.
Claims
1. A configuration restoration method for an SDN system, characterized in that: The method comprises: The SDN system is backed up to obtain backup data of the SDN system; the device modules of the SDN system include an SDN controller, a switch and a firewall; the backup time nodes of different device modules are the same; the backup data of the SDN system at the same backup time node is stored in the same backup path; In the backup data sequence, the backup data of the same device module at different backup time nodes are compared to determine whether there is a configuration difference between the same device module at different backup time nodes; the backup data sequence includes the backup data of different device modules at each backup time node; Generate a configuration comparison image of the SDN system; the configuration comparison image is used to indicate whether there is a configuration difference between the same device module at different backup time nodes; When the SDN system fails, the faulty device module and restoration time node are determined according to the configuration comparison image; The configuration of the faulty device module is restored according to the backup data of the restoration time node.
2. The method according to claim 1, characterized in that The comparing of the backup data of the same device module at different backup time nodes to determine whether there is a configuration difference between the same device module at different backup time nodes specifically includes: Compare the backup data of a single device module at adjacent backup time nodes in order from earliest to latest; If the backup data of adjacent backup time nodes are inconsistent, it is determined that there are configuration differences between the modules of a single device at different backup time nodes; If the backup data of adjacent backup time nodes are consistent, it is determined that there is no configuration difference between a single device module at different backup time nodes.
3. The method according to claim 1, characterized in that The generating of the configuration comparison image of the SDN system specifically includes: Generate backup time images of a single device module at different backup time nodes; In the backup time image, a difference mark is made for the next backup time node among the adjacent backup time nodes; the mark content is that the backup data is different from the previous backup time node; A configuration comparison image of the SDN system is generated according to the backup time images of different device modules.
4. The method according to claim 1, characterized in that: Determining the faulty device module and the restoration time node according to the configuration comparison image specifically includes: In the configuration comparison image, determine the target backup time node with a difference identifier that is closest to the current time for a single device module; Compare whether there are difference marks between different equipment modules at the same target backup time node; According to the comparison results of each target backup time node, the faulty device module and the restoration time node are determined.
5. The method according to claim 4, characterized in that Determining the faulty device module and the restoration time node according to the comparison result of each target backup time node specifically includes: The comparison results of each target backup time node are combined to obtain a search condition; In a set fault rule library, the search condition is matched to determine a device module having a configuration abnormality at the first target backup time node, and the device module having the configuration abnormality is determined as a faulty device module; A second target backup time node or a backup time node adjacent to the left of the first target backup time node is determined, and the second target backup time node or the backup time node adjacent to the left of the first target backup time node is determined as the restoration time node.
6. The method according to claim 1, characterized in that The backing up operation of the SDN system to obtain the backup data of the SDN system specifically includes: Receive a backup request from the SDN system, package all files of the SDN controller, obtain a controller configuration file, and back up the controller configuration file to a path specified by the controller; Packaging the current configuration of the switch device to obtain a switch configuration file, storing the switch configuration file in a switch specified path, and backing up the switch configuration file to the controller specified path; The current configuration of the firewall device is packaged to obtain a firewall configuration file, the firewall configuration file is stored in a firewall specified path, and the firewall configuration file is backed up to the controller specified path.
7. The method according to claim 6, characterized in that The method further comprises: Determine the backup results of the SDN controller, the switch device, and the firewall device; the backup results include success and failure; According to the backup result, detailed information of the current backup request is generated, so that the detailed information is displayed on the backup status interface.
8. The method according to claim 7, characterized in that The method further comprises: Generate a backup status interface for the backup request, and return the backup status interface to the client user interface; the backup status interface includes backup file path, backup type, backup time, backup result, and backup operation; the backup operation includes download, restore, and delete; the backup type includes manual backup and scheduled backup; When a backup download request is received, the controller configuration file, the switch configuration file and the firewall configuration file are downloaded to the client from the path specified by the controller.
9. A configuration restoration device for an SDN system, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the configuration restoration method for the SDN system as described in any one of claims 1 to 8.
10. A non-volatile computer storage medium for restoring configuration of an SDN system, storing computer executable instructions, characterized in that: The computer executable instructions can execute a configuration restoration method for an SDN system as described in any one of claims 1 to 8.