CN111130843A - Configuration recovery method and device for server - Google Patents

Configuration recovery method and device for server Download PDF

Info

Publication number
CN111130843A
CN111130843A CN201911156596.3A CN201911156596A CN111130843A CN 111130843 A CN111130843 A CN 111130843A CN 201911156596 A CN201911156596 A CN 201911156596A CN 111130843 A CN111130843 A CN 111130843A
Authority
CN
China
Prior art keywords
configuration information
target server
server
target
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
CN201911156596.3A
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.)
China United Network Communications Group Co Ltd
Unicompay Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicompay 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 China United Network Communications Group Co Ltd, Unicompay Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201911156596.3A priority Critical patent/CN111130843A/en
Publication of CN111130843A publication Critical patent/CN111130843A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0859Retrieval of network configuration; Tracking network configuration history by keeping history of different configuration generations or by rolling back to previous configuration versions
    • H04L41/0863Retrieval of network configuration; Tracking network configuration history by keeping history of different configuration generations or by rolling back to previous configuration versions by rolling back to previous configuration versions
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for recovering configuration of a server, wherein the method comprises the following steps: sending a recovery instruction to the management server, wherein the recovery instruction comprises an identifier of a target server; receiving configuration information of a target server sent by a management server; and restoring the configuration of the target server according to the configuration information of the target server. By the method, when the target server is down or migrated, the recovery instruction can be sent to the management server, so that the configuration information of the target server can be rebuilt in batch based on the configuration information sent by the management server, the reconstruction time of the configuration information is reduced, and the error rate in the reconstruction process of the configuration information is reduced.

Description

Configuration recovery method and device for server
Technical Field
The present invention relates to the field of information technologies, and in particular, to a configuration recovery method and apparatus for a server.
Background
The server provides a specific service to the user through the network, however, when the server is down, the server must be immediately rebooted (reboot), and the previous configuration is recovered, so that the server which is down recovers the normal operation state. When a server is migrated, the migrated server needs to be restored to the previous configuration.
In the prior art, after a server is down or migrated, the configuration of the server needs to be restored by manually rebuilding or importing the backed-up server data. However, for configuration information that needs to be rebuilt in batches, the time taken to rebuild the configuration information is long and the error rate is high.
Disclosure of Invention
The embodiment of the invention provides a configuration recovery method and device for a server, and aims to solve the problems that in the prior art, manual reconstruction of configuration information needing to be reconstructed in batches takes longer time and has higher error rate.
The first aspect of the present invention provides a configuration recovery method for a server, including: sending a recovery instruction to a management server, wherein the recovery instruction is used for indicating the management server to send configuration information of a target server to the target server, and the recovery instruction comprises an identifier of the target server;
receiving configuration information of the target server sent by the management server;
and recovering the configuration of the target server according to the configuration information of the target server.
In an alternative embodiment, the configuration information of the target server includes configuration information of a target service and configuration information of a job, and the job runs under the target service.
In an optional implementation manner, before the sending the recovery instruction to the management server, the method further includes:
scanning a configuration file of a target service and a configuration file of a job of the target server to acquire configuration information of the target service and configuration information of the job;
and sending the configuration information of the target service and the configuration information of the job to the management server.
A second aspect of the present invention provides a configuration recovery method for a server, including:
receiving a recovery instruction sent by a target server, wherein the recovery instruction is used for indicating the management server to send configuration information of the target server to the target server, and the recovery instruction comprises an identifier of the target server;
and sending the configuration information of the target server to the target server according to the identification of the target server.
In an alternative embodiment, the configuration information of the target server includes configuration information of a target service and configuration information of a job, and the job runs under the target service.
In an optional implementation manner, before the receiving the recovery instruction sent by the target server, the method further includes:
receiving configuration information of the target service and configuration information of the job sent by the target server;
and saving the configuration information of the target service and the configuration information of the job in a configuration file format.
In an optional embodiment, the recovery instruction further includes a user name and a password of the target server;
before the sending the configuration information of the target server to the target server, the method further includes:
and verifying the authority of the target server according to the user name and the password of the target server.
In an optional embodiment, the recovery instruction further includes an address of the target server;
the sending the configuration information of the target server to the target server according to the identifier of the target server includes:
determining the configuration information of the target server according to the identification of the target server;
determining a relative storage address of the configuration information of the target server according to the address of the target server;
and sending the configuration information of the target server to the target server through a secure shell SSH protocol according to the relative storage address of the configuration information.
A third aspect of the present invention provides a configuration recovery apparatus for a server, including:
a first sending module, configured to send a recovery instruction to a management server, where the recovery instruction is used to instruct the management server to send configuration information of a target server to the target server, and the recovery instruction includes an identifier of the target server;
the receiving module is used for receiving the configuration information of the target server sent by the management server;
and the configuration module is used for recovering the configuration of the target server according to the configuration information of the target server.
In an alternative embodiment, the configuration information of the target server includes configuration information of a target service and configuration information of a job, and the job runs under the target service.
In an alternative embodiment, the apparatus further comprises:
the acquisition module is used for scanning a configuration file of a target service and a configuration file of a job of the target server and acquiring configuration information of the target service and configuration information of the job;
and the second sending module is used for sending the configuration information of the target service and the configuration information of the job to the management server.
A fourth aspect of the present invention provides a configuration recovery apparatus for a server, including:
a first receiving module, configured to receive a recovery instruction sent by a target server, where the recovery instruction is used to instruct the management server to send configuration information of the target server to the target server, and the recovery instruction includes an identifier of the target server;
and the sending module is used for sending the configuration information of the target server to the target server according to the identification of the target server.
In an alternative embodiment, the configuration information of the target server includes configuration information of a target service and configuration information of a job, and the job runs under the target service.
In an alternative embodiment, the apparatus further comprises:
the second receiving module is used for receiving the configuration information of the target service and the configuration information of the job sent by the target server;
and the saving module is used for saving the configuration information of the target service and the configuration information of the job in a configuration file format.
In an optional embodiment, the recovery instruction further includes a user name and a password of the target server;
the device, still include: and the verification module is used for verifying the authority of the target server according to the user name and the password of the target server.
In an optional embodiment, the recovery instruction further includes an address of the target server;
the sending module is specifically configured to determine configuration information of the target server according to the identifier of the target server; determining a relative storage address of the configuration information of the target server according to the address of the target server; and sending the configuration information of the target server to the target server through a secure shell SSH protocol according to the relative storage address of the configuration information.
A fifth aspect of the present invention provides a target server comprising: a memory and a processor;
the memory for storing executable instructions of the processor;
the processor is configured to perform the method referred to in the first aspect and alternatives thereof via execution of the executable instructions.
A sixth aspect of the present invention provides a management server comprising: a memory and a processor;
the memory for storing executable instructions of the processor;
the processor is configured to perform the method according to the second aspect and its alternatives via execution of the executable instructions.
A seventh aspect of the present invention provides a storage medium having stored thereon a computer program for executing the method of the first aspect.
An eighth aspect of the present invention provides a storage medium having stored thereon a computer program for executing the method of the first aspect.
According to the configuration recovery method and device for the server, the target server sends a recovery instruction to the management server, and the recovery instruction comprises the identifier of the target server; subsequently, the target server receives configuration information of the target server sent by the management server; and restoring the configuration of the target server according to the configuration information of the target server. By the method, when the target server is down or migrated, the recovery instruction can be sent to the management server, so that the configuration information of the target server can be rebuilt in batch based on the configuration information sent by the management server, the reconstruction time of the configuration information is reduced, and the error rate in the reconstruction process of the configuration information is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the following briefly introduces the drawings needed to be used in the description of the embodiments or the prior art, and obviously, the drawings in the following description are some embodiments of the present invention, and those skilled in the art can obtain other drawings according to the drawings without inventive labor.
Fig. 1 is a schematic view of a scenario of a configuration recovery method for a server according to an embodiment of the present invention;
fig. 2 is a schematic view of a scenario of another configuration recovery method for a server according to an embodiment of the present application;
fig. 3 is a signaling interaction diagram of a configuration recovery method for a server according to an embodiment of the present application;
fig. 4 is a signaling interaction diagram of another configuration recovery method for a server according to an embodiment of the present application;
fig. 5 is a signaling interaction diagram of another configuration recovery method for a server according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a configuration recovery apparatus of a server according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another configuration recovery apparatus for a server according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description of the invention and the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein.
It should be understood that, in various embodiments of the present invention, the sequence numbers of the processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the internal logic of the processes, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
The server provides a specific service to the user through the network, however, when the server is down, the server must be immediately rebooted (reboot), and the previous configuration is recovered, so that the server which is down recovers the normal operation state. When a server is migrated, the migrated server needs to be restored to the previous configuration.
In the prior art, after a server is down or migrated, the configuration of the server needs to be restored by manually rebuilding or importing the backed-up server data. However, for configuration information that needs to be rebuilt in batches, the time taken to rebuild the configuration information is long and the error rate is high.
In order to solve the above problems, the present application provides a method and an apparatus for recovering configuration of a server, so as to reduce reconstruction time of configuration information and reduce an error rate in a reconstruction process of the configuration information.
Fig. 1 is a scene schematic diagram of a configuration recovery method for a server according to an embodiment of the present invention. As shown in fig. 1, the system includes a management server 101 and a target server 102. When the target server 102 goes down or migrates, the target server 102 may generate a recovery instruction to the management server 101 to cause the management server 101 to send the pre-stored configuration information of the target server 102 to the target server so that the target server 102 may recover the configuration.
The number of the target servers 102 may be one or multiple, the type of the target server is not limited in the embodiment of the present application, and the target server may be a Jenkins server as an example.
In an optional implementation manner, the target server 102 may further be deployed with an Agent monitoring module, and the Agent monitoring module may be disposed inside the target server 102 or may be externally connected to the target server 102. Fig. 2 is a schematic view of another scenario of a configuration recovery method for a server according to an embodiment of the present application. As shown in fig. 2, when uploading the configuration information, the Agent monitoring module scans the configuration file of the target service and the configuration file of the job of the target server 102 in real time, obtains the configuration information of the target server 102, and sends the configuration information to the management server 101. When restoring the configuration information, the management server 101 transmits the configuration information corresponding to the target server 102.
The management server 101 is a configuration management platform, in which a database may be provided, and the latest configuration information of at least one target server 102 is updated in real time in the database.
The following takes an object server and a management server integrated or installed with relevant execution codes as an example, and a detailed description is given to a technical solution of the embodiment of the present application with a specific embodiment. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 3 is a signaling interaction diagram of a configuration recovery method for a server according to an embodiment of the present application. The present embodiment relates to a process of how the target server restores the configuration. As shown in fig. 3, the method includes:
step S201, the target server sends a recovery instruction to the management server, where the recovery instruction is used to instruct the management server to send configuration information of the target server to the target server, and the recovery instruction includes an identifier of the target server.
In this step, when the target server needs to restore the configuration, a restoration instruction may be sent to the management server to instruct the management server to send the configuration information to the target server, so that the target server restores the configuration according to the configuration information.
The embodiment of the application is not limited to when the target server sends the recovery instruction to the management server, and the recovery instruction can be automatically triggered by the target server or manually triggered by a user. For example, if the target server is detected to be down, the target server may automatically trigger sending the recovery instruction to the management server. For example, if the user needs to migrate the target server, the migrated target server may trigger sending of a recovery instruction to the management server after receiving an instruction input by the user.
Step S202, the management server sends the configuration information of the target server to the target server according to the identification of the target server.
In this step, after the management server receives the recovery instruction sent by the target server, the management server may find the configuration information corresponding to the identifier of the target server based on the identifier of the target server in the recovery instruction, and send the configuration information to the target server.
In some embodiments, the management server may store configuration information of the target server in advance, and the target server may obtain the configuration information in real time through the deployed Agent monitoring module during normal operation and transmit the configuration information to the management server. The configuration information of the target server can be stored in a database of the management server in advance, a mapping relation is established between each configuration information in the database and the corresponding identifier of the target server, and after the management server receives a recovery instruction with the identifier of the target server, the configuration information corresponding to the target server can be quickly found according to the identifier of the target server.
In an alternative embodiment, the configuration information of the target server includes configuration information of the target service and configuration information of a job, and the job runs under the target service. The management server may send the configuration information of the target service and the configuration information of the job to the target server at the same time, or the management server may send the configuration information of the target service to the target server first, and after the target server recovers the configuration of the target service, the management server sends the configuration information of the job to the target server again, so that the target server further recovers the configuration of the job of the target server. The configuration of the target service can also be understood as the system configuration of the target server.
And step S203, the target server restores the configuration of the target server according to the configuration information of the target server.
In this step, after the target server receives the configuration information of the target server sent by the management server, the configuration of the target server may be restored according to the configuration information of the target server.
In some embodiments, the target server may restore the configuration of the target service of the target server before restoring the configuration of the job of the target server.
In some embodiments, due to the fact that the job configuration updating speed is high, when the target server restores the job configuration of the target server according to the configuration information of the target server, a configuration updating instruction of a user can be received, and the configuration information of the job is updated according to the updating information in the configuration updating instruction.
According to the configuration recovery method for the server, the target server sends a recovery instruction to the management server, and the recovery instruction comprises the identification of the target server; subsequently, the target server receives configuration information of the target server sent by the management server; and restoring the configuration of the target server according to the configuration information of the target server. By the method, when the target server is down or migrated, the recovery instruction can be sent to the management server, so that the configuration information of the target server can be rebuilt in batch based on the configuration information sent by the management server, the reconstruction time of the configuration information is reduced, and the error rate in the reconstruction process of the configuration information is reduced.
On the basis of the above-described embodiment, the target server needs to transmit the configuration information of the target service and the configuration information of the job to the management server in real time. How the target server transmits the configuration information of the target service and the configuration information of the job to the management server is explained below in a specific embodiment. Fig. 4 is a signaling interaction diagram of another configuration recovery method for a server according to an embodiment of the present application. As shown in fig. 4, the method includes:
step S301, the target server scans the configuration file of the target service and the configuration file of the job of the target server, and obtains the configuration information of the target service and the configuration information of the job.
In this step, the target server may periodically scan the configuration file of the target service and the configuration file of the job, thereby acquiring the configuration information of the target service and the configuration information of the job.
The scanning frequency is not limited in the embodiment of the present application, and for example, the scanning frequency may be once every minute. In some embodiments, the scan frequency of the configuration information of the target service and the configuration information of the job may be the same.
In other embodiments, the scan frequency of the configuration information for the target service and the configuration information for the job may be different because the configuration information for the job tends to change faster than the configuration information for the target service. For example, the profile of the target service may be scanned every minute and the profile of the job may be scanned every ten seconds.
In some optional embodiments, the configuration file of the target service may include: user information files, rights files, plug-ins, global tool configuration files, system configuration files, node configuration files, and the like.
The present application does not limit how to scan the configuration file of the target server, and in some embodiments, an Agent monitoring module may be used. The Agent monitoring module can be arranged in the target server or externally connected with the target server, and is used for scanning the configuration file of the target server at regular time and registering or updating the configuration information to the configuration management platform.
Step S302, the target server sends the configuration information of the target service and the configuration information of the job to the management server.
In step S303, the management server saves the configuration information of the target service and the configuration information of the job in the format of a configuration file.
In this step, the management server is provided with a database for storing the configuration information of the target server, and the management server receives the configuration information sent by the target server and stores the configuration information in the database according to the format of the configuration file.
The format of the configuration file may include yaml, json, ini, and the like, and the management server may select the format used by the configuration file in the target server to store the configuration information.
In the embodiment of the application, the configuration information is stored according to the format of the configuration file, and the format of the subsequent target server does not need to be changed when the target server receives the corresponding configuration information, so that the subsequent target server can be directly used, the reconstruction time of the configuration information is shortened, and the error rate in the reconstruction process of the configuration information is reduced.
Step S304, the target server sends a recovery instruction to the management server, and the recovery instruction comprises the identification of the target server.
Step S305, the management server sends the configuration information of the target server to the target server according to the identification of the target server.
And S306, the target server restores the configuration of the target server according to the configuration information of the target server.
The technical terms, technical effects, technical features, and alternative embodiments of steps S304-S306 can be understood with reference to steps S201-S203 shown in fig. 3, and repeated content will not be described herein.
According to the server configuration recovery method provided by the embodiment of the application, the target server scans the configuration file of the target service and the configuration file of the job of the target server to acquire the configuration information of the target service and the configuration information of the job of the target server. Subsequently, the target server transmits the configuration information of the target service and the configuration information of the job to the management server. The management server saves the configuration information of the target service and the configuration information of the job in a configuration file format. By the method, the management server can store the configuration information of the target service and the configuration information of the job of the target server, so that the configuration information of the target service and the configuration information of the job are sent to the target server in time when the target server is down or migrated, the reconstruction time of the configuration information is shortened, and the error rate in the reconstruction process of the configuration information is reduced.
On the basis of the above embodiment, the recovery instruction sent by the target server may include not only the identifier of the target server, but also information such as the user name and password of the target server and the address of the target server. The information contained in the target server is described below with a specific example. Fig. 5 is a signaling interaction diagram of another configuration recovery method for a server according to an embodiment of the present application. As shown in fig. 5, the method includes:
step S401, the target server sends a recovery instruction to the management server, wherein the recovery instruction comprises an identifier of the target server, a user name and a password of the target server, and an address of the target server.
The technical terms, technical effects, technical features and optional embodiments of step S401 can be understood by referring to step S201 shown in fig. 3, and repeated contents will not be described herein.
And S402, the management server verifies the authority of the target server according to the user name and the password of the target server.
In this step, after the management server receives the recovery instruction sent by the target server, the user name and the password of the target server in the recovery instruction may be extracted first to verify the authority of the recovery instruction. If the verification is passed, the target server has the authority of downloading the corresponding configuration information, if the verification is not passed, the target server does not have the authority of downloading the corresponding configuration information, and the management server feeds back the failed response information to the target server.
According to the embodiment of the application, the authority of the target server is verified through the user name and the password of the target server, and the information safety is improved.
Step S403, the management server determines the configuration information of the target server according to the identifier of the target server.
In this step, the configuration information of the target server and the identifier of the target server have a mapping relationship, and after the management server receives the recovery instruction sent by the target server and verifies that the target server has the authority, the configuration information of the target server can be determined according to the identifier of the target server and the mapping relationship.
And S404, the management server determines the relative storage address of the configuration information of the target server according to the address of the target server.
In the step, the recovery instruction may further include an address of the target server, and the management server determines, according to the address of the target server, a relative storage location of the configuration information of the system of the target server.
The address of the target server may be an Internet Protocol (IP) address, and a relative storage address of the configuration information of the system of the target server is determined through conversion of the IP address.
And S405, the management server sends the configuration information of the target server to the target server through a secure shell SSH protocol according to the relative storage address of the configuration information.
Wherein, the Secure Shell (SSH) protocol is a security protocol established on the basis of an application layer. SSH is a protocol specific to providing security for telnet sessions and other web services. The SSH protocol can effectively prevent the problem of information leakage in the remote management process.
Based on SSH protocol, the configuration information of the target server is sent to the relative storage address of the configuration information, thereby not only reducing the reconstruction time of the configuration information and the error rate in the reconstruction process of the configuration information, but also improving the information security.
And step S406, the target server restores the configuration of the target server according to the configuration information of the target server.
The technical terms, technical effects, technical features and optional embodiments of step S406 can be understood by referring to step S201 shown in fig. 3, and repeated contents will not be described herein.
According to the configuration recovery method of the server, the management server verifies the authority of the target server according to the user name and the password of the target server, and sends the configuration information of the target server to the target server through the SSH protocol of the security shell according to the relative storage address of the configuration information of the system. Therefore, the target server can acquire the configuration information of the target service and the configuration information of the job corresponding to the authority, and meanwhile, the configuration file can be directly sent to the relative storage address, so that the reconstruction time of the configuration information is reduced, and the information safety is enhanced.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Fig. 6 is a schematic structural diagram of a configuration recovery apparatus of a server according to an embodiment of the present application. The configuration recovery apparatus of the server may be implemented by software, hardware, or a combination of both to execute the configuration recovery method of the server on the target server side. As shown in fig. 6, the configuration restoration apparatus of the server includes:
a first sending module 501, configured to send a recovery instruction to the management server, where the recovery instruction includes an identifier of a target server;
a receiving module 502, configured to receive configuration information of a target server sent by a management server;
a configuration module 503, configured to recover the configuration of the target server according to the configuration information of the target server.
In an alternative embodiment, the configuration information of the target server includes configuration information of the target service and configuration information of a job, and the job runs under the target service.
In an optional implementation manner, the configuration recovery apparatus of the server further includes:
an obtaining module 504, configured to scan a configuration file of a target service and a configuration file of a job of a target server, and obtain configuration information of the target service and configuration information of the job;
a second sending module 505, configured to send the configuration information of the target service and the configuration information of the job to the management server.
The configuration recovery device for the server provided in the embodiment of the present application may perform the actions of the target server in the foregoing method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 7 is a schematic structural diagram of another configuration recovery apparatus for a server according to an embodiment of the present application. The configuration recovery apparatus of the server may be implemented by software, hardware, or a combination of both to execute the configuration recovery method of the server on the management server side described above. As shown in fig. 7, the configuration restoration apparatus of the server includes:
a first receiving module 601, configured to receive a recovery instruction sent by a target server, where the recovery instruction includes an identifier of the target server;
a sending module 602, configured to send configuration information of the target server to the target server according to the identifier of the target server.
In an alternative embodiment, the configuration information of the target server includes configuration information of the target service and configuration information of a job, and the job runs under the target service.
In an alternative embodiment, the apparatus further comprises:
a second receiving module 603, configured to receive configuration information of a target service and configuration information of a job sent by a target server;
a saving module 604, configured to save the configuration information of the target service and the configuration information of the job in a configuration file format.
In an optional embodiment, the recovery instruction further includes a user name and a password of the target server;
the configuration recovery apparatus of the server further includes: and the verifying module 605 is configured to verify the authority of the target server according to the user name and the password of the target server.
In an optional embodiment, the recovery instruction further includes an address of the target server;
the sending module 602 is specifically configured to determine configuration information of the target server according to the identifier of the target server; determining a relative storage address of the configuration information of the target server according to the address of the target server; and sending the configuration information of the target server to the target server through a secure shell SSH protocol according to the relative storage address of the configuration information.
The configuration recovery device for the server provided in the embodiment of the present application may perform the actions of the management server in the foregoing method embodiments, and the implementation principle and the technical effect are similar, and are not described herein again.
Fig. 8 is a schematic structural diagram of a server according to an embodiment of the present application. As shown in fig. 8, the configuration recovery apparatus of the server may include: at least one processor 71 and a memory 72. Fig. 8 shows a server as an example of a processor.
And a memory 72 for storing programs. In particular, the program may include program code including computer operating instructions.
The memory 72 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 71 is configured to execute the computer-executable instructions stored in the memory 72 to implement the above-described configuration recovery method for the server on the target server side.
Alternatively, the processor 71 is configured to execute computer-executable instructions stored in the memory 72 to implement the above-described configuration recovery method for the server on the management server side.
The processor 71 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present Application.
Alternatively, in a specific implementation, if the communication interface, the memory 72 and the processor 71 are implemented independently, the communication interface, the memory 72 and the processor 71 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. Buses may be classified as address buses, data buses, control buses, etc., but do not represent only one bus or type of bus.
Alternatively, in a specific implementation, if the communication interface, the memory 72 and the processor 71 are integrated into a chip, the communication interface, the memory 72 and the processor 71 may complete communication through an internal interface.
The present invention also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and in particular, the computer-readable storage medium stores program instructions for the configuration recovery method of the server.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (17)

1. A method for configuration recovery of a server, comprising:
sending a recovery instruction to a management server, wherein the recovery instruction is used for indicating the management server to send configuration information of a target server to the target server, and the recovery instruction comprises an identifier of the target server;
receiving configuration information of the target server sent by the management server;
and recovering the configuration of the target server according to the configuration information of the target server.
2. The method of claim 1, wherein the configuration information of the target server comprises configuration information of a target service and configuration information of a job, the job running under the target service.
3. The method of claim 2, further comprising, prior to said sending a restore instruction to the management server:
scanning a configuration file of a target service and a configuration file of a job of the target server to acquire configuration information of the target service and configuration information of the job;
and sending the configuration information of the target service and the configuration information of the job to the management server.
4. A method for recovering server configuration information is characterized by comprising the following steps:
receiving a recovery instruction sent by a target server, wherein the recovery instruction is used for indicating a management server to send configuration information of the target server to the target server, and the recovery instruction comprises an identifier of the target server;
and sending the configuration information of the target server to the target server according to the identification of the target server.
5. The method of claim 4, wherein the configuration information of the target server comprises configuration information of a target service and configuration information of a job, the job running under the target service.
6. The method of claim 5, further comprising, before the receiving the recovery instruction sent by the target server:
receiving configuration information of the target service and configuration information of the job sent by the target server;
and saving the configuration information of the target service and the configuration information of the job in a configuration file format.
7. The method of claim 4, wherein the recovery instruction further comprises a username and password of the target server;
before the sending the configuration information of the target server to the target server, the method further includes:
and verifying the authority of the target server according to the user name and the password of the target server.
8. The method of claim 4, wherein the recovery instruction further comprises an address of the target server;
the sending the configuration information of the target server to the target server according to the identifier of the target server includes:
determining the configuration information of the target server according to the identification of the target server;
determining a relative storage address of the configuration information of the target server according to the address of the target server;
and sending the configuration information of the target server to the target server through a secure shell SSH protocol according to the relative storage address of the configuration information.
9. A configuration restoration apparatus for a server, comprising:
a first sending module, configured to send a recovery instruction to a management server, where the recovery instruction is used to instruct the management server to send configuration information of a target server to the target server, and the recovery instruction includes an identifier of the target server;
the receiving module is used for receiving the configuration information of the target server sent by the management server;
and the configuration module is used for recovering the configuration of the target server according to the configuration information of the target server.
10. The apparatus of claim 9, wherein the configuration information of the target server comprises configuration information of a target service and configuration information of a job, and wherein the job runs under the target service.
11. The apparatus of claim 10, further comprising:
the acquisition module is used for scanning a configuration file of a target service and a configuration file of a job of the target server and acquiring configuration information of the target service and configuration information of the job;
and the second sending module is used for sending the configuration information of the target service and the configuration information of the job to the management server.
12. An apparatus for recovering server configuration information, comprising:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a recovery instruction sent by a target server, the recovery instruction is used for indicating a management server to send configuration information of the target server to the target server, and the recovery instruction comprises an identifier of the target server;
and the sending module is used for sending the configuration information of the target server to the target server according to the identification of the target server.
13. The apparatus of claim 12, wherein the configuration information of the target server comprises configuration information of a target service and configuration information of a job, and wherein the job runs under the target service.
14. The apparatus of claim 13, further comprising:
the second receiving module is used for receiving the configuration information of the target service and the configuration information of the job sent by the target server;
and the saving module is used for saving the configuration information of the target service and the configuration information of the job in a configuration file format.
15. The apparatus of claim 12, wherein the recovery instruction further comprises a username and password of the target server;
the device, still include: and the verification module is used for verifying the authority of the target server according to the user name and the password of the target server.
16. The apparatus of claim 12, wherein the recovery instruction further comprises an address of the target server;
the sending module is specifically configured to determine configuration information of the target server according to the identifier of the target server; determining a relative storage address of the configuration information of the target server according to the address of the target server; and sending the configuration information of the target server to the target server through a secure shell SSH protocol according to the relative storage address of the configuration information.
17. A storage medium having a computer program stored thereon, comprising: the program when executed by a processor implements the method of any of claims 1-3 or 4-8.
CN201911156596.3A 2019-11-22 2019-11-22 Configuration recovery method and device for server Pending CN111130843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911156596.3A CN111130843A (en) 2019-11-22 2019-11-22 Configuration recovery method and device for server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911156596.3A CN111130843A (en) 2019-11-22 2019-11-22 Configuration recovery method and device for server

Publications (1)

Publication Number Publication Date
CN111130843A true CN111130843A (en) 2020-05-08

Family

ID=70496306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911156596.3A Pending CN111130843A (en) 2019-11-22 2019-11-22 Configuration recovery method and device for server

Country Status (1)

Country Link
CN (1) CN111130843A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106480A (en) * 2007-06-27 2008-01-16 杭州华三通信技术有限公司 Configuration backup method, system and configuration file server and managed devices
CN101945013A (en) * 2010-09-20 2011-01-12 中兴通讯股份有限公司 System and method for implementing server configuration management
CN102664758A (en) * 2012-04-28 2012-09-12 沈阳通用软件有限公司 Method for binding and automatically recovering network configuration
CN105005471A (en) * 2015-06-24 2015-10-28 北京百度网讯科技有限公司 Method, device, server and system for modifying configuration parameters of BIOS
CN105703938A (en) * 2014-11-28 2016-06-22 华为技术有限公司 Equipment configuration method, configuration device and management equipment
CN106528143A (en) * 2016-10-27 2017-03-22 杭州昆海信息技术有限公司 Configuration management method and device
CN106681865A (en) * 2017-01-16 2017-05-17 北京腾凌科技有限公司 Business recovery method and device
CN108880853A (en) * 2017-11-27 2018-11-23 北京视联动力国际信息技术有限公司 A kind of configuration information recovery method and configuration information server regarding networked server

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106480A (en) * 2007-06-27 2008-01-16 杭州华三通信技术有限公司 Configuration backup method, system and configuration file server and managed devices
CN101945013A (en) * 2010-09-20 2011-01-12 中兴通讯股份有限公司 System and method for implementing server configuration management
CN102664758A (en) * 2012-04-28 2012-09-12 沈阳通用软件有限公司 Method for binding and automatically recovering network configuration
CN105703938A (en) * 2014-11-28 2016-06-22 华为技术有限公司 Equipment configuration method, configuration device and management equipment
CN105005471A (en) * 2015-06-24 2015-10-28 北京百度网讯科技有限公司 Method, device, server and system for modifying configuration parameters of BIOS
CN106528143A (en) * 2016-10-27 2017-03-22 杭州昆海信息技术有限公司 Configuration management method and device
CN106681865A (en) * 2017-01-16 2017-05-17 北京腾凌科技有限公司 Business recovery method and device
CN108880853A (en) * 2017-11-27 2018-11-23 北京视联动力国际信息技术有限公司 A kind of configuration information recovery method and configuration information server regarding networked server

Similar Documents

Publication Publication Date Title
CN111880852B (en) Operating system initialization method, system, computer device and storage medium
CN109976822B (en) Configuration method and device of distributed application and distributed system
CN110166299B (en) SDN controller configuration recovery method and device
CN110430115B (en) Service recovery method, system, network device and computer readable storage medium
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
CN109361542B (en) Client fault processing method, device, system, terminal and server
CN109391691B (en) Method and related device for recovering NAS service under single-node fault
CN112235321B (en) Short message verification code anti-brushing method and device
CN111367753B (en) Cloud desktop screen recording method and device based on network communication engine ICE architecture
CN113438292A (en) Agent deployment method and device based on automatic operation and maintenance tool
CN113039763A (en) NF service consumer restart detection using direct signaling between NFs
CN111405006A (en) Method and device for processing remote login failure and remote login system
CN106874214B (en) Cloud hard disk resource recovery method and related device
CN106941418B (en) SSL VPN configuration information synchronization method and device
CN106911508B (en) DNS configuration recovery method and device
CN111130843A (en) Configuration recovery method and device for server
CN110555017A (en) block chain data cleaning method and device, computer equipment and storage medium
CN111857740A (en) Software upgrading method and device
CN107800754B (en) Data transmission task processing method and device, and data transmission task monitoring method and device
CN113806731A (en) Weak password repairing method and device, storage medium and terminal equipment
KR20180107843A (en) Device and method for a network restore of sunlight power station system
CN113064616A (en) Software updating method and device, storage medium and electronic equipment
CN112367386A (en) Ignite-based automatic operation and maintenance method, apparatus and computer equipment
CN115599310B (en) Method and device for controlling storage resources in storage node and storage node
CN113541971B (en) Data hosting method, device and equipment based on key replacement and heartbeat check

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508

RJ01 Rejection of invention patent application after publication