[go: up one dir, main page]

CN114237982B - System disaster recovery switching method, device, equipment and storage medium - Google Patents

System disaster recovery switching method, device, equipment and storage medium Download PDF

Info

Publication number
CN114237982B
CN114237982B CN202111533327.1A CN202111533327A CN114237982B CN 114237982 B CN114237982 B CN 114237982B CN 202111533327 A CN202111533327 A CN 202111533327A CN 114237982 B CN114237982 B CN 114237982B
Authority
CN
China
Prior art keywords
file
backup
disaster recovery
switching
disaster
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.)
Active
Application number
CN202111533327.1A
Other languages
Chinese (zh)
Other versions
CN114237982A (en
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.)
Ping An Securities Co Ltd
Original Assignee
Ping An Securities Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Securities Co Ltd filed Critical Ping An Securities Co Ltd
Priority to CN202111533327.1A priority Critical patent/CN114237982B/en
Publication of CN114237982A publication Critical patent/CN114237982A/en
Application granted granted Critical
Publication of CN114237982B publication Critical patent/CN114237982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to an artificial intelligence technology and discloses a system disaster recovery switching method, which comprises the steps of carrying out rule configuration based on application related information to obtain application configuration rules and storing the application configuration rules into a configuration information database, carrying out file backup on a switching file corresponding to a disaster recovery switching task when a trigger instruction of the system disaster recovery switching task is received to obtain a backup disaster recovery file, acquiring disaster recovery switching configuration information corresponding to the disaster recovery switching task from the configuration information database, carrying out switching on the disaster recovery file based on the disaster recovery switching configuration information and restarting a process, and carrying out disaster recovery switching on the backup disaster recovery file if the process restarting fails, obtaining the switched disaster recovery file and restarting the process until the process restarting is successful. In addition, the invention also relates to a block chain technology, and the application configuration rule can be stored in a node of the block chain. The invention also provides a system disaster recovery switching device, electronic equipment and a storage medium. The invention can improve the efficiency of system disaster recovery switching.

Description

System disaster recovery switching method, device, equipment and storage medium
Technical Field
The present invention relates to the field of artificial intelligence technologies, and in particular, to a system disaster recovery switching method, a device, an electronic device, and a computer readable storage medium.
Background
The application service system is stable to run at ordinary times and is generally switched without modifying the configuration, but in extreme cases or certain scenes, the configuration is required to be modified, the application system is restarted, the service of the application system is quickly recovered, and the stable running of the service system is ensured. The existing method for processing the disaster recovery switching of the application system is usually implemented by manually intervening operation and maintenance, logging in a background application server, modifying service application configuration and restarting related applications, when the online application system is deployed more, the manual maintenance cost is increased, meanwhile, the manual processing needs to find the corresponding configuration step by step to modify and restart, the time cost spent in the middle is also high, and the system is not available for a longer time when switching, so that the service is influenced. Therefore, a system disaster recovery switching method with higher efficiency is needed.
Disclosure of Invention
The invention provides a system disaster recovery switching method, a system disaster recovery switching device and a computer readable storage medium, and mainly aims to improve the efficiency of system disaster recovery switching.
In order to achieve the above object, the present invention provides a system disaster recovery switching method, including:
Acquiring application related information, carrying out rule configuration based on the application related information to obtain an application configuration rule, and storing the application configuration rule into a preset configuration information database;
When a trigger instruction of a disaster backup switching task of a system is received, carrying out file backup on a switching file corresponding to the disaster backup switching task to obtain a backup disaster backup file;
Obtaining disaster backup switching configuration information corresponding to the disaster backup switching task from the configuration information database, switching disaster backup files in the disaster backup switching task based on the disaster backup switching configuration information, and restarting a process according to the switched disaster backup files;
if the process is successfully restarted, judging that the disaster recovery switching of the system is successful, if the process is failed to restart, performing disaster recovery switching on the backup disaster recovery file to obtain a switched disaster recovery file, and restarting the process until the process is successfully restarted.
Optionally, the rule configuration based on the application related information to obtain an application configuration rule includes:
identifying an information format of the application related information, and judging whether the information format is consistent with a preset format or not;
If the information format is consistent with the preset format, the application related information is used as standard application information;
if the information format is inconsistent with the preset format, converting the information format into information in the preset format by using a format converter, and taking the converted information as standard application information;
deploying the standard application information to obtain a plurality of deployment rules;
and summarizing the deployment rules and recording the deployment rules into a preset default configuration file to obtain the application configuration rule.
Optionally, the deploying the standard application information to obtain a plurality of deployment rules includes:
acquiring a preset disaster recovery condition and a corresponding coping mode of the disaster recovery condition;
and comparing the standard application information with the disaster recovery situations, and taking a corresponding coping mode of the disaster recovery situations with consistent comparison as a deployment rule of the standard application information.
Optionally, the performing file backup on the switching file corresponding to the disaster recovery switching task to obtain a backup disaster recovery file includes:
Performing file encapsulation processing on the switching file to obtain a backup data packet and storing the backup data packet in a preset file backup source end;
Receiving a backup data packet sent by a file backup source terminal, and analyzing the backup data packet by using a preset file transmission protocol to obtain at least one backup file;
Acquiring file information of each backup file, and matching the file information with a preset backup strategy to obtain a matching result;
and storing the backup file to a storage position in the backup strategy according to the matching result to obtain the backup disaster recovery file.
Optionally, the performing file encapsulation processing on the switch file to obtain a backup data packet includes:
Performing segmentation processing on the switching file based on a preset standard size to obtain a plurality of segmentation subfiles;
And acquiring file descriptions corresponding to the plurality of segmentation subfiles, carrying out one-to-one correspondence on the plurality of segmentation subfiles and the corresponding file descriptions, and summarizing the segmentation subfiles and the file descriptions after one-to-one correspondence to obtain a backup data packet.
Optionally, the switching the disaster recovery file in the disaster recovery switching task based on the disaster recovery switching configuration information includes:
identifying a file path and corresponding configuration information of the disaster recovery file;
and searching information based on the file path, and replacing the configuration information by utilizing the disaster recovery backup switching configuration information to obtain a switched disaster recovery backup file.
Optionally, before the process is restarted according to the disaster recovery file after the switching, the method further includes:
And checking whether the port of the process is successfully opened or not by using a preset detection code.
In order to solve the above problems, the present invention further provides a system disaster recovery switching device, where the device includes:
The rule configuration module is used for acquiring application related information, carrying out rule configuration based on the application related information to acquire an application configuration rule, and storing the application configuration rule into a preset configuration information database;
the file backup module is used for carrying out file backup on the switching files corresponding to the disaster backup switching tasks when receiving the triggering instruction of the disaster backup switching tasks of the system to obtain backup disaster backup files;
The file switching module is used for acquiring disaster backup switching configuration information corresponding to the disaster backup switching task from the configuration information database, switching disaster backup files in the disaster backup switching task based on the disaster backup switching configuration information, and restarting the process according to the switched disaster backup files;
And the process restarting module is used for judging that the disaster recovery switching of the system is successful if the process restarting is successful, and if the process restarting is failed, performing disaster recovery switching on the backup disaster recovery file to obtain a switched disaster recovery file, and restarting the process until the process restarting is successful.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
at least one processor, and
A memory communicatively coupled to the at least one processor, wherein,
The memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the system disaster recovery device switching method described above.
In order to solve the above-mentioned problems, the present invention also provides a computer readable storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the above-mentioned system disaster recovery switching method.
According to the embodiment of the invention, the rule configuration is carried out based on the application related information, so that the application configuration rule is obtained and stored in the configuration information database, and the preset rule configuration can be used as a subsequent data basis, so that the disaster recovery switching efficiency is improved. When a trigger instruction of a disaster recovery switching task of a system is received, carrying out file backup on a switching file corresponding to the disaster recovery switching task to obtain a backup disaster recovery file, wherein the file backup can be used as original data after disaster recovery switching failure to carry out next disaster recovery switching. And switching the disaster recovery files in the disaster recovery switching task based on the disaster recovery switching configuration information corresponding to the disaster recovery switching task obtained from the configuration information database, and restarting the process according to the switched disaster recovery files. The efficiency of disaster recovery switching of the system can be improved. Therefore, the system disaster recovery switching method, the device, the electronic equipment and the computer readable storage medium can solve the problem that the system disaster recovery switching efficiency is not high enough.
Drawings
FIG. 1 is a flow chart of a system disaster recovery switching method according to an embodiment of the present invention;
FIG. 2 is a functional block diagram of a system disaster recovery switching device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device for implementing the disaster recovery switching method according to an embodiment of 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.
The embodiment of the application provides a system disaster recovery switching method. The execution main body of the system disaster recovery switching method comprises at least one of a server, a terminal and the like which can be configured to execute the method provided by the embodiment of the application. In other words, the system disaster recovery switching method may be performed by software or hardware installed in a terminal device or a server device, where the software may be a blockchain platform. The server side comprises, but is not limited to, a single server, a server cluster, a cloud server or a cloud server cluster and the like. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (ContentDelivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flow chart of a system disaster recovery switching method according to an embodiment of the invention is shown. In this embodiment, the system disaster recovery switching method includes:
s1, acquiring application related information, carrying out rule configuration based on the application related information to obtain application configuration rules, and storing the application configuration rules into a preset configuration information database.
In the embodiment of the invention, the application related information refers to information such as the type of the configuration file, the file path and the like of the deployment application. The application configuration rule obtained by rule configuration is a coping mode which is prepared in advance according to a specific deployment mode of the system, and the application configuration rule is convenient for rapidly realizing the switching of the system under an emergency condition.
Specifically, the rule configuration based on the application related information to obtain an application configuration rule includes:
identifying an information format of the application related information, and judging whether the information format is consistent with a preset format or not;
If the information format is consistent with the preset format, the application related information is used as standard application information;
if the information format is inconsistent with the preset format, converting the information format into information in the preset format by using a format converter, and taking the converted information as standard application information;
deploying the standard application information to obtain a plurality of deployment rules;
and summarizing the deployment rules and recording the deployment rules into a preset default configuration file to obtain the application configuration rule.
In detail, the preset format may be json, xml or ini file format, and it is determined whether the information format of the application related information is a preset file format, if the information format is the preset file format, the application related information is used as standard application information, and if the information format is not the preset file format, the format converter is used to convert the information format into the preset file format and use the converted information as standard application information.
Further, the deploying the standard application information to obtain a plurality of deployment rules includes:
acquiring a preset disaster recovery condition and a corresponding coping mode of the disaster recovery condition;
and comparing the standard application information with the disaster recovery situations, and taking a corresponding coping mode of the disaster recovery situations with consistent comparison as a deployment rule of the standard application information.
In detail, the disaster recovery situation is a situation of encountering a disaster recovery scene frequently occurring in an application system, and the coping mode is a general mode for processing the disaster recovery situation.
S2, when a trigger instruction of a system disaster backup switching task is received, carrying out file backup on a switching file corresponding to the disaster backup switching task to obtain a backup disaster backup file.
In the embodiment of the invention, the trigger instruction of the disaster recovery switching task of the system refers to a request sent when disaster recovery switching is needed, and when the trigger instruction is received, the switching file corresponding to the disaster recovery switching task needs to be backed up first, so that a data basis is provided when subsequent misoperation or operation error occurs.
Specifically, the performing file backup on the switching file corresponding to the disaster recovery switching task to obtain a backup disaster recovery file includes:
Performing file encapsulation processing on the switching file to obtain a backup data packet and storing the backup data packet in a preset file backup source end;
Receiving a backup data packet sent by a file backup source terminal, and analyzing the backup data packet by using a preset file transmission protocol to obtain at least one backup file;
Acquiring file information of each backup file, and matching the file information with a preset backup strategy to obtain a matching result;
and storing the backup file to a storage position in the backup strategy according to the matching result to obtain the backup disaster recovery file.
In detail, the backup files received by the file backup terminal can be classified and stored in the preset storage position by setting the backup strategy, so that the automatic classification of the backup files can be realized, the backup files can be better processed, and the convenience in managing the backup files is improved. The backup strategy comprises a plurality of backup path matching strategies, the file information at least comprises one of backup paths, file owner IDs, file types, file capacities and file authorities, and the backup path matching strategies correspond to the data in the file information one by one.
Further, the file encapsulation processing is performed on the switching file to obtain a backup data packet, including:
Performing segmentation processing on the switching file based on a preset standard size to obtain a plurality of segmentation subfiles;
And acquiring file descriptions corresponding to the plurality of segmentation subfiles, carrying out one-to-one correspondence on the plurality of segmentation subfiles and the corresponding file descriptions, and summarizing the segmentation subfiles and the file descriptions after one-to-one correspondence to obtain a backup data packet.
The preset standard size can be set according to the specific size of the switching file. The file description corresponding to the molecular file refers to a sentence for briefly explaining the file.
In another embodiment of the present invention, the performing a file backup on the switching file corresponding to the disaster recovery backup switching task to obtain a backup disaster recovery backup file includes:
Acquiring automatic backup time and a file list of automatically backed-up switching files;
matching the automatic backup time with the current time to obtain matching processing information;
And carrying out backup processing on the backup files in the file list according to the matching processing information to obtain backup disaster recovery files.
In detail, by setting the automatic backup time, the file backup source terminal can automatically backup according to the preset automatic backup time, and the convenience of backup processing of the file backup is improved.
S3, acquiring disaster recovery switching configuration information corresponding to the disaster recovery switching task from the configuration information database, switching disaster recovery files in the disaster recovery switching task based on the disaster recovery switching configuration information, and restarting the process according to the switched disaster recovery files.
In the embodiment of the invention, a plurality of application configuration rules are stored in the configuration information base, and the prestored application configuration rules are beneficial to improving the efficiency of subsequent disaster recovery switching. And acquiring disaster backup switching configuration information corresponding to the disaster backup switching task from the configuration information database, wherein the disaster backup switching configuration information can be used for direct switching.
Specifically, the switching the disaster recovery file in the disaster recovery switching task based on the disaster recovery switching configuration information includes:
identifying a file path and corresponding configuration information of the disaster recovery file;
and searching information based on the file path, and replacing the configuration information by utilizing the disaster recovery backup switching configuration information to obtain a switched disaster recovery backup file.
In detail, the process of the switched disaster recovery file can be restarted, and whether the switching is successful or not is judged.
Further, before the process is restarted according to the disaster recovery file after the switching, the method further includes:
And checking whether the port of the process is successfully opened or not by using a preset detection code.
The preset detection code may be a netstat-lnp |grep port name, which is used to check which process the port is occupied by, so as to check whether the port is successfully opened.
Specifically, the process is restarted according to the switched disaster recovery file, and two possible situations of successful process restarting and failed process restarting can occur.
S4, if the process is restarted successfully, judging that the disaster recovery switching of the system is successful, if the process is restarted successfully, performing disaster recovery switching on the backup disaster recovery file, and restarting the process until the process is restarted successfully, wherein the backup disaster recovery file is obtained.
In the embodiment of the invention, when the process is restarted successfully, the system disaster recovery switching is successful, when the process is restarted successfully, the system disaster recovery switching is failed, at the moment, the backup disaster recovery file is required to be switched instead of the switched disaster recovery file, the switched disaster recovery file is modified, the disaster recovery switching is not accurate enough, the backup disaster recovery file obtained after the file backup before can be used as a modification basis, the disaster recovery switching is carried out on the backup disaster recovery file, the switched disaster recovery file is restarted until the process is restarted successfully.
If the corresponding process cannot be restarted or the port cannot be started, operation and maintenance are needed to be intervened again, and an emergency scheme is achieved to recover the system.
According to the embodiment of the invention, the rule configuration is carried out based on the application related information, so that the application configuration rule is obtained and stored in the configuration information database, and the preset rule configuration can be used as a subsequent data basis, so that the disaster recovery switching efficiency is improved. When a trigger instruction of a disaster recovery switching task of a system is received, carrying out file backup on a switching file corresponding to the disaster recovery switching task to obtain a backup disaster recovery file, wherein the file backup can be used as original data after disaster recovery switching failure to carry out next disaster recovery switching. And switching the disaster recovery files in the disaster recovery switching task based on the disaster recovery switching configuration information corresponding to the disaster recovery switching task obtained from the configuration information database, and restarting the process according to the switched disaster recovery files. The efficiency of disaster recovery switching of the system can be improved. Therefore, the system disaster recovery switching method provided by the invention can solve the problem of insufficient efficiency of system disaster recovery switching.
Fig. 2 is a functional block diagram of a system disaster recovery switching device according to an embodiment of the present invention.
The system disaster recovery switching device 100 of the present invention may be installed in an electronic device. Depending on the implementation function, the system disaster recovery switching device 100 may include a rule configuration module 101, a file backup module 102, a file switching module 103, and a process restarting module 104. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
The rule configuration module 101 is configured to obtain application related information, perform rule configuration based on the application related information to obtain an application configuration rule, and store the application configuration rule into a preset configuration information database;
the file backup module 102 is configured to, when a trigger instruction of a disaster recovery switching task of the system is received, perform file backup on a switching file corresponding to the disaster recovery switching task to obtain a backup disaster recovery file;
the file switching module 103 is configured to obtain disaster recovery switching configuration information corresponding to the disaster recovery switching task from the configuration information database, switch disaster recovery files in the disaster recovery switching task based on the disaster recovery switching configuration information, and restart a process according to the disaster recovery files after switching;
And the process restarting module 104 is configured to determine that the disaster recovery switching of the system is successful if the process is restarted successfully, and if the process is restarted successfully, perform the disaster recovery switching on the backup disaster recovery file to obtain a switched disaster recovery file, and restart the process until the process is restarted successfully.
In detail, the specific embodiments of each module of the disaster recovery switching device 100 are as follows:
Step one, acquiring application related information, carrying out rule configuration based on the application related information to obtain application configuration rules, and storing the application configuration rules into a preset configuration information database.
In the embodiment of the invention, the application related information refers to information such as the type of the configuration file, the file path and the like of the deployment application. The application configuration rule obtained by rule configuration is a coping mode which is prepared in advance according to a specific deployment mode of the system, and the application configuration rule is convenient for rapidly realizing the switching of the system under an emergency condition.
Specifically, the rule configuration based on the application related information to obtain an application configuration rule includes:
identifying an information format of the application related information, and judging whether the information format is consistent with a preset format or not;
If the information format is consistent with the preset format, the application related information is used as standard application information;
if the information format is inconsistent with the preset format, converting the information format into information in the preset format by using a format converter, and taking the converted information as standard application information;
deploying the standard application information to obtain a plurality of deployment rules;
and summarizing the deployment rules and recording the deployment rules into a preset default configuration file to obtain the application configuration rule.
In detail, the preset format may be json, xml or ini file format, and it is determined whether the information format of the application related information is a preset file format, if the information format is the preset file format, the application related information is used as standard application information, and if the information format is not the preset file format, the format converter is used to convert the information format into the preset file format and use the converted information as standard application information.
Further, the deploying the standard application information to obtain a plurality of deployment rules includes:
acquiring a preset disaster recovery condition and a corresponding coping mode of the disaster recovery condition;
and comparing the standard application information with the disaster recovery situations, and taking a corresponding coping mode of the disaster recovery situations with consistent comparison as a deployment rule of the standard application information.
In detail, the disaster recovery situation is a situation of encountering a disaster recovery scene frequently occurring in an application system, and the coping mode is a general mode for processing the disaster recovery situation.
And step two, when a trigger instruction of a system disaster backup switching task is received, carrying out file backup on a switching file corresponding to the disaster backup switching task to obtain a backup disaster backup file.
In the embodiment of the invention, the trigger instruction of the disaster recovery switching task of the system refers to a request sent when disaster recovery switching is needed, and when the trigger instruction is received, the switching file corresponding to the disaster recovery switching task needs to be backed up first, so that a data basis is provided when subsequent misoperation or operation error occurs.
Specifically, the performing file backup on the switching file corresponding to the disaster recovery switching task to obtain a backup disaster recovery file includes:
Performing file encapsulation processing on the switching file to obtain a backup data packet and storing the backup data packet in a preset file backup source end;
Receiving a backup data packet sent by a file backup source terminal, and analyzing the backup data packet by using a preset file transmission protocol to obtain at least one backup file;
Acquiring file information of each backup file, and matching the file information with a preset backup strategy to obtain a matching result;
and storing the backup file to a storage position in the backup strategy according to the matching result to obtain the backup disaster recovery file.
In detail, the backup files received by the file backup terminal can be classified and stored in the preset storage position by setting the backup strategy, so that the automatic classification of the backup files can be realized, the backup files can be better processed, and the convenience in managing the backup files is improved. The backup strategy comprises a plurality of backup path matching strategies, the file information at least comprises one of backup paths, file owner IDs, file types, file capacities and file authorities, and the backup path matching strategies correspond to the data in the file information one by one.
Further, the file encapsulation processing is performed on the switching file to obtain a backup data packet, including:
Performing segmentation processing on the switching file based on a preset standard size to obtain a plurality of segmentation subfiles;
And acquiring file descriptions corresponding to the plurality of segmentation subfiles, carrying out one-to-one correspondence on the plurality of segmentation subfiles and the corresponding file descriptions, and summarizing the segmentation subfiles and the file descriptions after one-to-one correspondence to obtain a backup data packet.
The preset standard size can be set according to the specific size of the switching file. The file description corresponding to the molecular file refers to a sentence for briefly explaining the file.
In another embodiment of the present invention, the performing a file backup on the switching file corresponding to the disaster recovery backup switching task to obtain a backup disaster recovery backup file includes:
Acquiring automatic backup time and a file list of automatically backed-up switching files;
matching the automatic backup time with the current time to obtain matching processing information;
And carrying out backup processing on the backup files in the file list according to the matching processing information to obtain backup disaster recovery files.
In detail, by setting the automatic backup time, the file backup source terminal can automatically backup according to the preset automatic backup time, and the convenience of backup processing of the file backup is improved.
Step three, disaster recovery switching configuration information corresponding to the disaster recovery switching task is obtained from the configuration information database, disaster recovery files in the disaster recovery switching task are switched based on the disaster recovery switching configuration information, and the process is restarted according to the switched disaster recovery files.
In the embodiment of the invention, a plurality of application configuration rules are stored in the configuration information base, and the prestored application configuration rules are beneficial to improving the efficiency of subsequent disaster recovery switching. And acquiring disaster backup switching configuration information corresponding to the disaster backup switching task from the configuration information database, wherein the disaster backup switching configuration information can be used for direct switching.
Specifically, the switching the disaster recovery file in the disaster recovery switching task based on the disaster recovery switching configuration information includes:
identifying a file path and corresponding configuration information of the disaster recovery file;
and searching information based on the file path, and replacing the configuration information by utilizing the disaster recovery backup switching configuration information to obtain a switched disaster recovery backup file.
In detail, the process of the switched disaster recovery file can be restarted, and whether the switching is successful or not is judged.
Further, before restarting the process according to the switched disaster recovery file, the method further comprises the following steps:
And checking whether the port of the process is successfully opened or not by using a preset detection code.
The preset detection code may be a netstat-lnp |grep port name, which is used to check which process the port is occupied by, so as to check whether the port is successfully opened.
Specifically, the process is restarted according to the switched disaster recovery file, and two possible situations of successful process restarting and failed process restarting can occur.
And step four, if the process is restarted successfully, judging that the disaster recovery switching of the system is successful, if the process is restarted successfully, performing disaster recovery switching on the backup disaster recovery file, and restarting the process until the process is restarted successfully, wherein the backup disaster recovery file is obtained.
In the embodiment of the invention, when the process is restarted successfully, the system disaster recovery switching is successful, when the process is restarted successfully, the system disaster recovery switching is failed, at the moment, the backup disaster recovery file is required to be switched instead of the switched disaster recovery file, the switched disaster recovery file is modified, the disaster recovery switching is not accurate enough, the backup disaster recovery file obtained after the file backup before can be used as a modification basis, the disaster recovery switching is carried out on the backup disaster recovery file, the switched disaster recovery file is restarted until the process is restarted successfully.
If the corresponding process cannot be restarted or the port cannot be started, operation and maintenance are needed to be intervened again, and an emergency scheme is achieved to recover the system.
According to the embodiment of the invention, the rule configuration is carried out based on the application related information, so that the application configuration rule is obtained and stored in the configuration information database, and the preset rule configuration can be used as a subsequent data basis, so that the disaster recovery switching efficiency is improved. When a trigger instruction of a disaster recovery switching task of a system is received, carrying out file backup on a switching file corresponding to the disaster recovery switching task to obtain a backup disaster recovery file, wherein the file backup can be used as original data after disaster recovery switching failure to carry out next disaster recovery switching. And switching the disaster recovery files in the disaster recovery switching task based on the disaster recovery switching configuration information corresponding to the disaster recovery switching task obtained from the configuration information database, and restarting the process according to the switched disaster recovery files. The efficiency of disaster recovery switching of the system can be improved. Therefore, the system disaster recovery switching device provided by the invention can solve the problem that the efficiency of system disaster recovery switching is not high enough.
Fig. 3 is a schematic structural diagram of an electronic device for implementing a system disaster recovery switching method according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as a system disaster recovery switching program, stored in the memory 11 and executable on the processor 10.
The processor 10 may be formed by an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed by a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing programs or modules (e.g., executing a system disaster recovery switching program, etc.) stored in the memory 11, and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used to store not only application software installed in an electronic device and various data, such as codes of a system disaster recovery switching program, but also temporarily store data that has been output or is to be output.
The communication bus 12 may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
The communication interface 13 is used for communication between the electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), or alternatively a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
Fig. 3 shows only an electronic device with components, it being understood by a person skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The system disaster recovery switching program stored in the memory 11 of the electronic device 1 is a combination of a plurality of instructions, and when running in the processor 10, it can be implemented:
Acquiring application related information, carrying out rule configuration based on the application related information to obtain an application configuration rule, and storing the application configuration rule into a preset configuration information database;
When a trigger instruction of a disaster backup switching task of a system is received, carrying out file backup on a switching file corresponding to the disaster backup switching task to obtain a backup disaster backup file;
Obtaining disaster backup switching configuration information corresponding to the disaster backup switching task from the configuration information database, switching disaster backup files in the disaster backup switching task based on the disaster backup switching configuration information, and restarting a process according to the switched disaster backup files;
if the process is successfully restarted, judging that the disaster recovery switching of the system is successful, if the process is failed to restart, performing disaster recovery switching on the backup disaster recovery file to obtain a switched disaster recovery file, and restarting the process until the process is successfully restarted.
In particular, the specific implementation method of the above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of the drawings, which is not repeated herein.
Further, the modules/units integrated in the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. The computer readable storage medium may be volatile or nonvolatile. For example, the computer readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present invention also provides a computer readable storage medium storing a computer program which, when executed by a processor of an electronic device, can implement:
Acquiring application related information, carrying out rule configuration based on the application related information to obtain an application configuration rule, and storing the application configuration rule into a preset configuration information database;
When a trigger instruction of a disaster backup switching task of a system is received, carrying out file backup on a switching file corresponding to the disaster backup switching task to obtain a backup disaster backup file;
Obtaining disaster backup switching configuration information corresponding to the disaster backup switching task from the configuration information database, switching disaster backup files in the disaster backup switching task based on the disaster backup switching configuration information, and restarting a process according to the switched disaster backup files;
if the process is successfully restarted, judging that the disaster recovery switching of the system is successful, if the process is failed to restart, performing disaster recovery switching on the backup disaster recovery file to obtain a switched disaster recovery file, and restarting the process until the process is successfully restarted.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The blockchain (Blockchain), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains information from a batch of network transactions for verifying the validity (anti-counterfeit) of its information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Wherein artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) is the theory, method, technique, and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend, and expand human intelligence, sense the environment, acquire knowledge, and use knowledge to obtain optimal results.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (7)

1. The system disaster recovery switching method is characterized by comprising the following steps:
Acquiring application related information, carrying out rule configuration based on the application related information to obtain an application configuration rule, and storing the application configuration rule into a preset configuration information database;
When a trigger instruction of a disaster backup switching task of a system is received, carrying out file backup on a switching file corresponding to the disaster backup switching task to obtain a backup disaster backup file;
Obtaining disaster backup switching configuration information corresponding to the disaster backup switching task from the configuration information database, switching disaster backup files in the disaster backup switching task based on the disaster backup switching configuration information, and restarting a process according to the switched disaster backup files;
if the process is restarted successfully, judging that the disaster recovery switching of the system is successful, if the process is restarted successfully, performing disaster recovery switching on the backup disaster recovery file to obtain a switched disaster recovery file, and restarting the process until the process is restarted successfully;
The method comprises the steps of carrying out rule configuration based on application related information to obtain application configuration rules, identifying information formats of the application related information, judging whether the information formats are consistent with preset formats or not, taking the application related information as standard application information if the information formats are consistent with the preset formats, converting the information formats into information of the preset formats by using a format converter and taking the converted information as standard application information if the information formats are inconsistent with the preset formats, deploying the standard application information to obtain a plurality of deployment rules, and summarizing and recording the deployment rules into a preset default configuration file to obtain the application configuration rules;
The standard application information is compared with the disaster recovery situation, and the corresponding coping mode of the disaster recovery situation which is consistent in comparison is used as the deployment rule of the standard application information;
The disaster recovery file switching method based on the disaster recovery switching configuration information switches disaster recovery files in the disaster recovery switching tasks, and comprises the steps of identifying file paths and corresponding configuration information of the disaster recovery files, searching information based on the file paths, and replacing the configuration information by utilizing the disaster recovery switching configuration information to obtain the switched disaster recovery files.
2. The system disaster recovery switching method according to claim 1, wherein the performing file backup on the switching file corresponding to the disaster recovery switching task to obtain a backup disaster recovery file includes:
Performing file encapsulation processing on the switching file to obtain a backup data packet and storing the backup data packet in a preset file backup source end;
Receiving a backup data packet sent by a file backup source terminal, and analyzing the backup data packet by using a preset file transmission protocol to obtain at least one backup file;
Acquiring file information of each backup file, and matching the file information with a preset backup strategy to obtain a matching result;
and storing the backup file to a storage position in the backup strategy according to the matching result to obtain the backup disaster recovery file.
3. The system disaster recovery switching method according to claim 2, wherein said performing file encapsulation processing on said switching file to obtain a backup data packet includes:
Performing segmentation processing on the switching file based on a preset standard size to obtain a plurality of segmentation subfiles;
And acquiring file descriptions corresponding to the plurality of segmentation subfiles, carrying out one-to-one correspondence on the plurality of segmentation subfiles and the corresponding file descriptions, and summarizing the segmentation subfiles and the file descriptions after one-to-one correspondence to obtain a backup data packet.
4. The system disaster recovery switching method according to any one of claims 1 to 3, wherein before the process is restarted according to the switched disaster recovery file, the method further comprises:
And checking whether the port of the process is successfully opened or not by using a preset detection code.
5. A system disaster recovery switching device for implementing the system disaster recovery switching method according to any one of claims 1 to 4, wherein the device includes:
The rule configuration module is used for acquiring application related information, carrying out rule configuration based on the application related information to acquire an application configuration rule, and storing the application configuration rule into a preset configuration information database;
the file backup module is used for carrying out file backup on the switching files corresponding to the disaster backup switching tasks when receiving the triggering instruction of the disaster backup switching tasks of the system to obtain backup disaster backup files;
The file switching module is used for acquiring disaster backup switching configuration information corresponding to the disaster backup switching task from the configuration information database, switching disaster backup files in the disaster backup switching task based on the disaster backup switching configuration information, and restarting the process according to the switched disaster backup files;
And the process restarting module is used for judging that the disaster recovery switching of the system is successful if the process restarting is successful, and if the process restarting is failed, performing disaster recovery switching on the backup disaster recovery file to obtain a switched disaster recovery file, and restarting the process until the process restarting is successful.
6. An electronic device, the electronic device comprising:
at least one processor, and
A memory communicatively coupled to the at least one processor, wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the system disaster recovery switching method of any one of claims 1 to 4.
7. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the system disaster recovery switching method according to any one of claims 1 to 4.
CN202111533327.1A 2021-12-15 2021-12-15 System disaster recovery switching method, device, equipment and storage medium Active CN114237982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111533327.1A CN114237982B (en) 2021-12-15 2021-12-15 System disaster recovery switching method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111533327.1A CN114237982B (en) 2021-12-15 2021-12-15 System disaster recovery switching method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114237982A CN114237982A (en) 2022-03-25
CN114237982B true CN114237982B (en) 2024-12-10

Family

ID=80756235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111533327.1A Active CN114237982B (en) 2021-12-15 2021-12-15 System disaster recovery switching method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114237982B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115277376B (en) * 2022-09-29 2022-12-23 深圳华锐分布式技术股份有限公司 Disaster recovery switching method, device, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628705A (en) * 2018-04-10 2018-10-09 京信通信系统(中国)有限公司 Database restoring method, device, computer equipment and storage medium
CN111966530A (en) * 2020-07-21 2020-11-20 招联消费金融有限公司 Disaster recovery switching method and device for application system, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130066838A1 (en) * 2011-09-12 2013-03-14 Microsoft Corporation Efficient data recovery
CN105653401B (en) * 2015-12-28 2018-12-21 中国民生银行股份有限公司 Application system calamity is standby, O&M, monitoring and emergency start and stop dispatching method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628705A (en) * 2018-04-10 2018-10-09 京信通信系统(中国)有限公司 Database restoring method, device, computer equipment and storage medium
CN111966530A (en) * 2020-07-21 2020-11-20 招联消费金融有限公司 Disaster recovery switching method and device for application system, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114237982A (en) 2022-03-25

Similar Documents

Publication Publication Date Title
CN111625252A (en) Cluster upgrading maintenance method and device, electronic equipment and storage medium
CN112579098B (en) Software release method and device, electronic equipment and readable storage medium
CN114816820A (en) Method, device, equipment and storage medium for repairing chproxy cluster fault
CN113051171B (en) Interface testing method, device, equipment and storage medium
CN113542387B (en) System release method and device, electronic equipment and storage medium
CN114237982B (en) System disaster recovery switching method, device, equipment and storage medium
CN112667244B (en) Data verification method, device, electronic equipment and computer readable storage medium
CN114371962B (en) Data collection method, device, electronic device and storage medium
CN114185502B (en) Log printing method, device, equipment and medium based on production line environment
CN113704000B (en) Service access optimization method, device, equipment and medium
CN116820988A (en) High availability test method, device, equipment and medium for distributed middleware system
CN115687384A (en) UUID (user identifier) identification generation method, device, equipment and storage medium
CN112527655B (en) Software version quality abnormality detection method and device, electronic equipment and storage medium
CN112686759B (en) Account reconciliation monitoring method, device, equipment and medium
CN114547011A (en) Data extraction method and device, electronic equipment and storage medium
CN114185588A (en) Incremental package generation method, device, equipment and storage medium
CN113434359B (en) Data traceability system construction method and device, electronic device and readable storage medium
CN115002100B (en) File transmission method and device, electronic equipment and storage medium
CN114595106B (en) Service control equipment debugging method and device
CN118677943B (en) Method, device, equipment and medium for controlling forwarding of abnormal messages of distributed system
CN113657076B (en) Page operation record table generation method and device, electronic equipment and storage medium
CN113885874B (en) Java class file conflict management method and device, electronic equipment and medium
CN117632420A (en) Timing checking method and device based on state driving, electronic equipment and storage medium
CN114489915B (en) Mobile equipment-based open screen picture display method, device, equipment and medium
CN116204358A (en) Computer plug-in fault detection processing method, device, equipment and storage medium

Legal Events

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