WO2013123703A1 - Dispositif et procédé de sauvegarde de données, et dispositif et procédé de récupération de données d'un système de gestion de réseau - Google Patents

Dispositif et procédé de sauvegarde de données, et dispositif et procédé de récupération de données d'un système de gestion de réseau Download PDF

Info

Publication number
WO2013123703A1
WO2013123703A1 PCT/CN2012/074018 CN2012074018W WO2013123703A1 WO 2013123703 A1 WO2013123703 A1 WO 2013123703A1 CN 2012074018 W CN2012074018 W CN 2012074018W WO 2013123703 A1 WO2013123703 A1 WO 2013123703A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
database
backup
data table
file
Prior art date
Application number
PCT/CN2012/074018
Other languages
English (en)
Chinese (zh)
Inventor
吴雁峰
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013123703A1 publication Critical patent/WO2013123703A1/fr

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0853Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information
    • H04L41/0856Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information by backing up or archiving configuration information

Definitions

  • the present invention relates to the field of communications, and in particular to a data backup method, apparatus, and recovery method and apparatus for a network management system.
  • a method for backing up and restoring important data is provided.
  • the database structure is first accessed during backup.
  • the database structure writes a Structured Query Language (SQL) statement, and uses the SQL statement to generate an executable sequence file that is first emptied and then inserted one by one.
  • SQL Structured Query Language
  • the database engine can be used to directly run the executable sequence file to recover all the backed up data.
  • This backup recovery method conforms to the programmer's programming habits. At the same time, it also realizes online backup and recovery.
  • the backup and recovery schemes of the related technologies have the following disadvantages: With the improvement of the network management capability of the network management system, the number of base stations that can be managed by one network management system can reach 1500. As the number of management base stations increases, backup and recovery are required. The data is also increased in geometry, and data is backed up and restored in the past. A large LAN data backup takes 10 minutes and data recovery takes 50 minutes. Such a slow backup and recovery speed obviously does not meet the user's requirements.
  • the backup and recovery mode of the network management system uses the SQL script sequence. The SQL script sequence can be used to intuitively understand the data configured in the current system, but the user can modify the data in the script sequence.
  • the present invention provides a data backup method, apparatus, and recovery method and apparatus for a network management system to at least solve the problem that data backup and recovery in a related art takes a long time.
  • a data backup method of a network management system including: reading a data table in a database that needs to be backed up; and writing data in the data table into a pre-designated text file in a binary format.
  • reading the data table that needs to be backed up in the database comprises: obtaining a list of table names of the data tables that need to be backed up in the database; and reading the data table corresponding to each data table name in the table name list in the database.
  • reading the data table corresponding to each data table name in the table name list in the database comprises: reading the data table corresponding to each data table name in the order of the table name list.
  • writing the data in the data table in a binary format to the pre-designated text file comprises: writing the data in each data table in a binary format to a separate text file specified in advance.
  • the method further comprises: encrypting the text file.
  • the method further includes: compressing the encrypted text file; and storing the compressed text file in the designated area.
  • a data recovery method of a network management system comprising: reading a backup file stored in a binary format in advance from a specified area; and importing the backup file into a database.
  • reading the backup file stored in the binary format in advance from the specified area comprises: reading the table name from the table name list of the data table pre-generated by the system; reading each data in the specified area and the table name list
  • importing the backup file into the database comprises: respectively importing the backup file stored in the binary format in advance into the data table corresponding to the table name in the database.
  • the method before reading the table name from the list of table names of the data table pre-generated by the system, the method further includes: checking whether the data of the binary text is modified; in the case that the data is not modified, the table name from the system Read the table name in the list.
  • a data backup device for a network management system comprising: a reading module configured to read a data table in a database that needs to be backed up; and a writing module configured to binary the data in the data table The format is written to a pre-specified text file.
  • a data recovery device for a network management system comprising: a reading module configured to read a backup file stored in a binary format in advance from a designated area; importing a module, setting the backup to be performed The file is imported into the database.
  • FIG. 2 is a flowchart of a data backup method of a network management system according to a preferred embodiment of the present invention
  • FIG. 4 is a flowchart of a data recovery method in a network management system according to a preferred embodiment of the present invention
  • FIG. 5 is a data backup device of a network management system according to an embodiment of the present invention
  • Figure 6 is a block diagram showing the structure of a data backup device of a network management system according to a preferred embodiment of the present invention
  • Figure 7 is a block diagram showing the structure of a data backup device of a network management system according to a preferred embodiment of the present invention
  • FIG. 9 is a structural block diagram of a data recovery device of a network management system according to an embodiment of the present invention
  • FIG. 9 is a structural block diagram of a data recovery device of a network management system according to an embodiment of the present invention
  • FIG. 10 is a block diagram of a data recovery device of a network management system according to an embodiment of the present invention
  • FIG. 11 is a block diagram of a data recovery device of a network management system according to a preferred embodiment of the present invention
  • FIG. Two block diagram is a block diagram showing recovery means third data network management system according to a preferred embodiment of the present invention.
  • a list of table names for storing all the data tables in the database that need to be backed up and restored is obtained from the system.
  • the corresponding data table name is retrieved from the table name list file in order, and according to the data table name, the packaged Bulk Copy (BCP) tool is used to find the specified database.
  • BCP packaged Bulk Copy
  • This data table, and all the data in this data table is written in a binary format to a pre-designated text file, and then a data table name is removed from the list file, and the above operation is repeated, and all the tables in the database are All are converted into binary text files, and then the binary text file is encrypted by Cyclic Redundancy Check (CRC). Finally, the encrypted text file is compressed and stored in the specified directory of the system. .
  • CRC Cyclic Redundancy Check
  • Step S102 reading a data table in the database that needs to be backed up.
  • Step S104 the data in the data table is written in a binary format into a pre-designated text file.
  • an executable sequence file generated according to the data table to be backed up is directly backed up, and the backup process takes a long time.
  • the data in the data table to be backed up is backed up in a binary format. Reduces the time it takes to back up and improves the user experience.
  • the table name list of the data table to be backed up in the database may be obtained first, and then each data table name in the database and the table name list is read.
  • Corresponding data table. First generate a list and then back up one by one, you can avoid missing the data table to be backed up.
  • the backup process is interrupted, you can know which data has been backed up and which data tables have not been backed up by the list, so that it is backed up. Continue to complete the remaining backups, improving the efficiency of the backup.
  • each data table name may be read in the order of the table name list.
  • the data Table Compared with reading the first letter of the table name, reading according to the file size of the data table, or reading according to the modification time of the data table, it is more convenient to read the data table directly in the order of the list, and at the same time.
  • the step of storing the correspondence between the table name and the data table saves backup time and storage space.
  • the data in each data table can be separately written into a pre-designated independent text file in a binary format.
  • the backup to be backed up is performed.
  • the data table is all loaded into the memory for processing. Since the file is large, it occupies a large amount of memory and CPU resources. With this embodiment, the system only needs to load data of one data table at a time, which greatly reduces the memory and CPU usage, and makes the system Run a more process.
  • the text file can also be encrypted in order to prevent the backup data from being modified. In order to save the storage space, the encrypted text file can also be compressed, and then the compressed text file is stored in the designated area.
  • FIG. 2 is a flowchart of a data backup method of a network management system according to a preferred embodiment of the present invention.
  • data backup is to be specified in a database that needs to be backed up in advance.
  • the data table or the view name list is processed in a single table by the batch command in the BCP tool, and the data in the table is stored in a binary format and stored in a binary file, and the following steps S202 to S216 are included.
  • Step S202 starting a backup operation.
  • Step S204 reading the library table sequence from the file or the database.
  • step S206 the data table name or the view name is read in the order of indicating the list, so that all fields in the table or view to be backed up are read.
  • Step S208 sequentially extracting a table name from the container 1 into the variable "dbtablename", and then using this variable
  • the "dbtablename” executes the encapsulated BCP tool for the input parameters.
  • a command that the database engine can recognize is automatically constructed.
  • the format of the command in this embodiment is as follows: Bcp ⁇ dbtablename ⁇ ⁇ out ⁇ filename -c -k -t & -a65535 -S database IP, port number -U username -P password This command can take various parameters,
  • “-c” means that the data in the exported table is stored in character type
  • "-k” means that the record in the exported table will automatically retain the null value if the value of a field is empty
  • “-t” means to The terminator of the field is used as the termination of each field value.
  • "&” is used as the termination.
  • "-a” indicates the maximum packet size of the text file that can be exported.
  • 65536 is used to make it large enough to support large data volume.
  • “-S” indicates the name or IP of the database server to be exported
  • "-U” indicates the user name of this database
  • “-P” indicates the database password corresponding to this database.
  • the system After calling the database engine to execute this command, the system will store all the data in the data table in the database with the variable "dbtablename" as the table name in binary format to the file under the specified file path, where the file name convention is:
  • the fixed file name prefix "_dbtablename.txt” ensures that each data table generates a unique binary text file. Since the data is read in this embodiment, it is not necessary to distinguish the type of each field in each table, nor the information of each field in the table is stored, and the file is written in a compact binary byte stream sequence. Into the text, so it is very efficient to back up the database data in this way, and the data in the binary format file is 01 data, the compression efficiency is the highest.
  • Step S210 determining whether the data table in the table name list has been read, if yes, executing step S212; if not, reading the next table name in the container 1, repeating the operation of step S208 until the container 1 is All the data tables have done the above.
  • Step S212 performing encryption processing on the data stored in the file in the binary file format in the specified file path, and generating a string of encrypted characters stored in the specified text file CRC.txt, the encrypted characters being used for verifying data recovery Whether the backed up data has been modified.
  • Step S214 compressing and packaging all the generated binary files and the CRC.txt file, storing the files in a customized .dat format, and placing them in a user-specified directory.
  • FIG. 3 is a flowchart of a data recovery method of a network management system according to an embodiment of the present invention, which includes the following steps S302 to S304.
  • Step S302 reading a backup file stored in a binary format in advance from the designated area.
  • Step S304 importing the backup file into the database.
  • a pre-generated executable sequence file is directly restored when data is restored, and the recovery process takes a long time.
  • the data table backed up in a binary format is restored, which shortens the time used for recovery.
  • the table name may be read from the table name list of the data table pre-generated by the system, and then the backup stored in the binary format corresponding to each data table name in the table name list in the specified area is read.
  • the files are restored one by one according to the table name list of the data table, and the data table to be restored can be avoided.
  • the list can know which data has been recovered, which data tables have not been recovered, and thus On the basis of recovery, the remaining recovery is continued, which improves the efficiency of recovery.
  • the backup file stored in the binary format in advance may be separately imported into the data table corresponding to the table name in the database.
  • the CRC check is performed first, and the restored data is checked whether the data has not been modified, and only the data that has not been tampered with can be resumed.
  • the data existing in the database is cleared first.
  • the data to be restored is decompressed, decompressed into text files, and the table name is taken out from the list of table names in order according to the list of table names obtained from the system, and then the BCP tool encapsulated in this embodiment is used.
  • the data in the binary text is all imported into the corresponding table of the database, the table name in the table name list file is sequentially manipulated, until all the data of the text file has been imported into the database table, and the recovery is completed.
  • FIG. 4 is a flowchart of a data recovery method in a network management system according to a preferred embodiment of the present invention.
  • data backup and recovery occur in the same database management software.
  • the list of table names to be backed up specified in the data backup process is also one-to-one corresponding to the data recovery process.
  • the recovery data is an inverse process of the backup data, and the specific steps include the following steps S402 to S414.
  • step S402 a recovery operation is started.
  • Step S404 performing a decompression algorithm process on the file specified by the user in the .dat format.
  • Step S406 performing decryption processing on the decompressed binary file, and also generating a string of encrypted character strings, and comparing the string encrypted string with the encrypted string stored in the CRC.txt file, if the two strings are not Similarly, if the backed up data has been modified, it is not allowed to be restored to the system. If the two strings are the same, it means that the data has not been modified since the backup, then the operation of step S408 is performed; if two strings are If not, proceed to step S414.
  • Step S408 reading the table name or the view name in the database table name list file specified in advance, storing all the read table or view name information into a container 2, and comparing whether the number of table names in the container is It is equal to the number of binary files, and data recovery is performed when they are equal.
  • Step S410 sequentially extracting a table name "dbtablename" from the container 2, and then executing the packaged BCP tool, the program automatically constructs a command of the BCP tool that the database engine can recognize: bcp ⁇ dbtablename ⁇ ⁇ in ⁇ filename-c -k -t & -a65535 -S Database IP, Port Number - U Username -P Password
  • this embodiment divides all the table data in the database into a single text file, which reduces the system memory consumption during recovery and reduces the risk of memory overflow of the system running.
  • the entire recovery file needs to be loaded into the memory for processing. Since the file is large, the memory and CPU resources are very consumed.
  • the system only loads data in one file at a time, which greatly reduces the memory and CPU consumption makes the system run more smoothly.
  • Step S412 determining whether there is still a binary file to be imported, if yes, taking the next table name in the container 2, repeating the operation of step S408 until the above operations are performed on all the data tables in the container 2, and the recovery is completed; If no, the process proceeds to step S414.
  • step S414 the recovery operation is completed, and the recovery ends.
  • FIG. 5 is a structural block diagram of a data backup device of a network management system according to an embodiment of the present invention. As shown in FIG. 5, a read module 52 and a write module 54 are included. The structure is described in detail below.
  • the reading module 52 is configured to read a data table in the database that needs to be backed up; the writing module 54, connected to the reading module 52, is configured to write the data in the data table into a pre-designated text file in a binary format.
  • 6 is a structural block diagram of a data backup device of a network management system according to a preferred embodiment of the present invention. As shown in FIG. 6, the reading module 52 includes: an obtaining submodule 522, configured to acquire a table of data tables in the database that need to be backed up. Name list.
  • the read sub-module 524 is connected to the acquisition sub-module 522 and configured to read the data table corresponding to each data table name in the table name list in the database.
  • FIG. 7 is a block diagram showing the structure of a data backup device of a network management system according to a preferred embodiment of the present invention.
  • the write module 54 includes: a write submodule 542 configured to set data in each data table. The binary format is written to a separate text file specified in advance.
  • FIG. 8 is a structural block diagram 3 of a data backup apparatus of a network management system according to a preferred embodiment of the present invention. As shown in FIG. 8, the apparatus further includes: an encryption apparatus 56 configured to encrypt a text file.
  • the compression module 58 coupled to the encryption device 56, is configured to compress the encrypted text file.
  • the storage module 510 is coupled to the compression module 58 and configured to store the compressed text file to a designated area.
  • the embodiment of the invention provides a data recovery device of the network management system, and the device can be configured to implement a data recovery method of the network management system.
  • FIG. 9 is a structural block diagram of a data recovery device of a network management system according to an embodiment of the present invention. As shown in FIG. 5, a read module 92 and an import module 94 are included. The structure is described in detail below.
  • the reading module 92 is configured to read a backup file previously stored in a binary format from the designated area.
  • the import module 94 connected to the read module 92, is arranged to import the backup file into the database.
  • the reading module 92 includes: a first reading submodule 922, which is set as a data table pre-generated from the system. The table name is read in the table name list; the second reading sub-module 924 is connected to the first reading sub-module 922, and is set to read the binary format in the specified area corresponding to each data table name in the table name list. Stored backup files.
  • 11 is a block diagram showing the structure of a data recovery device of a network management system according to a preferred embodiment of the present invention, as shown in FIG.
  • the import module 94 includes: an import submodule 942, which is configured to respectively import a backup file stored in a binary format in advance into a data table corresponding to the table name in the database.
  • 12 is a structural block diagram 3 of a data recovery apparatus of a network management system according to a preferred embodiment of the present invention. As shown in FIG. 12, the apparatus further includes: a verification module 96, configured to check whether data of the binary text is modified. It should be noted that the data backup device of the network management system and the data recovery device of the network management system described in the device embodiment correspond to the foregoing method embodiments, and the specific implementation process has been described in detail in the method embodiment. No longer.
  • the present invention uses a binary format to back up and restore data, shortens the time taken for backup, and has industrial applicability.
  • modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device, or they may be separately fabricated into individual integrated circuit modules, or they may be Multiple modules or steps are made into a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

L'invention concerne un dispositif et un procédé de sauvegarde de données ainsi qu'un dispositif et un procédé de récupération de données d'un système de gestion de réseau. Le procédé de sauvegarde de données du système de gestion de réseau comprend : la lecture d'une table de données devant être sauvegardée à partir d'une base de données (S102); et l'écriture, dans un format binaire, des données dans la table de données dans un fichier de texte pré-attribué (S104). Les procédés et dispositifs permettent de résoudre le problème de la sauvegarde et de la récupération de données qui prennent beaucoup de temps, ce qui permet d'obtenir une sauvegarde et récupération de données rapides.
PCT/CN2012/074018 2012-02-22 2012-04-13 Dispositif et procédé de sauvegarde de données, et dispositif et procédé de récupération de données d'un système de gestion de réseau WO2013123703A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210040695.7 2012-02-22
CN2012100406957A CN102624545A (zh) 2012-02-22 2012-02-22 网管系统的数据备份方法、装置和恢复方法、装置

Publications (1)

Publication Number Publication Date
WO2013123703A1 true WO2013123703A1 (fr) 2013-08-29

Family

ID=46564236

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/074018 WO2013123703A1 (fr) 2012-02-22 2012-04-13 Dispositif et procédé de sauvegarde de données, et dispositif et procédé de récupération de données d'un système de gestion de réseau

Country Status (2)

Country Link
CN (1) CN102624545A (fr)
WO (1) WO2013123703A1 (fr)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804463B (zh) * 2017-05-03 2021-07-09 杭州海康威视数字技术股份有限公司 一种MySQL数据库的数据同步方法、装置及电子设备
CN108255938A (zh) * 2017-12-07 2018-07-06 中国航空工业集团公司西安航空计算技术研究所 一种机载嵌入式内存数据库映像生成和加载方法
CN109213635B (zh) * 2018-09-11 2020-10-30 许继集团有限公司 一种录波装置的损坏数据表修复方法及系统
CN111580838A (zh) * 2019-02-18 2020-08-25 深圳市致趣科技有限公司 一种zigbee网络恢复和备份方法及系统
CN110851171B (zh) * 2019-11-09 2023-08-11 许继集团有限公司 一种嵌入式平台功能配置方法、配置工具及系统
CN114491652A (zh) * 2022-04-19 2022-05-13 广州市保伦电子有限公司 一种数据库数据加密备份及解密还原的方法及处理终端

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1517918A (zh) * 2003-01-17 2004-08-04 深圳市中兴通讯股分有限公司 一种备份和恢复重要数据的方法
CN1549128A (zh) * 2003-05-15 2004-11-24 深圳市中兴通讯股份有限公司南京分公 一种数据库备份方法
CN101202644A (zh) * 2006-12-15 2008-06-18 中兴通讯股份有限公司 数据备份和恢复方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7523098B2 (en) * 2004-09-15 2009-04-21 International Business Machines Corporation Systems and methods for efficient data searching, storage and reduction

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1517918A (zh) * 2003-01-17 2004-08-04 深圳市中兴通讯股分有限公司 一种备份和恢复重要数据的方法
CN1549128A (zh) * 2003-05-15 2004-11-24 深圳市中兴通讯股份有限公司南京分公 一种数据库备份方法
CN101202644A (zh) * 2006-12-15 2008-06-18 中兴通讯股份有限公司 数据备份和恢复方法

Also Published As

Publication number Publication date
CN102624545A (zh) 2012-08-01

Similar Documents

Publication Publication Date Title
US10102242B2 (en) Bulk initial download of mobile databases
CN107832406B (zh) 海量日志数据的去重入库方法、装置、设备及存储介质
WO2013123703A1 (fr) Dispositif et procédé de sauvegarde de données, et dispositif et procédé de récupération de données d'un système de gestion de réseau
CN112328435B (zh) 目标数据备份和恢复的方法、装置、设备及存储介质
KR102319657B1 (ko) 저장된 데이터 유닛들의 동작 관리
CN106874348B (zh) 文件存储和索引方法、装置及读取文件的方法
CN103384884A (zh) 一种文件压缩方法、文件解压缩方法、装置及服务器
KR102275431B1 (ko) 저장된 데이터 유닛들의 동작 관리
CN110166221B (zh) 一种密文数据压缩存储结构rcpe及数据动态读写方法
CN114556304B (zh) 网络可访问块级快照
US20110307471A1 (en) Accelerating Database Management System Operations
WO2017045491A1 (fr) Procédé et système de mise à niveau d'une base de données intégrée sqlite3
CN112612576B (zh) 虚拟机备份方法、装置、电子设备及存储介质
CN111966631A (zh) 一种可快速分发的镜像文件生成方法、系统、设备和介质
WO2022082891A1 (fr) Procédé et système d'acquisition de mégadonnées, dispositif informatique et support associé de stockage
CN110333876A (zh) 一种数据清除方法及控制设备
CN111078279A (zh) 字节码文件的处理方法、装置、设备及存储介质
KR102275240B1 (ko) 저장된 데이터 유닛들의 동작 관리
CN113961226B (zh) 一种软件开发工具包修复方法、终端、服务器及设备
US11762738B2 (en) Reducing bandwidth during synthetic restores from a deduplication file system
CN108133026B (zh) 一种多数据的处理方法、系统及存储介质
CN111427860A (zh) 分布式存储系统及其数据处理方法
CN113741954A (zh) 系统软件生成方法、装置、电子设备及存储介质
EP3764224A1 (fr) Procédé et appareil d'autorisation de ressource ainsi que support d'informations et puce
US10311021B1 (en) Systems and methods for indexing backup file metadata

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12869051

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12869051

Country of ref document: EP

Kind code of ref document: A1