CN110990052A - Configuration saving method and device - Google Patents
Configuration saving method and device Download PDFInfo
- Publication number
- CN110990052A CN110990052A CN201911205711.1A CN201911205711A CN110990052A CN 110990052 A CN110990052 A CN 110990052A CN 201911205711 A CN201911205711 A CN 201911205711A CN 110990052 A CN110990052 A CN 110990052A
- Authority
- CN
- China
- Prior art keywords
- value
- configuration
- configuration data
- bit
- command
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/172—Caching, prefetching or hoarding of files
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a configuration saving method and device. A configuration saving method, comprising: receiving a restart command; checking the current value of each bit in the established bitmap, and outputting prompt information whether to store configuration data when the current value of at least one bit is a first value, wherein the first value is used for indicating that the configuration data corresponding to the bit is changed; and when the situation that the user selects to save the configuration data is monitored, automatically saving all the configuration data stored in the memory to the specified configuration file. By the method, whether the configuration data in the memory is stored in the configuration file or not can be effectively determined according to the selection of the user before the equipment is restarted, so that the configuration data loss caused by the fact that the user forgets to store the configuration data in the memory is avoided.
Description
Technical Field
The present application relates to the field of network technologies, and in particular, to a configuration saving method and apparatus.
Background
When configuring a network device, in order to improve configuration efficiency, configuration is often performed through a command line, and part of common configuration data is stored in a memory.
However, since the data stored in the memory is data that is easy to lose, if the device is restarted, the configuration data stored in the memory will be lost completely, so that the device cannot recover the configuration before restarting, and a significant network problem is generated.
Therefore, if the device is configured through the command line and part of the configuration data is stored in the memory, a worker is required to manually save the configuration data in the memory into the configuration file before restarting the device. This increases the workload of the worker, and sometimes the situation that the configuration data in the memory is not saved in the configuration file due to carelessness of the worker occurs, resulting in that the configuration data in the memory is completely lost after the device is restarted.
Disclosure of Invention
The application provides a configuration saving method and device, which are used for automatically saving configuration data in a memory into a configuration file before equipment is restarted.
The technical scheme provided by the application comprises the following steps:
in a first aspect, the present application provides a configuration saving method, including:
receiving a restart command;
checking the current value of each bit in the established bitmap, and outputting prompt information whether to store configuration data when the current value of at least one bit is a first value, wherein the first value is used for indicating that the configuration data corresponding to the bit is changed;
and when the situation that the user selects to save the configuration data is monitored, automatically saving all the configuration data stored in the memory to the specified configuration file.
In a second aspect, the present application provides a configuration saving apparatus, comprising:
the receiving module is used for receiving a restart command;
the output module is used for checking the current value of each bit in the established bitmap and outputting prompt information for judging whether to store configuration data or not when the current value of at least one bit is a first value, wherein the first value is used for indicating that the configuration data corresponding to the bit is changed;
and the storage module is used for automatically storing all the configuration data stored in the memory to the specified configuration file when the situation that the user selects to store the configuration data is monitored.
According to the method and the device, after a restart command is received, the change of the configuration data in the memory is determined according to the current value of each bit in the established bitmap, and when the situation that the user selects to store the configuration data is monitored, the configuration data stored in the memory is automatically stored in the configuration file. Therefore, the automatic storage of the configuration data in the memory before the equipment is restarted is realized, and the loss of the configuration data caused by the fact that a user forgets to store the configuration data in the memory is effectively avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart of a configuration save method provided herein;
FIG. 2 is a schematic diagram of a bitmap provided by an embodiment of the present application;
FIG. 3 is a flowchart of an implementation of step 103 provided by an embodiment of the present application;
fig. 4 is a flow chart of bit current value setting provided in the embodiment of the present application;
FIG. 5 is a block diagram of a configuration save set provided herein;
FIG. 6 is a block diagram of another configuration save set provided herein;
fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
When a network device is configured through a command line, part of the configuration data is usually stored in a memory. However, since the configuration data stored in the memory is completely lost after the device is restarted, the device cannot recover the configuration before the restart, and even a major network problem is caused, before the device is restarted, a worker needs to store the configuration data in the memory into a configuration file in a nonvolatile storage medium by manually inputting a write file command and the like.
The mode increases the workload of the staff, and the situation that the staff forgets to store the configuration data in the memory into the configuration file inevitably occurs, so that the configuration data in the memory is completely lost after the equipment is restarted.
Therefore, the application provides a configuration storage method, which automatically stores the configuration data in the memory into the configuration file according to whether the configuration data corresponding to each bit in the established bitmap changes after receiving the restart command and when the configuration data changes.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in detail below with reference to the accompanying drawings and specific embodiments.
Referring to fig. 1, fig. 1 is a flowchart of a configuration saving method provided in the present application. As an embodiment, the process shown in fig. 1 may be applied to a network device, such as a switch. As shown in fig. 1, the process may include the following steps:
The restart command is used to instruct the device to restart, and as an embodiment, the restart command may be a reboot (restart) command input by a user and received through a command line, or a command input by the user through another way to instruct the device to restart.
According to step 101, it can be known that the device needs to be restarted according to a restart command of a user, so before restarting, in order to ensure that configuration data which is not stored in a configuration file and exists in a memory is not lost due to restarting, it is first required to check whether configuration information which is not stored exists in the memory.
In order to quickly and accurately determine whether the configuration data not saved in the configuration file is stored in the memory of the device, i.e. whether the configuration data in the memory has changed, step 102 uses a bitmap to represent the change of the configuration data. Usually, the value of each bit in the bitmap is 0 or 1, so the first value in this step 102 may be set to 0 or 1, for example, the first value may be set to 1, and the current value of a bit is 1, which means that the configuration data corresponding to the bit has been changed. The value of the first value is not limited in this application.
As an embodiment, the change of the configuration data refers to a change of the configuration data located in the memory corresponding to the bit, where the change may be an addition, a modification, a deletion, or the like of the configuration data.
In one example, a network device to which the configuration saving method provided by the present application is applied is virtualized into multiple logical devices by using an operating system Level Virtual environment (OVC) technology.
The OVC technology is a virtualization technology that can virtualize one physical device into multiple logical devices according to the memory size of the physical device. A plurality of logic devices on the same physical device after OVC virtualization respectively have independent hardware, software, forwarding table items, management planes, logs and the like, and the operation of each logic device is not influenced mutually. For convenience of description, the logical device obtained after OVC virtualization will be referred to as an OVC device hereinafter.
Usually, a plurality of OVC devices obtained by virtualizing the same physical device have different numbers, as an embodiment, each bit of the bitmap in step 102 may correspond to a number of an OVC device, and a current value of a bit indicates that the configuration data in the memory of the OVC device identified by the number corresponding to the bit is changed.
Therefore, the fact that the current value of at least one bit in the established bitmap is the first value can indicate that the configuration data in the memory of at least one OVC device in the network device is changed, so that prompt information about whether the configuration data is stored can be output to a user to prompt the user that the configuration data which is not stored exists in the current memory, and the user can select whether to store the configuration data in a specified configuration file. The specified configuration file here may be specified by a user or may be a default configuration file of the system.
The content of the output prompt message may be "System configuration has been modified. (Y/N) (system configuration has been changed, saved. The content of the prompt information output to the user is not particularly limited in the present application.
To facilitate an understanding of this step 102, a simple example is given below:
assuming that a network device is virtualized as 8 OVC devices by using an OVC technology, the numbers of the OVC devices are: 0. 1, 2, 3, 4, 5, 6 and 7. The bitmap built in the network device is shown with reference to fig. 2, in which the number of the OVC device corresponding to each bit of the bitmap is marked below the bit. For ease of understanding, the current value of each bit is also illustrated in FIG. 2 by way of example.
Taking the first value as 1 as an example, as shown in fig. 2, the current value of two bits existing in the bitmap is 1, that is, the current value of two bits existing in the bitmap is the first value, so that it can be determined that there is unsaved configuration data in the network device, and prompt information indicating whether to save the configuration data is output to the user.
As an embodiment, for each number of the OVC device corresponding to the bit with the current value of 1, prompt information including the number of the OVC device may be output to the user, so as to respectively confirm, for each OVC device with changed configuration data in the memory, whether to store the configuration data in the memory of the OVC device.
As an embodiment, if the current values of all bits in the established bitmap are not the first value, it indicates that the configuration data corresponding to each bit in the bitmap has not changed, so that the device restart operation can be directly executed according to the restart command received in step 101.
As an embodiment, the bitmap in this step 102 may be established in a non-volatile storage medium of the network device instead of in memory, so as to ensure that the bitmap does not need to be re-established after the device is restarted.
As an embodiment, the method for monitoring the selection of the configuration data saved by the user may be that, for the prompt message sent to the user in step 102, a confirmation message returned by the user is received.
In the above step 102, the content of the output prompt message is "System configuration has been modified. (Y/N) "for example, if" Y (yes) "input by the user is received after the prompt information is output, it may be determined that the user has selected to save the configuration data; if "N (no)" input by the user is received, it may be determined that the user has selected not to save the configuration data.
For a network device virtualized as multiple OVC devices, when actually storing configuration data, a user may select which OVC device configuration data to store for an OVC device whose configuration data in each memory changes.
For example, if the prompt information including the number of the OVC device is output to the user for the number of the OVC device corresponding to each bit with the current value of 1 in step 102, it may be determined whether to automatically save all the configuration data stored in the OVC memory to the designated configuration file according to the monitored selection of the user for each OVC device.
For another example, after it is monitored that the user selects to store the configuration data in step 103, the number of the OVC device corresponding to the bit with the current value of 1 is further output, so that the user can select to store the configuration data of the OVC device corresponding to at least one of the numbers.
In practical applications, there are various implementation ways for automatically saving all the configuration data stored in the memory to the specified configuration file in step 103, and one of them is shown in the following by way of example, which is not described herein again.
As an embodiment, after all the configuration data stored in the memory are automatically saved to the designated configuration file, information indicating that the saving of the configuration data is successful may be returned to the user.
For example, the user may be returned "Save the configuration file success! (successfully save configuration file |) "to indicate that all configuration data stored in the memory has been successfully saved to the specified configuration file.
As an embodiment, if it is monitored that the user selects not to store the configuration data, the device restart operation is directly executed according to the restart command received in step 101.
Thus, the flow shown in fig. 1 is completed.
Through the process shown in fig. 1, when it is determined that the configuration data is stored in the memory according to the current value of each bit in the bitmap before the device is restarted, whether the user stores the configuration data in the memory is prompted, and when the user selects to store the configuration data, the configuration data in the memory is automatically stored in the configuration file, so that the loss of the configuration data caused by the fact that the user forgets to store the configuration data in the memory is effectively avoided.
In actual application, the information of whether the configuration data is changed or not may be represented by using a bitmap, but may also be represented by other ways, such as using a table entry, etc., and the principle is similar to that of the bitmap, which should also be regarded as the protection scope of the present application.
As an embodiment, a timed backup may be performed on the basis of the flow shown in fig. 1, that is, according to a preset time period, whether a current value of at least one bit in a bitmap is a first value is checked, and if the current value of at least one bit is a first value, the configuration data in the memory is automatically backed up to a specified configuration file. And after each backup, changing the current value of the corresponding bit in the bitmap from a first value to a second value. The user can select whether to make the equipment perform timing backup according to actual requirements.
How to automatically save all the configuration data stored in the memory to the designated configuration file in the above step 103 is described in the following with reference to fig. 3 by way of example:
referring to fig. 3, fig. 3 is a flowchart of step 103 implemented by an embodiment of the present application. The process shown in fig. 3 is executed based on the above step 103 that the user selects to save the configuration data. As shown in fig. 3, the process includes:
If the network device to which the method provided by the present application is applied is virtualized as a plurality of OVC devices, as an embodiment, determining the configuration data corresponding to the bit in the memory is the configuration data determining the OVC device corresponding to the bit. The OVC equipment identified by the number can be determined according to the number of the OVC equipment corresponding to the bit.
For the convenience of understanding of this embodiment, a bitmap established in a network device is taken as an example of the bitmap shown in fig. 2, that is, the network device is virtualized as 8 OVC devices, and the numbers of the OVC devices are shown in fig. 2. Assuming that the first value is 1, according to fig. 2, the numbers 0 and 2 of the OVC devices corresponding to the bit with the current value of 1 can be determined, so that the numbers 0 and 2 of the OVC devices and the configuration data in the memory thereof can be determined. That is, the configuration data in the memories of the OVC devices numbered 0 and 2 are changed, and it is necessary to save the changed configuration data to a designated configuration file.
For one embodiment, the configuration data in the memory may be saved to a specified configuration file by executing a specific command, such as executing a write file command. Specifically, for each OVC device determined in step 301, a write file command may be sent to a command line process under the OVC device, so that the OVC device executes the write file command, and stores the configuration data in the memory into a specified configuration file.
And after the configuration data is stored, changing the current value of the bit with the current value being the first value into a second value to indicate that the configuration data corresponding to the bit is stored in a specified configuration file, so that the repeated storage of the configuration data corresponding to the bit is avoided.
The second value in step 302 may be set to be one of 0 or 1, but is different from the first value, that is, if the first value is set to be 1, the second value is set to be 0; if the first value is set to 0, the second value is set to 1.
To facilitate understanding of this step 302, still taking the bitmap shown in fig. 2 as an example, if the first value is 1, then for the OVC device with the number 0 and the number 2 determined according to step 301, after automatically saving the configuration data in the memory of the OVC device to the specified configuration file, the current value of the bit corresponding to the number 0 and the number 2 of the OVC device is changed from 1 to 0.
As an embodiment, after all the configuration data stored in the memory is automatically saved to the designated configuration file, the device restart operation is executed according to the restart command received in the above step 101.
The flow shown in fig. 3 is completed.
Through the process shown in fig. 3, when the user selects to save the configuration data, the configuration data stored in the memory is automatically saved to the designated configuration file.
Before executing the restart command, how to check whether the configuration data not stored in the configuration file is stored in the memory according to the established bitmap is described above. As an embodiment, in order to facilitate checking whether the configuration data not saved in the configuration file is stored in the memory, the current value of the bit in the bitmap may be set according to the storage location of the configuration data generated by the received configuration command. The following is described by way of example in connection with fig. 4:
referring to fig. 4, fig. 4 is a flow chart of setting a current value of a bit provided in the embodiment of the present application. As shown in fig. 4, the process may include the following steps:
As one example, the configuration command is a configuration command entered by a user via a command line.
As an embodiment, the "trigger for executing the configuration command" refers to an operation that a user presses enter after inputting a command in a command line, and is used for instructing the device to start executing the currently input configuration command.
When receiving the trigger, the network device searches the command structure matched with the configuration command in the established command structure, and then checks whether the first flag in the command structure is the third value. As an embodiment, the command structure here is a command line structure array for recording information such as view information, module information, command prototype, command execution function, and command help function of the command when registering the command line. And adding a first mark in the command line structure array for indicating whether the configuration data associated with the command is stored in the memory.
The value of the first flag of each command structure in the command line structure may be set according to whether configuration data associated with the command is stored in the memory when the command matched with each command structure is actually applied.
For example, if there is a command 1, and the staff knows that the configuration data associated with the command 1 is usually stored in the memory according to the actual application, the first flag of the command structure matching the command 1 in the command structure may be set to a third value, which indicates that the configuration data associated with the command 1 is stored in the memory.
If there is a command 2, the worker knows, according to an actual application situation, that the configuration data associated with the command 2 is usually directly stored in the configuration file, and then the first flag of the command structure matched with the command 2 in the command structure may be set to a fourth value, which indicates that the configuration data associated with the command 2 is not stored in the memory.
The third value may be set to 0 or 1 or other numerical values, and if the third value is set to 1, when the first flag of the target command structure matched with the configuration command is found in the established command structure, the bit corresponding to the configuration data is found in the bitmap, and the current value of the bit is set to the first value. The third value is not necessarily related to the first value in value.
The fourth value needs to be different from the third value. That is, if the fourth value and the third value can only take values from 1 and 0, the fourth value is 0 if the third value is 1; if the third value is 0, the fourth value is 1.
If the first mark of the target command structure matched with the configuration command is a third value, the current value of the bit corresponding to the configuration data in the search bitmap is a second value, and the current value of the bit is changed into the first value from the second value; and if the current value of the bit corresponding to the configuration data in the bitmap is the first value, keeping the current value of the bit unchanged.
As an embodiment, if the first flag of the target command structure matched with the configuration command is searched for a fourth value in the established command structure, which indicates that the configuration data associated with the command is stored in a configuration file, the configuration operation is executed in the configuration file according to the configuration command. The configuration operation may be deleting, modifying, adding, etc. the configuration data.
This step 403 is similar to the step 302, and therefore will not be described herein.
The flow shown in fig. 4 is completed.
Through the process shown in fig. 4, it is realized that according to the command structure matched with the received configuration command in the command structure, whether the configuration data associated with the command is stored in the memory is directly determined, and when it is determined that the configuration data associated with the command is stored in the memory, the bit corresponding to the configuration data in the bitmap is set to the first value.
The method provided by the present application is described above, and the device provided by the present application is described below:
referring to fig. 5, fig. 5 is a structural diagram of a configuration storage device provided in the present application. As shown in fig. 5, the apparatus includes a receiving module 501, an output module 502, and a saving module 503.
In one example, the receiving module 501 is configured to receive a restart command;
an output module 502, configured to check a current value of each bit in the established bitmap, and output a prompt message indicating whether to store configuration data when the current value of at least one bit is a first value, where the first value is used to indicate that the configuration data corresponding to the bit is changed;
the saving module 503 is configured to, when it is monitored that the user selects to save the configuration data, automatically save all the configuration data stored in the memory to the designated configuration file.
As an embodiment, the automatically saving, by the receiving module, all the configuration data stored in the memory to the specified configuration file includes:
determining configuration data corresponding to the bit in the memory aiming at the bit with the current value being the first value;
and automatically storing the configuration data corresponding to the bit determined in the memory into a specified configuration file, and changing the current value of the bit from the first value to a second value after the storage is finished.
As an embodiment, as shown in fig. 6, the apparatus further includes:
and a restart module 504, configured to execute a device restart operation according to the restart command after the storage module automatically stores all the configuration data stored in the memory to the specified configuration file.
As an embodiment, the restart module 504 is further configured to execute a device restart operation according to the restart command when current values of all bit bits in the established bitmap are not the first value.
As an embodiment, the receiving module 501 is further configured to receive a configuration command;
the device also includes: a bit setting module 505, configured to, when receiving a trigger for running the configuration command from the outside, if a first flag of a target command structure matched with the configuration command is searched for in an established command structure and is a third value, where the third value is used to indicate that configuration data associated with the configuration command is stored in a memory, search for a bit corresponding to the configuration data in the bitmap, and set a current value of the bit as the first value;
the saving module 503 is further configured to change the current value of the bit from the first value to a second value after automatically saving all the configuration data stored in the memory to a specified configuration file.
As an embodiment, the bit setting module 505 is specifically configured to, when the first flag of the target command structure matched with the configuration command is found in the established command structure and is a fourth value, execute the configuration operation in the configuration file according to the configuration command.
It can be understood that the restart module 504 and the bit setting module 505 are two independent modules, and may be configured in the apparatus at the same time as shown in fig. 6, or may be separately configured in the apparatus, respectively, and therefore the structure shown in fig. 6 should not be construed as limiting the embodiments described in this specification.
The implementation process of the functions and actions of the modules in the apparatus is specifically described in the implementation process of the corresponding steps in the method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the components shown as modules may or may not be physical modules, may be located in one place, or may be distributed over a plurality of network modules. The modules can be selected according to actual needs to achieve the purpose of the scheme in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
Referring to fig. 7, fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure. The electronic device may include a processor 701, a memory 702, and a communication bus 703. The processor 701 and the memory 702 communicate with each other via a communication bus 703. Wherein, the memory 702 stores a computer program; the processor 701 may perform the configuration saving method described above by executing the program stored on the memory 702.
The memory 702 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the memory 702 may be: RAM (random access memory), volatile memory, non-volatile memory, flash memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, dvd, etc.), or similar storage medium, or a combination thereof.
Embodiments of the present application also provide a machine-readable storage medium, such as the memory 702 in fig. 7, storing a computer program, which can be executed by the processor 701 in the electronic device shown in fig. 7 to implement the configuration saving method described above.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (10)
1. A configuration preservation method, the method comprising:
receiving a restart command;
checking the current value of each bit in the established bitmap, and outputting prompt information whether to store configuration data when the current value of at least one bit is a first value, wherein the first value is used for indicating that the configuration data corresponding to the bit is changed;
and when the situation that the user selects to save the configuration data is monitored, automatically saving all the configuration data stored in the memory to the specified configuration file.
2. The method of claim 1, wherein automatically saving all configuration data stored in the memory to a specified configuration file comprises:
determining configuration data corresponding to the bit in the memory aiming at the bit with the current value as the first value;
and automatically storing the configuration data corresponding to the bit determined in the memory into a specified configuration file, and changing the current value of the bit from the first value to a second value after the storage is finished.
3. The method of claim 1, wherein after automatically saving all configuration data stored in the memory to the specified configuration file, the method further comprises:
and executing equipment restarting operation according to the restarting command.
4. The method of claim 1, wherein when the current values of all bits in the established bitmap are not the first value, the method further comprises:
and executing equipment restarting operation according to the restarting command.
5. The method of claim 1, further comprising:
receiving a configuration command;
when receiving a trigger for operating the configuration command from the outside, if a first mark of a target command structure matched with the configuration command is searched in an established command structure and is a third value, and the third value is used for indicating that configuration data associated with the configuration command is stored in a memory, searching a bit corresponding to the configuration data in the bitmap, and setting the current value of the bit as a first value;
and after all the configuration data stored in the memory are automatically stored to a specified configuration file, changing the current value of the bit from the first value to a second value.
6. The method of claim 5, further comprising:
and if the first mark of the target command structure matched with the configuration command is searched in the established command structure body and is a fourth value, executing configuration operation in the configuration file according to the configuration command.
7. A configuration preservation apparatus, characterized in that the apparatus comprises:
the receiving module is used for receiving a restart command;
the output module is used for checking the current value of each bit in the established bitmap and outputting prompt information for judging whether to store configuration data or not when the current value of at least one bit is a first value, wherein the first value is used for indicating that the configuration data corresponding to the bit is changed;
and the storage module is used for automatically storing all the configuration data stored in the memory to the specified configuration file when the situation that the user selects to store the configuration data is monitored.
8. The apparatus of claim 7, wherein the saving module automatically saves all configuration data stored in the memory to a specified configuration file, comprising:
determining configuration data corresponding to the bit in the memory aiming at the bit with the current value as the first value;
and automatically storing the configuration data corresponding to the bit determined in the memory into a specified configuration file, and changing the current value of the bit from the first value to a second value after the storage is finished.
9. The apparatus of claim 7, further comprising:
and the restarting module is used for executing equipment restarting operation according to the restarting command after all the configuration data stored in the memory are automatically saved to the specified configuration file.
10. The apparatus of claim 7, wherein the receiving module is further configured to receive a configuration command, the apparatus further comprising:
a bit setting module, configured to, when receiving a trigger for running the configuration command from the outside, if a first flag of a target command structure matched with the configuration command is searched for in an established command structure and is a third value, where the third value is used to indicate that configuration data associated with the configuration command is stored in a memory, search for a bit corresponding to the configuration data in the bitmap, and set a current value of the bit as the first value;
the storage module is further configured to, after automatically storing all configuration data stored in the memory to a specified configuration file, change the current value of the bit from the first value to a second value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911205711.1A CN110990052B (en) | 2019-11-29 | 2019-11-29 | Configuration preservation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911205711.1A CN110990052B (en) | 2019-11-29 | 2019-11-29 | Configuration preservation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110990052A true CN110990052A (en) | 2020-04-10 |
CN110990052B CN110990052B (en) | 2023-09-26 |
Family
ID=70088682
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911205711.1A Active CN110990052B (en) | 2019-11-29 | 2019-11-29 | Configuration preservation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110990052B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112910978A (en) * | 2021-01-26 | 2021-06-04 | 杭州迪普科技股份有限公司 | Method and system for synchronizing network configuration data |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6096094A (en) * | 1997-10-03 | 2000-08-01 | National Instruments Corporation | Configuration manager for configuring a data acquisition system |
CN101286886A (en) * | 2008-06-05 | 2008-10-15 | 杭州华三通信技术有限公司 | Method and device to recover configuring information of network appliance |
US20090177684A1 (en) * | 2008-01-07 | 2009-07-09 | International Business Machines Corporation | Automated configuration updater |
US20100146328A1 (en) * | 2008-08-21 | 2010-06-10 | Xsignnet Ltd. | Grid storage system and method of operating thereof |
CN104796801A (en) * | 2015-05-08 | 2015-07-22 | 上海斐讯数据通信技术有限公司 | ONU (optical network unit) configuration sending method and ONU configuration sending system based on multiple tasks |
WO2017124933A1 (en) * | 2016-01-18 | 2017-07-27 | 阿里巴巴集团控股有限公司 | Information processing method, device and system |
CN108604992A (en) * | 2016-05-26 | 2018-09-28 | 华为技术有限公司 | The system and method switched using the software definition between the lightweight virtual machine of host kernel resources |
CN109976798A (en) * | 2019-02-02 | 2019-07-05 | 杭州迪普科技股份有限公司 | A kind of reminding method and device |
US20190332503A1 (en) * | 2018-04-28 | 2019-10-31 | EMC IP Holding Company LLC | Method, apparatus and computer program product for data synchronization |
-
2019
- 2019-11-29 CN CN201911205711.1A patent/CN110990052B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6096094A (en) * | 1997-10-03 | 2000-08-01 | National Instruments Corporation | Configuration manager for configuring a data acquisition system |
US20090177684A1 (en) * | 2008-01-07 | 2009-07-09 | International Business Machines Corporation | Automated configuration updater |
CN101286886A (en) * | 2008-06-05 | 2008-10-15 | 杭州华三通信技术有限公司 | Method and device to recover configuring information of network appliance |
US20100146328A1 (en) * | 2008-08-21 | 2010-06-10 | Xsignnet Ltd. | Grid storage system and method of operating thereof |
CN104796801A (en) * | 2015-05-08 | 2015-07-22 | 上海斐讯数据通信技术有限公司 | ONU (optical network unit) configuration sending method and ONU configuration sending system based on multiple tasks |
WO2017124933A1 (en) * | 2016-01-18 | 2017-07-27 | 阿里巴巴集团控股有限公司 | Information processing method, device and system |
CN108604992A (en) * | 2016-05-26 | 2018-09-28 | 华为技术有限公司 | The system and method switched using the software definition between the lightweight virtual machine of host kernel resources |
US20190332503A1 (en) * | 2018-04-28 | 2019-10-31 | EMC IP Holding Company LLC | Method, apparatus and computer program product for data synchronization |
CN109976798A (en) * | 2019-02-02 | 2019-07-05 | 杭州迪普科技股份有限公司 | A kind of reminding method and device |
Non-Patent Citations (1)
Title |
---|
蒋玉玲;谭佳慧;: "网络配置数据存储与恢复的研究与应用", 计算技术与自动化, no. 02 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112910978A (en) * | 2021-01-26 | 2021-06-04 | 杭州迪普科技股份有限公司 | Method and system for synchronizing network configuration data |
CN112910978B (en) * | 2021-01-26 | 2022-07-01 | 杭州迪普科技股份有限公司 | Method and system for synchronizing network configuration data |
Also Published As
Publication number | Publication date |
---|---|
CN110990052B (en) | 2023-09-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9372908B2 (en) | Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation | |
US9870288B2 (en) | Container-based processing method, apparatus, and system | |
US20170255392A1 (en) | Storage control device, storage control method, and recording medium | |
US20120191960A1 (en) | Booting computing devices | |
CN102023908A (en) | Method and device for backing up boot program | |
CN108255576B (en) | Virtual machine live migration exception handling method and device and storage medium | |
CN104572229A (en) | Firmware upgrade method and firmware upgrade device for embedded system | |
CN107426041B (en) | Method and device for analyzing command | |
US20170277439A1 (en) | Techniques for Path Optimization in Storage Networks | |
CN106970856B (en) | Data management system and method for backing up, recovering and mounting data | |
CN103324582A (en) | Memory migration method, memory migration device and equipment | |
CN103198122A (en) | Method and device for restarting in-memory database | |
CN104021058A (en) | Method for quickly starting test board card | |
CN112579591B (en) | Data verification method, device, electronic equipment and computer readable storage medium | |
CN104866388B (en) | Data processing method and device | |
CN110990052B (en) | Configuration preservation method and device | |
CN109375953B (en) | Operating system starting method and device | |
CN116737279B (en) | Method and device for program running, processor, electronic device and medium | |
CN116909607A (en) | Program upgrading method, program upgrading device, computer equipment, storage medium and program product | |
CN105278993A (en) | Linux system based drive module upgrading method and apparatus | |
CN114610516A (en) | Application program repairing method and device, computer equipment and storage medium | |
CN104317645A (en) | Method and device of monitoring port by virtue of application program embodiment | |
CN110059071B (en) | Data comparison monitoring method, system, equipment and medium based on storage process | |
US20170322893A1 (en) | Computing node to initiate an interrupt for a write request received over a memory fabric channel | |
US10303553B2 (en) | Providing data backup |
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 |