Backup method and device for MongoDB database, recovery method and device for MongoDB database, electronic equipment and storage medium

A database and data technology, applied in the field of cloud services, can solve problems such as occupation and multi-storage space

Active Publication Date: 2020-08-04
BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF12 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the technical solutions for the backup and recovery or migration of MongoDB incremental data have not been particularly ideal. However, full backups require more storage space

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Backup method and device for MongoDB database, recovery method and device for MongoDB database, electronic equipment and storage medium
  • Backup method and device for MongoDB database, recovery method and device for MongoDB database, electronic equipment and storage medium
  • Backup method and device for MongoDB database, recovery method and device for MongoDB database, electronic equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0099] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangements of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

[0100] The following description of at least one exemplary embodiment is merely illustrative in nature and in no way taken as limiting the invention, its application or uses.

[0101] Techniques, methods and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, such techniques, methods and devices should be considered part of the description.

[0102] In all examples shown and discussed herein, any specific values ​​should be construed as exemplary only, and not as limitations. Therefore, other instances of the exemplary embodiment may have dif...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention discloses a backup method and device for an MongoDB database, a recovery method and device for the MongoDB database, electronic equipment and a storage medium. The backup method comprises the following steps: acquiring a first timestamp; sequentially pulling a plurality of database operation logs from the MongoDB database by taking the first timestamp as starting time; classifying the plurality of pulled database operation logs to obtain a data definition language operation log and a data manipulation language operation log; wherein the data definition languageoperation log is used for recording changes of a data structure corresponding to the MongoDB database, and the data manipulation language operation log is used for recording changes of data corresponding to the MongoDB database; and sequentially writing the data definition language operation log into the first temporary file to generate a first file, and sequentially writing the data manipulationlanguage operation log and the data definition language operation log into the second temporary file to generate a second file. According to the embodiment of the invention, the incremental data backup of the MongoDB database can be quickly written into the file, so that the storage space required by data backup is reduced.

Description

technical field [0001] The invention relates to the technical field of cloud services, in particular to a method, device, electronic equipment and storage medium for backing up and restoring a MongoDB database. Background technique [0002] MongoDB is a database based on distributed file storage. It is a product between relational databases and non-relational databases, and can store more complex data types. For the MongoDB database, MongoDB data is the core, so data security and easy migration are also critical. At present, there is physical backup support for MongoDB full data backup, that is, the entire folder of MongoDB data can be copied. However, the technical solutions for the backup and recovery or migration of MongoDB incremental data have not been particularly ideal. However, full backups require more storage space. Due to the limited storage capacity of the internal database operation log (Oplog) of the MongoDB database, it is urgent to propose a technical means...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/14G06F16/17G06F16/18G06F16/182
CPCG06F11/1453G06F16/1734G06F16/1815G06F16/182Y02D10/00
Inventor 陈青松李晓静宫伯钊
Owner BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products