CN109542678B - Method and device for regularly backing up key information of server - Google Patents

Method and device for regularly backing up key information of server Download PDF

Info

Publication number
CN109542678B
CN109542678B CN201811316856.4A CN201811316856A CN109542678B CN 109542678 B CN109542678 B CN 109542678B CN 201811316856 A CN201811316856 A CN 201811316856A CN 109542678 B CN109542678 B CN 109542678B
Authority
CN
China
Prior art keywords
weight
flow
backup
port
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811316856.4A
Other languages
Chinese (zh)
Other versions
CN109542678A (en
Inventor
徐潇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811316856.4A priority Critical patent/CN109542678B/en
Publication of CN109542678A publication Critical patent/CN109542678A/en
Application granted granted Critical
Publication of CN109542678B publication Critical patent/CN109542678B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments

Abstract

The invention discloses a server key information timing backup method, which is characterized by comprising the following steps: monitoring server third-party component port flow information; updating and sequencing the weight of the third-party components according to the port flow information; and carrying out remote data redundancy backup on the files containing the key information. The invention also discloses a device for backing up the key information of the server at regular time, and the invention realizes data redundancy on the key information file while backing up locally so as to further improve the safety of the data, ensure the integrity of the data and prevent single point failure. By adding a third-party component weight training mechanism, too much system resources and too much system resources occupied by a large number of repeated backups every day are reduced, only the top 10 or 15 of component configuration information and the daily log are taken for backup, the time cost of backup is greatly saved, and the daily backup work is more reasonable.

Description

Method and device for regularly backing up key information of server
Technical Field
The invention relates to the technical field of server management, in particular to a method and a device for regularly backing up key information of a server.
Background
At present, the maintenance work of the server usually includes the item of timed backup, but for the server inside the enterprise, there is no general method and flow of timed backup which take both practicability and safety into account. When the backup information is stored in the local physical machine, although the key information of the server is protected to a certain extent, the normal function of the server can not be recovered at the first time.
Disclosure of Invention
The invention aims to provide a method and a device for regularly backing up key information of a server, provides a feasible universal method and a relatively complete standard flow for backing up the key information of the server, and reduces too many system resources and efficiency occupied by a large number of repeated backups every day.
In order to achieve the purpose, the invention adopts the following technical scheme:
the first aspect of the invention provides a server key information timing backup method, which comprises the following steps:
monitoring server third-party component port flow information;
updating and sequencing the weight of the third-party components according to the port flow information;
and carrying out remote data redundancy backup on the files containing the key information.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the updating and sorting the third-party component weights according to the port traffic information specifically includes:
setting a third-party component port weight initial value;
sequencing the ports from large to small periodically according to the flow, and updating the corresponding weight values;
the daily fixed time points are sorted according to the current third party component port weight value.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the periodically sorting the ports according to the flow rate from large to small, and updating the corresponding weight values specifically includes:
when the port flow is 0, the weight is unchanged; respectively increasing the weight values by 1 for the components with 1-3 flow sequences; respectively increasing the weight value by 0.5 for the components with 4-6 flow sequences; respectively increasing the weight values by 0.3 for components with 7-10 flow sequences; for other components whose port traffic is not 0, the weight is increased by 0.1.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the performing the remote data redundant backup on the file including the key information specifically includes:
packaging the third-party component configuration files and the daily logs in a user-defined quantity into a local directory, packaging the database contents and the key file directory contents into the local directory, and generating a compressed file;
uploading the compressed files to two non-local physical machines through specific account numbers respectively;
and emptying the local backup file directory every other week.
With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the packaging the database content and the key file directory content into the local directory specifically includes:
checking a server database log, if only reading operation is carried out, not backing up the database content, otherwise, packaging the database content to a local directory;
and carrying out security check on the key file directory uploaded by the server user side on the same day, packaging the key file directory to a local directory, and stopping backing up the directory if an illegal file format occurs.
The second aspect of the present invention provides a server key information timing backup device, including:
the port flow monitoring module is used for monitoring the port flow information of the third-party component of the server;
the weight updating module updates and sequences the weight of the third-party component according to the port flow information;
and the redundancy backup module is used for carrying out remote data redundancy backup on the files containing the key information.
The server key information timing backup device of the second aspect of the present invention implements the methods of the first aspect and the implementation manners of the first aspect, and achieves the same effects.
The effect provided in the summary of the invention is only the effect of the embodiment, not all the effects of the invention, and one of the above technical solutions has the following advantages or beneficial effects:
the invention realizes data redundancy for the key information file while locally backing up, so as to further improve the safety of the data, ensure the integrity of the data and prevent single point failure. By adding a third-party component weight training mechanism, too much system resources and too much system resources occupied by a large number of repeated backups every day are reduced, only the top 10 or 15 of component configuration information and the daily log are taken for backup, the time cost of backup is greatly saved, and the daily backup work is more reasonable. The transmission mode of the ftp guarantees the authority of the uploading user, namely the safety of data, and meanwhile, the efficiency of data uploading is guaranteed because the establishment of the ftp is very easy to realize. The backup is carried out at regular time every day, so that the problems can be timely positioned, solved and the normal operation of the server is ensured. The efficiency and the safety are considered.
Drawings
FIG. 1 is a schematic flow diagram of the process of the present invention;
FIG. 2 is a flow chart of a second method of an embodiment of the invention;
FIG. 3 is a flow chart of a three-way method of an embodiment of the present invention;
FIG. 4 is a schematic diagram of the structure of the device of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
As shown in fig. 1, a first aspect of the present invention provides a method for regularly backing up key information of a server, including the following steps:
s1, monitoring the port flow information of the server third-party component;
s2, updating and sequencing the weight of the third-party component according to the port flow information;
and S3, performing allopatric data redundancy backup on the file containing the key information.
In step S1, the third-party component common ports and configuration files are summarized:
HTTP (Apache/Nginx) default port numbers are: 80; configuration files: httpd. conf/nginx. conf
Tomcat default port numbers are: 8080, a step of; configuration files: xml, tomcat-users xml, web xml, context xml
Openssl default port number is: 443; configuration files: cnf, Openssl
Mysql default port numbers are: 3306 (b); configuration files: my. cnf
oracle default port number is: 1521, a carrier gas supply device; configuration files: ora, tnsnames
DB2 default port number is: 5000; configuration files: SQLDBCONF (database parameter configuration file, read and modify data using get db cfg/update db cfg.)
PostgreSQL default port numbers are: 5432; configuration files: conf of postgresql
Rabbitmq default port numbers are: 15672, preparing a liquid medicine composition; configuration files: battle
Openssh default port numbers are: 22; configuration files: sshd _ config
telnet default port numbers are: 23; configuration files: c/xinetd.d/telnet
The snmp default port number is: UDP 161; configuration files: snmpd
kvm default port number is: 7578/7582 (ssl); configuration files: /etc/libvirt/qemu
Ports and third party components may be added as needed.
As shown in fig. 2, in step S2, the updating and sorting of the third-party component weight according to the port traffic information specifically includes:
s21, setting the initial value of the port weight of the third-party component to be 5;
s22, sequencing the ports from large to small periodically according to the flow, and updating the corresponding weight values;
and S23, sorting the three points in the morning every day according to the port weight value of the current third-party component.
In step S22, the method for periodically sorting the ports according to the flow rate from large to small, and updating the corresponding weight values specifically includes:
when the port flow is 0, the weight is unchanged; respectively increasing the weight values by 1 for the components with 1-3 flow sequences; respectively increasing the weight value by 0.5 for the components with 4-6 flow sequences; respectively increasing the weight values by 0.3 for components with 7-10 flow sequences; for other components whose port traffic is not 0, the weight is increased by 0.1.
As shown in fig. 3, in step S3, the performing the remote data redundant backup on the file containing the key information specifically includes:
s31, packaging the third-party component configuration files and the daily logs with the user-defined quantity into a local directory bkup, packaging the database content and the key file directory content into the local directory, and generating a compressed file. Tar (% y% m% d is date, in year, month, day format);
and S32, uploading the compressed files to two non-local physical machines through specific account numbers respectively. Uploading bkup% y% m% d.tar to a non-local physical machine A through a specific ftp account ftpulser 1; uploading bkup% y% m% d.tar to a non-local physical machine B through a specific ftp account ftpulser 2;
and S33, emptying the local backup file directory every other week.
In step S31, packaging the database content and the key file directory content into a local directory, which specifically includes:
s311, checking a database log of the server, if only reading operation is carried out, not backing up the content of the database, otherwise, packaging the content of the database to a local directory;
and S312, carrying out security check on the key file directory uploaded by the server user terminal on the same day, packaging the key file directory to a local directory, and stopping backing up the directory if an illegal file format occurs.
As shown in fig. 4, the server key information timing backup device includes:
the port flow monitoring module 11 is used for monitoring the port flow information of the third-party component of the server;
the weight updating module 12 is used for updating and sequencing the weight of the third-party component according to the port flow information;
and the redundancy backup module 13 is used for performing data redundancy backup on files containing key information in different places.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (4)

1. A method for backing up key information of a server at regular time is characterized by comprising the following steps: monitoring server third-party component port flow information; updating and sequencing the weight of the third-party components according to the port flow information; performing remote data redundancy backup on files containing key information;
the updating and sequencing of the third-party component weight according to the port flow information specifically includes: setting a third-party component port weight initial value; sequencing the ports from large to small periodically according to the flow, and updating the corresponding weight values; sequencing the fixed time points every day according to the port weight numerical values of the current third-party components;
the periodically sequencing the ports from large to small according to the flow, and updating the corresponding weight values specifically include: when the port flow is 0, the weight is unchanged; respectively increasing the weight values by 1 for the components with 1-3 flow sequences; respectively increasing the weight value by 0.5 for the components with 4-6 flow sequences; respectively increasing the weight values by 0.3 for components with 7-10 flow sequences; for the components with the other port flow not being 0, the weight is increased by 0.1;
and taking the component configuration information and the current day log of the top 10 or 15 for backup.
2. The method as claimed in claim 1, wherein the performing the allopatric data redundant backup of the file containing the key information specifically comprises: packaging the third-party component configuration files and the daily logs in a user-defined quantity into a local directory, packaging the database contents and the key file directory contents into the local directory, and generating a compressed file; uploading the compressed files to two non-local physical machines through specific account numbers respectively; and emptying the local backup file directory every other week.
3. The method as claimed in claim 2, wherein packaging the database contents and the key file directory contents into a local directory comprises: checking a server database log, if only reading operation is carried out, not backing up the database content, otherwise, packaging the database content to a local directory; and carrying out security check on the key file directory uploaded by the server user side on the same day, packaging the key file directory to a local directory, and stopping backing up the directory if an illegal file format occurs.
4. A server key information timing backup device is characterized by comprising: the port flow monitoring module is used for monitoring the port flow information of the third-party component of the server; the weight updating module updates and sequences the weight of the third-party component according to the port flow information; the redundancy backup module is used for carrying out long-distance data redundancy backup on the files containing the key information;
the updating and sequencing of the third-party component weight according to the port flow information specifically includes: setting a third-party component port weight initial value; sequencing the ports from large to small periodically according to the flow, and updating the corresponding weight values; sequencing the fixed time points every day according to the port weight numerical values of the current third-party components;
the periodically sequencing the ports from large to small according to the flow, and updating the corresponding weight values specifically include: when the port flow is 0, the weight is unchanged; respectively increasing the weight values by 1 for the components with 1-3 flow sequences; respectively increasing the weight value by 0.5 for the components with 4-6 flow sequences; respectively increasing the weight values by 0.3 for components with 7-10 flow sequences; for the components with the other port flow not being 0, the weight is increased by 0.1;
and taking the component configuration information and the current day log of the top 10 or 15 for backup.
CN201811316856.4A 2018-11-07 2018-11-07 Method and device for regularly backing up key information of server Active CN109542678B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811316856.4A CN109542678B (en) 2018-11-07 2018-11-07 Method and device for regularly backing up key information of server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811316856.4A CN109542678B (en) 2018-11-07 2018-11-07 Method and device for regularly backing up key information of server

Publications (2)

Publication Number Publication Date
CN109542678A CN109542678A (en) 2019-03-29
CN109542678B true CN109542678B (en) 2021-12-17

Family

ID=65846103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811316856.4A Active CN109542678B (en) 2018-11-07 2018-11-07 Method and device for regularly backing up key information of server

Country Status (1)

Country Link
CN (1) CN109542678B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110333968B (en) * 2019-06-12 2020-08-14 郑州轻工业学院 Data management method and device applied to database and computer equipment
CN115257878B (en) * 2022-08-18 2024-03-08 北京协同创新轨道交通研究院有限公司 Comprehensive monitoring system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5774642A (en) * 1990-08-09 1998-06-30 Bull S.A. Architecture for dynamic service processor exchange providing multitasking environment where multiple processors have access to a system configuration table
CN101179494A (en) * 2007-12-03 2008-05-14 浙江大学 Resource distribution method facing to network multimedia transmission service
CN103838860A (en) * 2014-03-19 2014-06-04 华存数据信息技术有限公司 File storing system based on dynamic transcript strategy and storage method of file storing system
CN104932956A (en) * 2015-06-19 2015-09-23 华南理工大学 Big-data-oriented cloud disaster tolerant backup method
CN105138422A (en) * 2015-08-10 2015-12-09 联想(北京)有限公司 Control method and electronic device
CN105608167A (en) * 2015-12-18 2016-05-25 金蝶软件(中国)有限公司 KDFS system-based file backup method and system
CN106293498A (en) * 2015-06-05 2017-01-04 华为技术有限公司 A kind of method and apparatus of data copy
CN107659460A (en) * 2017-11-09 2018-02-02 广东技术师范学院 A kind of method of provisioning API visit capacity
CN107846418A (en) * 2017-12-14 2018-03-27 广东天网安全信息科技有限公司 Fire wall Initiative Defence System and means of defence
CN108363643A (en) * 2018-03-27 2018-08-03 东北大学 A kind of HDFS copy management methods based on file access temperature
CN108536552A (en) * 2018-04-17 2018-09-14 北京搜狐新媒体信息技术有限公司 The redundancy backup processing method and processing device of data

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5774642A (en) * 1990-08-09 1998-06-30 Bull S.A. Architecture for dynamic service processor exchange providing multitasking environment where multiple processors have access to a system configuration table
CN101179494A (en) * 2007-12-03 2008-05-14 浙江大学 Resource distribution method facing to network multimedia transmission service
CN103838860A (en) * 2014-03-19 2014-06-04 华存数据信息技术有限公司 File storing system based on dynamic transcript strategy and storage method of file storing system
CN106293498A (en) * 2015-06-05 2017-01-04 华为技术有限公司 A kind of method and apparatus of data copy
CN104932956A (en) * 2015-06-19 2015-09-23 华南理工大学 Big-data-oriented cloud disaster tolerant backup method
CN105138422A (en) * 2015-08-10 2015-12-09 联想(北京)有限公司 Control method and electronic device
CN105608167A (en) * 2015-12-18 2016-05-25 金蝶软件(中国)有限公司 KDFS system-based file backup method and system
CN107659460A (en) * 2017-11-09 2018-02-02 广东技术师范学院 A kind of method of provisioning API visit capacity
CN107846418A (en) * 2017-12-14 2018-03-27 广东天网安全信息科技有限公司 Fire wall Initiative Defence System and means of defence
CN108363643A (en) * 2018-03-27 2018-08-03 东北大学 A kind of HDFS copy management methods based on file access temperature
CN108536552A (en) * 2018-04-17 2018-09-14 北京搜狐新媒体信息技术有限公司 The redundancy backup processing method and processing device of data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
云存储环境下分布式文件系统的副本策略研究;匡士杰;《万方平台》;20160603;全文 *

Also Published As

Publication number Publication date
CN109542678A (en) 2019-03-29

Similar Documents

Publication Publication Date Title
CN110427307A (en) Log analytic method, device, computer equipment and storage medium
CN104572357A (en) Backup and recovery method for HDFS (Hadoop distributed filesystem)
CN101854392B (en) Personal data management method based on cloud computing environment
EP3304310B1 (en) System and method for automatic cloud-based full-data backup and restore on mobile devices
EP2344910B1 (en) Intelligent data acquisition in an oil and gas field
CN103095829B (en) Realize the network contact list system of version management and rights management
CN109542678B (en) Method and device for regularly backing up key information of server
CN106992876A (en) Cloud platform blog management method and system
CN101410801A (en) Weighted determination in configuration management systems
US10585762B2 (en) Maintaining files in a retained file system
CN112286905A (en) Data migration method and device, storage medium and electronic equipment
CN102609337A (en) Rapid data recovery method for memory database
CN102104500A (en) Automatic network management equipment abnormity restoring method
CN102891873A (en) Method for storing log data and log data storage system
CN109460343A (en) System exception monitoring method, device, equipment and storage medium based on log
WO2022126974A1 (en) Kafka-based incremental data synchronization method and apparatus, device, and medium
US20150066866A1 (en) Data health management
CN106817253A (en) The monitor in real time of journal file and the method and system of alarm
CN108197008A (en) A kind of log collecting method, system, device and computer readable storage medium
CN103856354A (en) Method for achieving unified management of logs of cluster storage system
CN109240917A (en) A kind of blog management method and relevant apparatus
CN109582504A (en) A kind of data reconstruction method and device for apple equipment
CN105022751A (en) Log recording method and system as well as log reproduction method and system
CN103973486A (en) Log management system based on B/S structure
CN104156369A (en) Database mirror making method and database

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