CN107590027A - Backup, the method for restoring operation systematic parameter and instrument - Google Patents
Backup, the method for restoring operation systematic parameter and instrument Download PDFInfo
- Publication number
- CN107590027A CN107590027A CN201710810599.9A CN201710810599A CN107590027A CN 107590027 A CN107590027 A CN 107590027A CN 201710810599 A CN201710810599 A CN 201710810599A CN 107590027 A CN107590027 A CN 107590027A
- Authority
- CN
- China
- Prior art keywords
- parameter
- backup
- title
- currency
- module
- 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
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of backup, the method for restoring operation systematic parameter and instrument, the method for backup operation systematic parameter includes the title for reading backup parameter, obtains the currency of backup parameter;Newly-built parameter value file, by the title of backup parameter and currency write parameters value file.The method of restoring operation systematic parameter includes the title for reading Reduction parameter, the parameter value corresponding to acquisition from parameter value file;The parameter value is set as to the currency of systematic parameter.The present invention, instead of being manually written parameter name and corresponding currency, avoids being manually written mistake, and greatly improve operating efficiency in parameter backup;It is convenient and swift when parameter reduces without reboot operation system.
Description
Technical field
The present invention relates to field of computer technology, specifically backup, the method for restoring operation systematic parameter and instrument.
Background technology
In (SuSE) Linux OS, many customized parameters be present, in many files under/proc/ and/sys catalogues
Parameter can modify according to the needs of application scenarios.In practical application scene, generally require to change one or more systems
Unite parameter, effect is undesirable may need to recover original value again in system operation after modification.
Setting to (SuSE) Linux OS parameter at present and reduction are typically all to be carried out by manual mode, in reduction,
Need by the original value of the pre-recorded lower relevant parameter of keeper, and original value is re-write in corresponding Parameter File.
Modification to systematic parameter at present mainly uses the manual mode write parameters into corresponding Parameter File one by one
It is worth, also principle is to re-write original value in Parameter File, when repeatedly largely changing Parameter File if desired, efficiency meeting
Than relatively low, and restarting operating systems are needed if without the original value of pre-recorded lower parameter, wasted time and energy.
The content of the invention
It is an object of the invention to provide backup, the Method and kit for of restoring operation systematic parameter, for solving manual side
Formula carries out the backup-and-restore of parameter, ineffective problem one by one.
The embodiment provides the method for backup operation systematic parameter, comprise the following steps:
The title of backup parameter is read, obtains the currency of backup parameter;
Newly-built parameter value file, by the title of backup parameter and currency write parameters value file.
Further, step is also included before the title for reading backup parameter:The parameter for supporting backup is carried out whole
Reason, generate parameter list.
Further, the title for reading backup parameter, the detailed process for obtaining the currency of backup parameter are:
The title of backup parameter is read from configuration file;
Judge the parameter name whether in parameter list;
If it is not, then terminating process, and show mistake;
If so, then obtain the currency of backup parameter.
The method that embodiments of the invention additionally provide restoring operation systematic parameter, comprises the following steps:
The title of backup parameter is read, obtains the currency of backup parameter;
Newly-built parameter value file, by the title of backup parameter and currency write parameters value file;
The title of Reduction parameter is read, the parameter value corresponding to acquisition from parameter value file;
The parameter value is set as to the currency of systematic parameter.
Further, by calling the form of sysctl-e orders plus parameter name to obtain corresponding ginseng from parameter value file
Numerical value.
Further, parameter value corresponding to the acquisition of parameter value file command is read by calling.
Embodiments of the invention additionally provide the instrument of backup operation systematic parameter, including including configuration module, backup mould
Block and memory module;The configuration module is used for the title for storing backup parameter, and the backup module is used for from configuration module
The title of backup parameter is obtained, while obtains the currency of backup parameter, the title of backup parameter and currency are sent to and deposited
Module is stored up, the memory module is used to create parameter value file, and the title of backup parameter and currency are preserved to parameter value text
Part.
Further, the instrument also includes parameter list module, and the parameter list module is supported for finishing tool
The parameter of backup, and generate parameter list.
Embodiments of the invention additionally provide the instrument of restoring operation systematic parameter, including configuration module, backup module, deposit
Module and setup module are stored up, the configuration module is used for the title for storing backup parameter, and the backup module is used for from configuration mould
The title of backup parameter is obtained in block, while obtains the currency of backup parameter, the title of backup parameter and currency are sent
To memory module, the memory module is used to create parameter value file, and the title of backup parameter and currency are preserved to parameter
It is worth file, the setup module is used to obtain Reduction parameter title, while reads corresponding parameter value in parameter value file, by also
Original parameter value is set to this parameter value.
The effect provided in the content of the invention is only the effect of embodiment, rather than whole effects that invention is all, above-mentioned
A technical scheme in technical scheme has the following advantages that or beneficial effect:
1st, by the title for reading backup parameter, currency getparms, parameter name and parameter read-in are joined automatically
Numeric file is preserved, and instead of being manually written parameter name and corresponding currency, avoids being manually written mistake, and significantly carry
High workload efficiency.
2nd, the parameter for supporting backup is arranged, generates parameter list, while when obtaining backup parameter name, judged
Whether the parameter avoids the parameter outside to parameter list from operating in parameter list, causes positional fault, ensures that parameter is standby
The accuracy of part.
3rd, in Reduction parameter, as long as reading parameter value in parameter value file, the parameter value of acquisition is set to Parameter File
In parameter value be the reduction that parameter can be achieved, it is convenient and swift without reboot operation system, and be not in wrong reduction, protect
Demonstrate,prove the accuracy of Reduction parameter value.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of backup parametric technique of the invention;
Fig. 2 is the schematic flow sheet of title and currency of being got parms in backup parametric technique of the invention;
Fig. 3 is the schematic flow sheet of Reduction parameter method of the present invention;
Fig. 4 is the structural representation of backup tool parameter of the invention;
Fig. 5 is the structural representation of Reduction parameter instrument of the present invention.
Embodiment
For the technical characterstic for illustrating this programme can be understood, below by embodiment, and its accompanying drawing is combined, to this hair
It is bright to be described in detail.Following disclosure provides many different embodiments or example is used for realizing the different knots of the present invention
Structure.In order to simplify disclosure of the invention, hereinafter the part and setting of specific examples are described.In addition, the present invention can be with
Repeat reference numerals and/or letter in different examples.This repetition is that for purposes of simplicity and clarity, itself is not indicated
Relation between various embodiments are discussed and/or set.It should be noted that part illustrated in the accompanying drawings is not necessarily to scale
Draw.Present invention omits the description to known assemblies and treatment technology and process to avoid being unnecessarily limiting the present invention.
As shown in figure 1, the invention provides the method for backup operation systematic parameter, including step:
S1, the parameter for supporting backup is arranged, generate parameter list;
S2, the title of backup parameter is read, obtain the currency of backup parameter;
S3, newly-built parameter value file, by the title of backup parameter and currency write parameters value file.
In step S1, the parameter that the present embodiment can be backed up is arranged, generates parameter list, it is newly-built to support ginseng
Ordered series of numbers list file, parameter list is preserved to support parameter list file.
As shown in Fig. 2 in step S2, realize that the detailed process that backup parameter name is read, parameter currency obtains is:
S21, the title of backup parameter is read from configuration file;
S22, judge the parameter name whether in parameter list;
S23, if it is not, then terminating process, and show mistake;
S24, if so, then obtaining the currency of backup parameter.
In step S21, newly-built configuration file, in configuration file write-in need the parameter name that backs up, when receiving spy
After the order for determining parameter backup, the title of backup parameter is read from configuration file.
In step S22, in order to which the present embodiment can support the parameter of backup when ensureing the backup parameter read, judge to read
Backup parameter name whether in parameter list.
In step S23, if the backup parameter of the reading not in parameter list, terminates the backup behaviour to the reading parameter
Make, directly display mistake.
In step S24, if the backup parameter of the reading obtains the currency of the parameter in parameter list.Performing
During backup command, by calling the value order that gets parms to read all parameter values listed in configuration file, corresponding ginseng will be read
The parameter value of several titles is written in parameter value file and preserved, such as can be with by sysctl-e vm.swappiness orders
Vm.swappiness values are read as 60.
In step S3, newly-built parameter value file, the step S2 parameter names obtained and corresponding parameter value are stored in ginseng
In numeric file, each parameter is preserved by filename of parameter name, therefore multiple sub-parameter values are preserved in parameter value file
File.
As shown in figure 3, the method for restoring operation systematic parameter disclosed by the invention, in above-mentioned backup operation systematic parameter side
On the basis of method, the method for the Reduction parameter comprises the following steps:
S2, the title of backup parameter is read, obtain the currency of backup parameter;
S3, newly-built parameter value file, by the title of backup parameter and currency write parameters value file;
A1, the title of Reduction parameter is read, the parameter value corresponding to acquisition from parameter value file;
A2, the parameter value is set as to the currency of systematic parameter.
In step A1, after system receives the order of Reduction parameter, the automatic title for reading Reduction parameter, according to reading
The title of Reduction parameter, the parameter value corresponding to searching from parameter value file.
The detailed process for the value that got parms from Parameter File has:By way of calling sysctl-e orders plus parameter name
By way of parameter value file command is read calling.Wherein, can largely pass through for the parameter under/proc files
Sysctl-e add the mode of parameter name to read, such as vm.swappiness, the parameter such as kernel.shmmax.For under/sys catalogues
Partial parameters can be got parms using particular command value, such as the acquisition for cpu frequencypolicy parameters can be with
Using cpupower orders, the frequency-set-g performance of cpupower-c 0 can be by cpu0's
Frequencypolicy is set as performance, can pass through reading for the parameter that order can not be used to be inquired about
The mode of corresponding parameter value file obtains the setting value of parameter current, read as acquisition cpu min_perf parameters need to pass through/
Sys/devices/system/cpu/intel_pstate/min_perf_pct file acquisitions are worth accordingly.
By the title for reading backup parameter, currency getparms, automatically by parameter name and parameter read-in parameter
Value file is preserved, and instead of being manually written parameter name and corresponding currency, avoids being manually written mistake, and greatly improve
Operating efficiency.
As shown in figure 4, the invention discloses backup operation systematic parameter instrument, the instrument include be sequentially connected matches somebody with somebody
Put module 11, backup module 12 and memory module 13.Wherein configuration module 11 is used for the title for storing backup parameter, the backup
Module 12 is used for the title that backup parameter is obtained from configuration module 11, while obtains the currency of backup parameter, and backup is joined
Several titles and currency is sent to memory module 13, and memory module 13 is used to create parameter value file, by the name of backup parameter
Claim and currency is preserved to parameter value file.
The instrument of backup parameter also includes parameter list module, and parameter list module is used for the ginseng that finishing tool supports backup
Number, and generate parameter list.Backup module 12 is when carrying out parameter backup, the parameter name that will be obtained first from configuration module 11
Title is judged, judges that the parameter name whether in parameter list, avoids the parameter outside to parameter list from operating, caused
Positional fault, ensure the accuracy of parameter backup.
As shown in figure 5, on the basis of above-mentioned backup tool, the invention discloses the instrument of restoring operation systematic parameter,
The instrument includes configuration module 21, backup module 22, memory module 23 and the setup module 24 being sequentially connected.Wherein configuration module
21 are used for the title of storage backup parameter, and backup module 22 is used for the title that backup parameter is obtained from configuration module 21, simultaneously
The currency of backup parameter is obtained, the title of backup parameter and currency are sent to memory module 23, memory module 23 is used for
Parameter value file is created, the title of backup parameter and currency are preserved to parameter value file, setup module 24 is used to obtain also
Original parameter title, while corresponding parameter value in parameter value file is read, Reduction parameter value is set to this parameter value.
Simply the preferred embodiment of the present invention described above, for those skilled in the art,
Without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications are also regarded as this hair
Bright protection domain.
Claims (9)
1. the method for backup operation systematic parameter, it is characterized in that:Comprise the following steps:
The title of backup parameter is read, obtains the currency of backup parameter;
Newly-built parameter value file, by the title of backup parameter and currency write parameters value file.
2. the method for backup operation systematic parameter according to claim 1, it is characterized in that:The name for reading backup parameter
It is referred to as preceding also to include step:The parameter for supporting backup is arranged, generates parameter list.
3. the method for backup operation systematic parameter according to claim 2, it is characterized in that:The name for reading backup parameter
Claim, the detailed process for obtaining the currency of backup parameter is:
The title of backup parameter is read from configuration file;
Judge the parameter name whether in parameter list;
If it is not, then terminating process, and show mistake;
If so, then obtain the currency of backup parameter.
4. the method for restoring operation systematic parameter, it is characterized in that:Comprise the following steps:
The title of backup parameter is read, obtains the currency of backup parameter;
Newly-built parameter value file, by the title of backup parameter and currency write parameters value file;
The title of Reduction parameter is read, the parameter value corresponding to acquisition from parameter value file;
The parameter value is set as to the currency of systematic parameter.
5. the method for restoring operation systematic parameter according to claim 4, it is characterized in that:By calling sysctl-e orders
Add parameter name form obtained from parameter value file corresponding to parameter value.
6. the method for restoring operation systematic parameter according to claim 4, it is characterized in that:Parameter value text is read by calling
Parameter value corresponding to part order acquisition.
7. the instrument of backup operation systematic parameter, it is characterized in that:Including configuration module, backup module and memory module;It is described to match somebody with somebody
Put module be used for store backup parameter title, the backup module for from configuration module acquisition backup parameter title,
The currency of backup parameter is obtained simultaneously, and the title of backup parameter and currency are sent to memory module, the memory module
For creating parameter value file, the title of backup parameter and currency are preserved to parameter value file.
8. the instrument of backup operation systematic parameter according to claim 7, it is characterized in that:The instrument also includes parameter and arranged
Table module, the parameter list module is used for finishing tool and supports the parameter of backup, and generates parameter list.
9. the instrument of restoring operation systematic parameter, it is characterized in that:Including configuration module, backup module, memory module and mould is set
Block, the configuration module are used for the title for storing backup parameter, and the backup module is used to obtain backup ginseng from configuration module
Several titles, while the currency of backup parameter is obtained, the title of backup parameter and currency are sent to memory module, it is described
Memory module is used to create parameter value file, and the title of backup parameter and currency are preserved to parameter value file, the setting
Module is used to obtain Reduction parameter title, while reads corresponding parameter value in parameter value file, and Reduction parameter value is set into this
Parameter value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710810599.9A CN107590027A (en) | 2017-09-11 | 2017-09-11 | Backup, the method for restoring operation systematic parameter and instrument |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710810599.9A CN107590027A (en) | 2017-09-11 | 2017-09-11 | Backup, the method for restoring operation systematic parameter and instrument |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107590027A true CN107590027A (en) | 2018-01-16 |
Family
ID=61051154
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710810599.9A Pending CN107590027A (en) | 2017-09-11 | 2017-09-11 | Backup, the method for restoring operation systematic parameter and instrument |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107590027A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112131052A (en) * | 2020-10-23 | 2020-12-25 | 北京安石科技有限公司 | Quick recovery method and system for operating system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040255106A1 (en) * | 2003-06-10 | 2004-12-16 | Rothman Michael A. | Recovery of operating system configuration data by firmware of computer system |
CN101477482A (en) * | 2008-10-14 | 2009-07-08 | 深圳市共进电子有限公司 | Method for recovering flash memory data at power-off of built-in Linux system |
CN101826039A (en) * | 2009-03-06 | 2010-09-08 | 宏碁股份有限公司 | System setting recovery method and computer system |
CN102929613A (en) * | 2012-10-16 | 2013-02-13 | 无锡江南计算技术研究所 | Adjusting and optimizing device and method for operating system |
CN103116538A (en) * | 2013-01-25 | 2013-05-22 | 浪潮电子信息产业股份有限公司 | Design for computer performance self-adjusting system |
CN105824652A (en) * | 2015-01-08 | 2016-08-03 | 深圳市祈飞科技有限公司 | Method and system for directly changing BIOS settings in operating system |
-
2017
- 2017-09-11 CN CN201710810599.9A patent/CN107590027A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040255106A1 (en) * | 2003-06-10 | 2004-12-16 | Rothman Michael A. | Recovery of operating system configuration data by firmware of computer system |
CN101477482A (en) * | 2008-10-14 | 2009-07-08 | 深圳市共进电子有限公司 | Method for recovering flash memory data at power-off of built-in Linux system |
CN101826039A (en) * | 2009-03-06 | 2010-09-08 | 宏碁股份有限公司 | System setting recovery method and computer system |
CN102929613A (en) * | 2012-10-16 | 2013-02-13 | 无锡江南计算技术研究所 | Adjusting and optimizing device and method for operating system |
CN103116538A (en) * | 2013-01-25 | 2013-05-22 | 浪潮电子信息产业股份有限公司 | Design for computer performance self-adjusting system |
CN105824652A (en) * | 2015-01-08 | 2016-08-03 | 深圳市祈飞科技有限公司 | Method and system for directly changing BIOS settings in operating system |
Non-Patent Citations (5)
Title |
---|
ORACLE CORPORATION: "Oracle® Application Server 10g Quick Installation and Upgrade Guide", 《HTTPS://DOCS.ORACLE.COM》 * |
ROBERT LOVE: "《Linux kernel development》", 31 December 2010 * |
THINKDIFF: "Linux内核参数配置", 《HTTPS://WWW.CNBLOGS.COM/BODHITREE/P/5756719.HTML》 * |
VIVEK GITE: "《How to reload sysctl.conf variables》", 《HTTPS://WWW.CYBERCITI.BIZ/FAQ/RELOAD-SYSCTL-CONF-ON-LINUX-USING-SYSCTL》 * |
李爱武: "《基于LINUX的ORACLE数据库管理》", 31 March 2008, 北京邮电大学出版社 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112131052A (en) * | 2020-10-23 | 2020-12-25 | 北京安石科技有限公司 | Quick recovery method and system for operating system |
CN112131052B (en) * | 2020-10-23 | 2024-02-09 | 北京安石科技有限公司 | Method and system for quickly recovering operating system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102982085B (en) | Data mover system and method | |
CN106095620B (en) | A kind of development approach of built-in Linux partition holding | |
CN106354583B (en) | A kind of heat backup method and system of MySQL database | |
KR970059955A (en) | Memory controller and memory control method | |
CN106598667A (en) | Method and device used for restoring kernel vulnerability | |
CN104461611A (en) | Method for refreshing node BIOSes of RACK cabinet in batches | |
CN102999564B (en) | Write the method for data, device and equipment | |
JP2008217530A (en) | Information processor and setting method | |
CN101819543A (en) | Snapshot data processing method, system and storage device | |
CN107562483A (en) | A kind of method and device of carry guiding file system | |
US20210365361A1 (en) | Method and apparatus for designing dual-mirror shared conf partition file | |
CN104536841B (en) | A kind of android system Data subregions self-repair method and system | |
CN108197139A (en) | A kind of processing method and terminal of synchronized update configuration item | |
CN105677256A (en) | Virtual disk system based on local caching and scheduling method | |
CN109960678A (en) | A kind of name processing method and computer processor unit | |
CN102622281A (en) | Intelligent terminal and method of data backup and restore thereof | |
CN106155838A (en) | A kind of database back-up data restoration methods and device | |
CN113190241B (en) | Method and device for expanding capacity of data partition, electronic equipment and storage medium | |
CN106874343B (en) | Data deletion method and system for time sequence database | |
CN104182295A (en) | Data backup method and data backup device | |
CN114860654A (en) | Method and system for dynamically changing Iceberg table Schema based on Flink data stream | |
CN107590027A (en) | Backup, the method for restoring operation systematic parameter and instrument | |
CN103092955B (en) | Checkpointed method, Apparatus and system | |
CN104808953B (en) | Control the method, device and mobile terminal of data storage | |
CN104216792A (en) | Data backup method and memory database storage engine |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180116 |