CN118250153A - Service disaster recovery network configuration method, device, equipment and storage medium - Google Patents

Service disaster recovery network configuration method, device, equipment and storage medium Download PDF

Info

Publication number
CN118250153A
CN118250153A CN202410668252.5A CN202410668252A CN118250153A CN 118250153 A CN118250153 A CN 118250153A CN 202410668252 A CN202410668252 A CN 202410668252A CN 118250153 A CN118250153 A CN 118250153A
Authority
CN
China
Prior art keywords
network
disaster recovery
server
preset
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410668252.5A
Other languages
Chinese (zh)
Inventor
唐露露
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Clerware Technology Co ltd
Original Assignee
Shenzhen Clerware Technology Co ltd
Filing date
Publication date
Application filed by Shenzhen Clerware Technology Co ltd filed Critical Shenzhen Clerware Technology Co ltd
Publication of CN118250153A publication Critical patent/CN118250153A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a service disaster recovery network configuration method, a device, equipment and a storage medium, wherein the method comprises the following steps: before executing the disaster recovery task, determining a disaster recovery scene in which the disaster recovery task is located, determining a demand configuration parameter of a standby server in the disaster recovery task in the disaster recovery scene, and configuring a network for the standby server according to the demand configuration parameter. The invention determines the disaster recovery scene in which the disaster recovery task is located, and the network configuration requirements of the backup server in the disaster recovery task are different in different disaster recovery scenes, so that the demand configuration parameters of the backup server in the disaster recovery scene can be determined, and then the network is configured for the backup server according to the configured parameters, thereby realizing the automatic configuration of the network of the backup server according to the demand configuration parameters in different scenes, avoiding manual intervention, having simple and quick operation, effectively ensuring the service continuity of the main server, reducing time consumption in the switching stage and reducing the error rate of the configuration network.

Description

Service disaster recovery network configuration method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer service disaster recovery technologies, and in particular, to a service disaster recovery network configuration method, device, equipment, and storage medium.
Background
The network configuration requirements of the backup server are different in the three different scenes when the main server and the backup server of the disaster tolerant task perform data synchronization, simulate the main server fault and perform drilling switching, or perform service formal switching when the main server breaks down.
When data synchronization is carried out, network configuration is carried out on the standby server manually so as to ensure that the standby server, the corresponding main server and the disaster recovery server can carry out network communication; when the drilling switching is performed, firstly, the network cable of the main server is pulled out, then the network of the standby server is manually configured, and then an application system in the standby server is started to complete the switching, so that the standby server can provide services to the outside, and the service drilling or load transfer is completed; when the drill switching is finished, firstly closing an application system in the standby server, then manually configuring the network of the standby server to restore the standby server to a state before switching, then connecting a network cable of the main server, and then enabling the main server to restore to provide services externally. The method has the problems of multiple operation flows, long time consumption and high error rate by manually configuring the network.
Disclosure of Invention
The invention mainly aims to provide a service disaster recovery network configuration method, device, equipment and storage medium, and aims to solve the technical problems of multiple operation flows, long time consumption and high error rate in manually configuring a network in a disaster recovery task in the prior art.
In order to achieve the above object, the present invention provides a service disaster recovery network configuration method, which includes the following steps:
before executing a disaster recovery task, determining a disaster recovery scene in which the disaster recovery task is located;
Determining a demand configuration parameter of a standby server in the disaster recovery task in the disaster recovery scene;
and configuring a network for the standby server according to the demand configuration parameters.
Optionally, the requirement configuration parameters include a first preset network outlet, a first preset virtual local area network identifier and a first network card configuration parameter, where the first preset virtual local area network identifier is a virtual local area network identifier of a port where a main server in the disaster recovery task is located;
The configuring the network for the standby server according to the requirement configuration parameters includes:
When the disaster recovery scene is a data synchronization scene, configuring a network outlet of the standby server as the first preset network outlet, or setting a virtual local area network identifier of a port where the standby server is located as the first preset virtual local area network identifier, so that the standby server communicates with a network where a main server in the disaster recovery task is located through the first preset network outlet or the first preset virtual local area network identifier;
Enumerating the network card of the standby server, and checking the network condition of the current network card according to the enumerated first network card configuration parameters of the current network card;
When the network condition of the current network card meets the preset network condition, the current network card is determined to be a target network card, so that the main server and the standby server perform data synchronization in the virtual local area network corresponding to the first preset virtual local area network identifier through the target network card.
Optionally, the requirement configuration parameter includes a second network card configuration parameter;
The configuring the network for the standby server according to the requirement configuration parameters includes:
When the disaster recovery scene is a drilling switching scene or a formal switching scene, configuring a network where the standby server is located according to the demand configuration parameters, wherein the network where the standby server is located is different from a network where a main server in the disaster recovery task is located;
enumerating the network card of the standby server, and determining the second network card configuration parameters corresponding to the current network card according to the enumerated MAC address of the current network card;
And clearing the network configuration information of the current network card, writing the configuration parameters of the second network card into a preset network configuration file under a preset directory of the standby server according to a preset rule, so that the standby server restarts a network service and a service system according to the preset network configuration file, and switching the service supported by the main server to be supported by the standby server.
Optionally, the requirement configuration parameter includes a second preset network outlet;
When the disaster recovery scene is a drilling switching scene or a formal switching scene, configuring a network where the standby server is located according to the demand configuration parameter, including:
When the disaster recovery scene is a drilling switching scene or a formal switching scene, the network outlet of the standby server is configured to be the second preset network outlet, so that the standby server is isolated from the network where the main server in the disaster recovery task is located through the second preset network outlet.
Optionally, the requirement configuration parameter includes a second preset virtual local area network identifier, where the second preset virtual local area network identifier is a network identifier different from a virtual local area network identifier of a port where the main server in the disaster recovery task is located;
When the disaster recovery scene is a drilling switching scene or a formal switching scene, configuring a network where the standby server is located according to the demand configuration parameter, including:
When the disaster recovery scene is a drilling switching scene or a formal switching scene, the virtual local area network identifier of the port or the network adapter where the backup server is located is set to be the second preset virtual local area network identifier, so that the backup server is isolated from the network where the main server in the disaster recovery task is located through the second preset virtual local area network identifier.
Optionally, when the disaster recovery scenario is a drilling handover scenario or a formal handover scenario, configuring the network where the standby server is located according to the requirement configuration parameter includes:
When the disaster recovery scene is a drilling switching scene or a formal switching scene and the virtualization platform where the backup server is located has network virtual capability, connecting a network card of the backup server with a virtual switch created by the virtualization platform so as to enable the backup server to communicate with equipment of the virtual switch and isolate a network where a main server in the disaster recovery task is located.
Optionally, the requirement configuration parameters include a third network card configuration parameter, a third preset network outlet and a third preset virtual local area network identifier, where the third preset virtual local area network identifier is a virtual local area network identifier of a port where a main server in the disaster recovery task is located;
The step of clearing the network configuration information of the current network card, writing the configuration parameters of the second network card into a preset network configuration file under a preset directory of the standby server according to a preset rule, so that the standby server restarts a network service and a service system according to the preset network configuration file, and after switching the service supported by the main server to the service supported by the standby server, the step of further comprises:
When the drilling switching or the formal switching is finished, carrying out network configuration on the standby server according to the third network card configuration parameters;
Setting the network outlet of the standby server as the third preset network outlet, or setting the virtual local area network identifier of the standby server as the third preset virtual local area network identifier, so that the standby server communicates with the network where the main server in the disaster recovery task is located through the third preset network outlet or the third preset virtual local area network identifier.
In addition, in order to achieve the above objective, the present invention further provides a service disaster recovery network configuration device, where the service disaster recovery network configuration device includes:
the scene determining module is used for determining a disaster recovery scene where the disaster recovery task is located before the disaster recovery task is executed;
The parameter determining module is used for determining the demand configuration parameters of the standby server in the disaster recovery task in the disaster recovery scene;
and the network configuration module is used for configuring a network for the standby server according to the requirement configuration parameters.
In addition, in order to achieve the above objective, the present invention further provides a service disaster recovery network configuration device, where the device includes: the system comprises a memory, a processor and a service disaster recovery network configuration program stored on the memory and capable of running on the processor, wherein the service disaster recovery network configuration program is configured to realize the steps of the service disaster recovery network configuration method.
In addition, in order to achieve the above object, the present invention further provides a storage medium, on which a service disaster recovery network configuration program is stored, where the service disaster recovery network configuration program, when executed by a processor, implements the steps of the service disaster recovery network configuration method as described above.
Before executing a disaster recovery task, the invention discloses a disaster recovery scene where the disaster recovery task is located, a demand configuration parameter of a standby server in the disaster recovery task in the disaster recovery scene is determined, and a network is configured for the standby server according to the demand configuration parameter. The invention determines the disaster recovery scene in which the disaster recovery task is located, and the network configuration requirements of the backup server in the disaster recovery task are different in different disaster recovery scenes, so that the demand configuration parameters of the backup server in the disaster recovery scene can be determined, and then the network is configured for the backup server according to the configured parameters, thereby realizing the automatic configuration of the network of the backup server according to the demand configuration parameters in different scenes, avoiding manual intervention, having simple and quick operation, effectively ensuring the service continuity of the main server, reducing time consumption in the switching stage and reducing the error rate of the configuration network.
Drawings
FIG. 1 is a schematic structural diagram of a service disaster recovery network configuration device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a first embodiment of a service disaster recovery network configuration method according to the present invention;
FIG. 3 is a flowchart of a second embodiment of a service disaster recovery network configuration method according to the present invention;
FIG. 4 is a flowchart of a third embodiment of a service disaster recovery network configuration method according to the present invention;
Fig. 5 is a block diagram of a first embodiment of a service disaster recovery network configuration device according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a service disaster recovery network configuration device of a hardware operation environment according to an embodiment of the present invention.
As shown in fig. 1, the service disaster recovery network configuration device may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (WI-FI) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the architecture shown in fig. 1 does not constitute a limitation of the service disaster recovery network configuration device, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a service disaster recovery network configuration program may be included in a memory 1005 as one type of storage medium.
In the service disaster recovery network configuration device shown in fig. 1, the network interface 1004 is mainly used for performing data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the service disaster recovery network configuration device of the present invention may be disposed in the service disaster recovery network configuration device, where the service disaster recovery network configuration device invokes a service disaster recovery network configuration program stored in the memory 1005 through the processor 1001, and executes the service disaster recovery network configuration method provided by the embodiment of the present invention.
The embodiment of the invention provides a service disaster recovery network configuration method, referring to fig. 2, fig. 2 is a flow chart of a first embodiment of the service disaster recovery network configuration method of the invention.
In this embodiment, the service disaster recovery network configuration method includes the following steps:
Step S10: before executing a disaster recovery task, determining a disaster recovery scene in which the disaster recovery task is located.
It should be noted that, the execution body of the method of this embodiment may be a disaster recovery server with functions of service disaster recovery network configuration, network communication and program operation; the service disaster recovery network configuration device with the same or similar functions can also be used. The present embodiment and the following embodiments will be described by taking a disaster recovery server as an example.
It can be understood that the disaster recovery server can be a computer device for configuring and managing the disaster recovery task, and interface interaction is provided for configuring network parameters and various operations of the disaster recovery task, so as to control the state of the disaster recovery task, communicate with the main and standby servers and send operation instructions, and the main and standby servers belong to clients of the disaster recovery server relatively. The main and standby disaster recovery mode is a common disaster recovery mode with high availability of the system. The main server represents the computer equipment protected in the disaster recovery task and is a data transmitting end; the backup server represents a data receiving end in the disaster recovery task and can be a physical machine or a virtual machine running on a virtualization platform. The disaster tolerant data may be disk data, file data, application data, etc. When the main server can not normally provide service to the outside, the service can be loaded into the standby server, the service can be continuously provided to the outside, and the sustainability of service access is ensured.
It should be understood that the disaster recovery task may be in various scenarios, for example, a scenario when the primary server and the backup server perform data synchronization, a scenario when the primary server is simulated to perform an exercise switching, or a scenario when the primary server fails to perform a service formal switching. After the fault of the main server is simulated, the service is switched to the standby server, and the main server can normally provide services to the outside during the drilling switching, and the standby server simulates the services to the outside. And the formal switching indicates that when the main server fails and can not provide service to the outside, the service is switched to the standby server, and the standby server provides service to the outside.
Step S20: and determining the demand configuration parameters of the standby servers in the disaster recovery tasks in the disaster recovery scene.
It can be understood that when the disaster recovery task is created, the user can configure network configuration parameters applicable to the scenes of data synchronization, drill switching and formal switching for each network card of the backup server through the graphical interface, and then store the configured parameters in the disaster backup server. Specific configurable parameters are as follows: a) General configuration: network card device name, IP address, subnet mask, default gateway, DNS, routing table, etc.; b) More configurations: i. the backup server is connected to the network outlet. VLAN ID of the backup server.
It should be understood that when the standby server is a virtual machine, the network card can be increased or decreased according to actual requirements, and when the standby server is a physical machine, the network information can be configured only for the existing network card, and a plurality of IP addresses can be set for the same network card.
Network isolation may be achieved when the network device to which the backup server is connected may be controlled. For example, when the standby server is a virtual machine in the virtual platform, the virtual platform API interface may be invoked to configure a different network outlet to which a certain network card is connected for the standby server, so as to implement communication with the outside world (such as a disaster recovery server, a main server, or other hosts), and network isolation after switching. The virtualization platform is a computer and matched equipment thereof for the information and system science related engineering and technical field, and a physical computer is divided into a plurality of independent virtual environments by creating and managing virtualized resources on physical hardware. Allowing multiple virtual machines to run simultaneously on a single physical host, each virtual machine can independently run different operating systems and applications. Such as VMware, deep mail super fusion platform, and the like. When the network equipment (such as a switch, a router and the like) connected with the standby server can be remotely controlled, the VLAN ID configuration on the corresponding network port can be configured, so that the network communication and the network isolation are realized. In the synchronization stage, the master server and the slave server can be set in the same VLAN when the master server and the slave server are required to perform network communication; when the drilling is switched, the standby server needs to use the same IP address as the main server, and obviously if the IP address is directly configured without processing, network conflict can occur, at this time, network isolation between the standby server and the main server can be realized by configuring the VLAN ID of the port where the standby server is positioned to be a VLAN ID different from that of the main server, and network conflict is avoided.
Step S30: and configuring a network for the standby server according to the demand configuration parameters.
Furthermore, because the primary server and the secondary server need to be adjusted to the same network under the data synchronization scene, so that the primary server and the secondary server can perform network communication, the primary server can be in the same VLAN by setting a network outlet or VLAN ID, and the network communication and the data transmission can be performed after the subsequent network configuration is successful. Therefore, the demand configuration parameters include a first preset network outlet, a first preset virtual local area network identifier and a first network card configuration parameter, wherein the first preset virtual local area network identifier is a virtual local area network identifier of a port where a main server in the disaster recovery task is located; the step S30 further includes: when the disaster recovery scene is a data synchronization scene, configuring a network outlet of the standby server as the first preset network outlet, or setting a virtual local area network identifier of a port where the standby server is located as the first preset virtual local area network identifier, so that the standby server communicates with a network where a main server in the disaster recovery task is located through the first preset network outlet or the first preset virtual local area network identifier; enumerating the network card of the standby server, and checking the network condition of the current network card according to the enumerated first network card configuration parameters of the current network card; when the network condition of the current network card meets the preset network condition, the current network card is determined to be a target network card, so that the main server and the standby server perform data synchronization in the virtual local area network corresponding to the first preset virtual local area network identifier through the target network card.
It will be appreciated that in the context of data synchronization, data synchronization is performed between primary and secondary servers, so that the primary and secondary servers may be disposed in a network so that they may communicate over the network. Firstly, acquiring network configuration parameters of a data synchronization stage, and analyzing the parameters; judging whether the demand configuration parameters comprise network outlets or VLAN IDs, and when the network outlets can be configured, calling a virtual platform API interface to set the standby server as a first preset network outlet appointed in advance, wherein the first preset network outlet is an outlet which can be communicated with a network where a main server is located; or when the VLAN ID can be configured, the standby server needs to be set as a pre-designated first preset VLAN ID, wherein the VLAN ID is the VLAN ID of the port where the main server in the disaster recovery task is located. After the setting is completed, the master server and the slave server can be in the same VLAN, and network communication and data transmission can be performed after the subsequent network configuration is successful.
It should be appreciated that after the primary and backup servers are located in the same network, the network of backup servers may be configured and available checks performed. Firstly, judging whether the distribution mode of the IP address in the requirement configuration parameters is dynamic IP or static IP. When dynamic IP is used, starting a DHCP service in the standby server, setting a DHCP mode for each network card of the standby server, and finally checking whether the IP distributed by the DHCP service for the standby server is available. When static IP is used, an IP address can be designated manually in advance, then network cards of the standby server are enumerated, the read first network card configuration parameters used by the standby server in the synchronous stage, such as the IP address, the subnet mask, the default gateway and the DNS, are sequentially set according to the network card sequence, whether the network of the network card is unobstructed is checked, if the network is unobstructed, the configuration is completed, if the network is not unobstructed, the network information of the network card is cleared, and then the next network card is set until the network is unobstructed. If all network cards are unavailable after attempting to set, the network setting module is exited to prompt the user to check the network configuration until the network configuration is set up newly. Network communication and data transmission can be performed after the network configuration is successful.
In this embodiment, before executing a disaster recovery task, determining a disaster recovery scene in which the disaster recovery task is located, determining a demand configuration parameter of a standby server in the disaster recovery task in the disaster recovery scene, and configuring a network for the standby server according to the demand configuration parameter. In the embodiment, the disaster recovery scene in which the disaster recovery task is located is determined first, and because the network configuration requirements of the backup servers in the disaster recovery task are different in different disaster recovery scenes, the demand configuration parameters of the backup servers in the disaster recovery scene can be determined, and then the network is configured for the backup servers according to the configured parameters, so that the network of the backup servers can be automatically configured according to the demand configuration parameters in different scenes, manual intervention is not needed, the operation is simple and quick, the service continuity of the main server is effectively ensured, the time consumption in a switching stage is reduced, and the error rate of the configured network is reduced.
Referring to fig. 3, fig. 3 is a flow chart of a second embodiment of the service disaster recovery network configuration method according to the present invention.
Further, when simulated disaster exercise switching is required or the main server fails and formal switching is required, switching operation is initiated first, then the main server and the standby server are adjusted to the networks isolated from each other, and preparation is made for the next configuration of the standby server network. Technically, the standby server takes over the service provided by the main server, and the most common mode is to configure the same IP address as the main server; obviously, if network isolation is not performed, it is not possible to work properly with two servers having the same IP address in the same network. Therefore, the network isolation can be achieved by configuring the network of the provisioning server so that it is not in the same network as the primary server.
Therefore, based on the first embodiment, in this embodiment, the required configuration parameters include a second network card configuration parameter; the step S30 includes:
Step S301: when the disaster recovery scene is a drilling switching scene or a formal switching scene, configuring a network where the standby server is located according to the demand configuration parameters, wherein the network where the standby server is located is different from a network where a main server in the disaster recovery task is located.
When a simulated disaster exercise switch is required or a main server fails and a formal switch is required (hereinafter, collectively referred to as a switch), a switch operation is initiated first, a data point to which a standby server can be switched is selected, and network configuration information is displayed and modified when the standby server is switched. Then, the second network card configuration parameters (the MAC address, the network card equipment name, the IP address, the subnet mask, the global default gateway, the DNS, the routing table and other network card configuration parameters of each network card of the standby server) in the demand configuration parameters used during the switching of the disaster recovery task setting are stored in the appointed area of the standby server; the primary and backup servers are then tuned into networks that are isolated from each other, ready for the next configuration of the backup server network.
Further, network isolation of the main server and the standby server can be achieved in various modes, specifically, the network outlet of the standby server and the main server can be set in different VLANs, and since the outlet network isolation is achieved, no matter whether the IP configuration of the main server and the standby server is consistent, services can be provided to the outside after a service system in the standby server is started, and the whole exercise switching process can not influence the normal operation of the service of the main server. Thus, the demand configuration parameters include a second preset network egress; the step S301 further includes: when the disaster recovery scene is a drilling switching scene or a formal switching scene, the network outlet of the standby server is configured to be the second preset network outlet, so that the standby server is isolated from the network where the main server in the disaster recovery task is located through the second preset network outlet.
It will be appreciated that network isolation from the primary server may be achieved by providing a network outlet for the backup server. The standby server can be a virtual machine on a virtualization platform, different virtual networks and port groups can be configured in the virtualization platform, for example, an Access port can be configured, VLAN IDs of the Access port are designated, and then the virtual machine in the virtualization platform is divided into different virtual local area networks according to the different VLAN IDs, so that network isolation is realized. When the network parameters of the switching stage are configured for the disaster tolerant task, the network outlet of the standby server can be set as a second preset network outlet, the second preset network outlet is a network outlet in a different VLAN with the main server, then the network outlet of the standby server is adjusted to the second preset network outlet according to the acquired demand configuration parameters during switching, and then the network configuration is carried out on the standby server.
Further, in order to realize network isolation of the primary server and the backup server, the virtual local area network identifier of the port where the backup server is located or the virtual local area network identifier of the network adapter may be set to be a network identifier different from the virtual local area network identifier of the port where the primary server is located, so as to realize logical isolation. Therefore, the requirement configuration parameter comprises a second preset virtual local area network identifier, wherein the second preset virtual local area network identifier is a network identifier different from the virtual local area network identifier of the port where the main server in the disaster recovery task is located; the step S301 further includes: when the disaster recovery scene is a drilling switching scene or a formal switching scene, the virtual local area network identifier of the port or the network adapter where the backup server is located is set to be the second preset virtual local area network identifier, so that the backup server is isolated from the network where the main server in the disaster recovery task is located through the second preset virtual local area network identifier.
It should be noted that, network isolation from the main server may be achieved by setting a VLAN ID of a network port to which the backup server is connected. Different VLAN IDs represent different virtual local area networks, and different devices are divided into different VLANs, so that logical isolation can be realized, and the devices can only communicate with the devices in the same VLAN. The method specifically includes that when the standby server is switched, a designated second preset virtual local area network identifier VLAN ID can be set for a network port to which the standby server is connected, and the second preset virtual local area network identifier is a network identifier different from a virtual local area network identifier of a port where a main server is located. After the setting is completed, the standby server can only communicate with other devices under the second preset virtual local area network identifier, if the exercise switching is performed and the same IP address as that of the main server needs to be configured, the VLAN ID of the network port connected to the standby server is different from that connected to the main server, and the normal operation of the respective service system is not affected even though the IP addresses of the main server and the standby server are the same.
It should be appreciated that network isolation from the host server may also be achieved by provisioning the VLAN ID of the server network adapter. The computer device can set the VLAN ID of its network adapter through system configuration, and identify the VLAN to which the adapter belongs. When the primary and secondary servers have different VLAN IDs, network conflicts are not caused even though the network configurations of the primary and secondary servers are identical. When the disaster recovery task is specifically implemented, when the network parameters of the switching stage are configured, the VLAN ID of the network adapter of the standby server needs to be specified, then the network adapter of the standby server needs to be set to the specified VLAN ID during switching, and then the network configuration and the subsequent flow are carried out for the standby server. At this time, the primary and standby servers are in different VLANs which are independent and do not interfere with each other during switching, and even if the IP addresses of the primary and standby servers are the same, the normal operation of the respective service systems is not affected.
Further, in order to realize network isolation of the primary server and the backup server, when the virtualization platform where the backup server is located supports complete network virtual capability, network resources can be virtualized, namely virtual network equipment and network topology can be created and managed, and then the backup server and the virtual switch can be connected and communicated by independently creating one virtual network equipment, so that network isolation of the backup server and the primary server during switching is realized. Therefore, the step S301 further includes: when the disaster recovery scene is a drilling switching scene or a formal switching scene and the virtualization platform where the backup server is located has network virtual capability, connecting a network card of the backup server with a virtual switch created by the virtualization platform so as to enable the backup server to communicate with equipment of the virtual switch and isolate a network where a main server in the disaster recovery task is located.
It will be appreciated that when the virtualization platform where the standby server is located supports the full network virtualization capability, network resources may be virtualized, i.e. virtual network devices and network topologies may be created and managed, and then network isolation of the standby server from the main server at the time of the drill switch may be achieved by creating one virtual network device alone. For example: when the backup server is switched, the network card of the backup server is connected to the port of the virtual switch, and the backup server is connected to an independent virtual switch of the virtualization platform and can only communicate with other settings on the virtual switch, so that network isolation with the main server can be realized.
Step S302: enumerating the network card of the standby server, and determining the second network card configuration parameters corresponding to the current network card according to the enumerated MAC address of the current network card.
It should be understood that the backup server may read the network configuration information of the backup server at the handover stage stored in the designated area, and automatically configure the network of the backup server according to the configuration information. The main configuration flow is as follows: enumerating all network cards on the standby server, and inquiring second network card configuration parameters which are required to be configured and correspond to each network card according to the MAC address of each network card: network card device name, IP address, subnet mask, default gateway, DNS, routing table, etc.
Step S303: and clearing the network configuration information of the current network card, writing the configuration parameters of the second network card into a preset network configuration file under a preset directory of the standby server according to a preset rule, so that the standby server restarts a network service and a service system according to the preset network configuration file, and switching the service supported by the main server to be supported by the standby server.
It can be understood that the acquired demand configuration parameters can be written into the designated network configuration file under the designated directory of the standby server according to the designated rule, then all network configurations old by the network card are cleared, then the network service of the standby server is restarted to make the network configuration effective immediately, and after the service restart is successful, the standby server can use the network configuration applicable in the switching stage for communication. After the network configuration is completed in the switching stage, finally, the application system in the standby server is started, and the standby server can provide services to the outside.
In this embodiment, it is disclosed that when a disaster recovery scenario of a switching scenario is performed during drilling or a formal switching scenario, a network of a backup server is configured according to a demand configuration parameter, so that the backup server and a primary server are in different networks, thereby implementing network isolation of the primary server and the backup server, and then network configuration is performed on the backup server, so that the backup server restarts a network service and a service system, thereby switching services supported by the primary server to services supported by the backup server. In the existing implementation mode, the network cable of the main server is pulled out during drilling switching, so that the service of the main server is interrupted; before each exercise, the exercise time period needs to be negotiated with the business user, and business operation is not needed in the exercise time period, so that business continuity is affected. In the embodiment, the main server and the standby server are isolated into different logic networks during the exercise switching by modifying the logic network topology, so that the standby server can not influence the operation of the main server during the exercise; that is, in the drilling process, the main server does not need to interrupt the service, so that the service continuity is effectively ensured. Meanwhile, the compatibility is good, high-availability equipment with high price is not needed to be relied on, and the system can be adapted to various legacy systems and the legacy systems are not needed to be modified.
Referring to fig. 4, fig. 4 is a flow chart of a third embodiment of a service disaster recovery network configuration method according to the present invention.
Further, after simulation disaster exercise or formal switching is completed, switching can be completed, so that the main server and the standby server can enter a state capable of continuing synchronization, the main server and the standby server can be rearranged in the same network, network configuration is carried out on the standby server by using the demand configuration parameters before switching, and the main server and the standby server are adjusted to be in the same network, but respectively have different IP addresses, so that network communication can be normally carried out.
Therefore, based on the second embodiment, in this embodiment, the required configuration parameters include a third network card configuration parameter, a third preset network outlet, and a third preset virtual local area network identifier, where the third preset virtual local area network identifier is a virtual local area network identifier of a port where a main server in the disaster recovery task is located; after the step S303, the method further includes:
step S304: and when the drilling switching or the formal switching is finished, carrying out network configuration on the standby server according to the third network card configuration parameters.
After the simulation disaster exercise is completed, the end switching is required to be performed, so that the main server and the standby server can be brought into a state capable of continuing synchronization. The operation of ending the switching may be initiated first on the interface of the disaster recovery server, then the application system in the backup server is stopped, the related program is waited to enter the stopped state, and then the network of the backup server is restored to the configuration before the switching. The required configuration parameters may be set in advance by the service personnel before returning to the pre-switch configuration, for example, the third network card configuration parameters included in the required configuration parameters herein may be the same as the first network card configuration parameters in the required configuration parameters of the synchronization stage. When the switching is actually finished, the network configuration can be performed by using configuration parameters applicable to the synchronization stage, a network configuration module is automatically operated in the standby server, and an IP (Internet protocol) and the like are set for the standby server.
Step S305: setting the network outlet of the standby server as the third preset network outlet, or setting the virtual local area network identifier of the standby server as the third preset virtual local area network identifier, so that the standby server communicates with the network where the main server in the disaster recovery task is located through the third preset network outlet or the third preset virtual local area network identifier.
It should be noted that, before the configuration before the switch is restored, the service personnel may set in advance the requirement configuration parameters to further include a third preset network outlet and a third preset virtual local area network identifier, and similarly, the third preset network outlet and the third preset virtual local area network identifier may be network identifiers that enable the master server to communicate in the same network, for example, the third preset network outlet and the third preset virtual local area network identifier may be the same as the first preset network outlet and the first preset virtual local area network identifier in the synchronization stage respectively. And then, based on the third preset network outlet or the third preset virtual local area network identifier, the master and slave servers are adjusted to the same network, and after adjustment, the master and slave servers are in the same network, but respectively have different IP addresses, so that network communication can be normally performed. And the process of ending the switching is finished, the main server and the standby server return to the synchronous state, the data of the main server is continuously transmitted to the standby server, and the data synchronization is continued.
In this embodiment, it is disclosed that when the disaster recovery scenario is an exercise switching scenario or a formal switching scenario, and the exercise switching or the formal switching is finished, network configuration is performed on the standby server according to the third network card configuration parameter; setting the network outlet of the standby server as the third preset network outlet, or setting the virtual local area network identifier of the standby server as the third preset virtual local area network identifier, so that the standby server communicates with the network where the main server in the disaster recovery task is located through the third preset network outlet or the third preset virtual local area network identifier. In this embodiment, when the switching is completed, the configuration for ending the switching is performed, so that the active and standby servers enter a state in which they can continue to be synchronized, the active and standby servers are reset in the same network, the standby servers are configured by using the required configuration parameters before the switching, and the active and standby servers are adjusted to be in the same network, but each have different IP addresses, so that network communication can be performed normally.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium is stored with a service disaster recovery network configuration program, and the service disaster recovery network configuration program realizes the steps of the service disaster recovery network configuration method when being executed by a processor.
Referring to fig. 5, fig. 5 is a block diagram of a first embodiment of a service disaster recovery network configuration device according to the present invention.
As shown in fig. 5, the service disaster recovery network configuration device provided in the embodiment of the present invention includes:
the scene determination module 501 is configured to determine, before executing a disaster recovery task, a disaster recovery scene in which the disaster recovery task is located;
a parameter determining module 502, configured to determine a demand configuration parameter of a standby server in the disaster recovery task in the disaster recovery scenario;
A network configuration module 503, configured to configure a network for the standby server according to the requirement configuration parameter.
In the embodiment, before executing the disaster recovery task, a disaster recovery scene in which the disaster recovery task is located is determined, a demand configuration parameter of a standby server in the disaster recovery task in the disaster recovery scene is determined, and a network is configured for the standby server according to the demand configuration parameter. In the embodiment, the disaster recovery scene in which the disaster recovery task is located is determined first, and because the network configuration requirements of the backup servers in the disaster recovery task are different in different disaster recovery scenes, the demand configuration parameters of the backup servers in the disaster recovery scene can be determined, and then the network is configured for the backup servers according to the configured parameters, so that the network of the backup servers can be automatically configured according to the demand configuration parameters in different scenes, manual intervention is not needed, the operation is simple and quick, the service continuity of the main server is effectively ensured, the time consumption in a switching stage is reduced, and the error rate of the configured network is reduced.
Based on the first embodiment of the service disaster recovery network configuration device of the present invention, a second embodiment of the service disaster recovery network configuration device of the present invention is provided.
In this embodiment, the network configuration module 503 is further configured to configure, when the disaster recovery scenario is a data synchronization scenario, a network outlet of the backup server as the first preset network outlet, or set a virtual local area network identifier of a port where the backup server is located as the first preset virtual local area network identifier, so that the backup server communicates with a network where a main server in the disaster recovery task is located through the first preset network outlet or the first preset virtual local area network identifier; enumerating the network card of the standby server, and checking the network condition of the current network card according to the enumerated first network card configuration parameters of the current network card; when the network condition of the current network card meets the preset network condition, the current network card is determined to be a target network card, so that the main server and the standby server perform data synchronization in the virtual local area network corresponding to the first preset virtual local area network identifier through the target network card.
As an implementation manner, the network configuration module 503 is further configured to configure, according to the requirement configuration parameter, a network where the backup server is located when the disaster recovery scenario is a drilling handover scenario or a formal handover scenario, where the network where the backup server is located is different from a network where a main server in the disaster recovery task is located; enumerating the network card of the standby server, and determining the second network card configuration parameters corresponding to the current network card according to the enumerated MAC address of the current network card; and clearing the network configuration information of the current network card, writing the configuration parameters of the second network card into a preset network configuration file under a preset directory of the standby server according to a preset rule, so that the standby server restarts a network service and a service system according to the preset network configuration file, and switching the service supported by the main server to be supported by the standby server.
As an implementation manner, the network configuration module 503 is further configured to, when the disaster recovery scenario is a drilling handover scenario or a formal handover scenario, configure a network outlet of the backup server as the second preset network outlet, so as to isolate, through the second preset network outlet, the backup server from a network where a main server in the disaster recovery task is located.
As an implementation manner, when the disaster recovery scenario is a drilling handover scenario or a formal handover scenario, the network configuration module 503 is further configured to set, as the second preset virtual local area network identifier, a virtual local area network identifier of a port or a network adapter where the backup server is located, so as to isolate the backup server from a network where a main server in the disaster recovery task is located through the second preset virtual local area network identifier.
As an implementation manner, the network configuration module 503 is further configured to connect, when the disaster recovery scenario is a drilling switching scenario or a formal switching scenario, and the virtualization platform where the backup server is located has a network virtual capability, a network card of the backup server with a virtual switch created by the virtualization platform, so that the backup server communicates with a device of the virtual switch, and is isolated from a network where a main server in the disaster recovery task is located.
As an implementation manner, the network configuration module 503 is further configured to perform network configuration on the standby server according to the third network card configuration parameter when the drill switch or the formal switch is over; setting the network outlet of the standby server as the third preset network outlet, or setting the virtual local area network identifier of the standby server as the third preset virtual local area network identifier, so that the standby server communicates with the network where the main server in the disaster recovery task is located through the third preset network outlet or the third preset virtual local area network identifier.
Other embodiments or specific implementation manners of the service disaster recovery network configuration device of the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The service disaster recovery network configuration method is characterized by comprising the following steps:
before executing a disaster recovery task, determining a disaster recovery scene in which the disaster recovery task is located;
Determining a demand configuration parameter of a standby server in the disaster recovery task in the disaster recovery scene;
and configuring a network for the standby server according to the demand configuration parameters.
2. The service disaster recovery network configuration method according to claim 1, wherein the requirement configuration parameters include a first preset network outlet, a first preset virtual local area network identifier and a first network card configuration parameter, and the first preset virtual local area network identifier is a virtual local area network identifier of a port where a main server in the disaster recovery task is located;
The configuring the network for the standby server according to the requirement configuration parameters includes:
When the disaster recovery scene is a data synchronization scene, configuring a network outlet of the standby server as the first preset network outlet, or setting a virtual local area network identifier of a port where the standby server is located as the first preset virtual local area network identifier, so that the standby server communicates with a network where a main server in the disaster recovery task is located through the first preset network outlet or the first preset virtual local area network identifier;
Enumerating the network card of the standby server, and checking the network condition of the current network card according to the enumerated first network card configuration parameters of the current network card;
When the network condition of the current network card meets the preset network condition, the current network card is determined to be a target network card, so that the main server and the standby server perform data synchronization in the virtual local area network corresponding to the first preset virtual local area network identifier through the target network card.
3. The service disaster recovery network configuration method according to claim 1, wherein the demand configuration parameters include a second network card configuration parameter;
The configuring the network for the standby server according to the requirement configuration parameters includes:
When the disaster recovery scene is a drilling switching scene or a formal switching scene, configuring a network where the standby server is located according to the demand configuration parameters, wherein the network where the standby server is located is different from a network where a main server in the disaster recovery task is located;
enumerating the network card of the standby server, and determining the second network card configuration parameters corresponding to the current network card according to the enumerated MAC address of the current network card;
And clearing the network configuration information of the current network card, writing the configuration parameters of the second network card into a preset network configuration file under a preset directory of the standby server according to a preset rule, so that the standby server restarts a network service and a service system according to the preset network configuration file, and switching the service supported by the main server to be supported by the standby server.
4. The service disaster recovery network configuration method according to claim 3, wherein said demand configuration parameters include a second preset network egress;
When the disaster recovery scene is a drilling switching scene or a formal switching scene, configuring a network where the standby server is located according to the demand configuration parameter, including:
When the disaster recovery scene is a drilling switching scene or a formal switching scene, the network outlet of the standby server is configured to be the second preset network outlet, so that the standby server is isolated from the network where the main server in the disaster recovery task is located through the second preset network outlet.
5. The service disaster recovery network configuration method according to claim 3, wherein said demand configuration parameters include a second preset virtual local area network identifier, said second preset virtual local area network identifier being a network identifier different from a virtual local area network identifier of a port where a main server in said disaster recovery task is located;
When the disaster recovery scene is a drilling switching scene or a formal switching scene, configuring a network where the standby server is located according to the demand configuration parameter, including:
When the disaster recovery scene is a drilling switching scene or a formal switching scene, the virtual local area network identifier of the port or the network adapter where the backup server is located is set to be the second preset virtual local area network identifier, so that the backup server is isolated from the network where the main server in the disaster recovery task is located through the second preset virtual local area network identifier.
6. The service disaster recovery network configuration method according to claim 3, wherein when the disaster recovery scenario is a drill handover scenario or a formal handover scenario, configuring the network where the backup server is located according to the demand configuration parameter includes:
When the disaster recovery scene is a drilling switching scene or a formal switching scene and the virtualization platform where the backup server is located has network virtual capability, connecting a network card of the backup server with a virtual switch created by the virtualization platform so as to enable the backup server to communicate with equipment of the virtual switch and isolate a network where a main server in the disaster recovery task is located.
7. The service disaster recovery network configuration method according to any one of claims 3 to 6, wherein the requirement configuration parameters include a third network card configuration parameter, a third preset network outlet, and a third preset virtual local area network identifier, where the third preset virtual local area network identifier is a virtual local area network identifier of a port where a main server in the disaster recovery task is located;
The step of clearing the network configuration information of the current network card, writing the configuration parameters of the second network card into a preset network configuration file under a preset directory of the standby server according to a preset rule, so that the standby server restarts a network service and a service system according to the preset network configuration file, and after switching the service supported by the main server to the service supported by the standby server, the step of further comprises:
When the drilling switching or the formal switching is finished, carrying out network configuration on the standby server according to the third network card configuration parameters;
Setting the network outlet of the standby server as the third preset network outlet, or setting the virtual local area network identifier of the standby server as the third preset virtual local area network identifier, so that the standby server communicates with the network where the main server in the disaster recovery task is located through the third preset network outlet or the third preset virtual local area network identifier.
8. The service disaster recovery network configuration device is characterized by comprising:
the scene determining module is used for determining a disaster recovery scene where the disaster recovery task is located before the disaster recovery task is executed;
The parameter determining module is used for determining the demand configuration parameters of the standby server in the disaster recovery task in the disaster recovery scene;
and the network configuration module is used for configuring a network for the standby server according to the requirement configuration parameters.
9. A service disaster recovery network configuration device, the device comprising: a memory, a processor and a service disaster recovery network configuration program stored on the memory and operable on the processor, the service disaster recovery network configuration program configured to implement the steps of the service disaster recovery network configuration method according to any one of claims 1 to 7.
10. A storage medium, wherein a service disaster recovery network configuration program is stored on the storage medium, and the service disaster recovery network configuration program, when executed by a processor, implements the steps of the service disaster recovery network configuration method according to any one of claims 1 to 7.
CN202410668252.5A 2024-05-28 Service disaster recovery network configuration method, device, equipment and storage medium Pending CN118250153A (en)

Publications (1)

Publication Number Publication Date
CN118250153A true CN118250153A (en) 2024-06-25

Family

ID=

Similar Documents

Publication Publication Date Title
CN110113441B (en) Computer equipment, system and method for realizing load balance
US8644132B2 (en) Maintaining a communication path from a host to a storage subsystem in a network
CN109067877B (en) Control method for cloud computing platform deployment, server and storage medium
CN107544841B (en) Virtual machine live migration method and system
CN109861839B (en) Method for upgrading virtual switch without service interruption and related equipment
CN105099789A (en) Network element uploading method and equipment
US20110239216A1 (en) Service providing system, a virtual machine server, a service providing method, and a program thereof
US20210058292A1 (en) Network configuration method, device, and system
US6651093B1 (en) Dynamic virtual local area network connection process
CN114070723B (en) Virtual network configuration method and system of bare metal server and intelligent network card
EP3316555B1 (en) Mac address synchronization method, device and system
CN112436966B (en) OpenStack platform-based cloud physical host network card binding configuration method and system
CN111711536B (en) Firewall test environment construction method under cloud architecture
CN109391514B (en) High-availability-based equipment deployment method, server, storage medium and device
GB2462160A (en) A distributed server system includes a table indicating communication relationships between various service programs
CN110535947B (en) Storage device cluster configuration node switching method, device and equipment
CN111092828B (en) Network operation method, device, equipment and storage medium
CN114615109A (en) Container network creating method and device, electronic equipment and storage medium
CN109032754B (en) Method and apparatus for improving reliability of communication path
CN113259219B (en) VPN construction method based on OVN environment, readable storage medium and cloud platform
CN112564983B (en) Data transmission method, device, computer system and medium
US11288086B2 (en) Network system, management method and apparatus thereof, and server
US9071548B2 (en) Methods, systems, and computer readable media for effecting movement of virtual switch interfaces between virtual switches connected to different physical ports of a device under test
CN111835684B (en) Network isolation monitoring method and system for haproxy equipment
CN118250153A (en) Service disaster recovery network configuration method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication