Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Shared mysql database backup and recovery method and device

A recovery method and data backup technology, applied in database distribution/replication, database design/maintenance, structured data retrieval, etc., can solve problems such as large local disk space occupation, accelerated data recovery time, long recovery time, etc., to achieve guaranteed Integrity, reduced backup time, reduced stress effects

Inactive Publication Date: 2020-01-10
GUANGDONG EFLYCLOUD COMPUTING CO LTD
View PDF0 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The technical problem to be solved by the present invention is to provide a shared mysql database backup and recovery method and its device, which solves the current problems of too long backup time, long recovery time and large local disk space occupation, and increases the reliability of backup. Guarantees the integrity of data recovery and speeds up data recovery time

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
  • Shared mysql database backup and recovery method and device
  • Shared mysql database backup and recovery method and device
  • Shared mysql database backup and recovery method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0038] like figure 1 As shown, the present invention provides a backup and recovery method for a shared mysql database, comprising the following steps:

[0039] S101. Build a ceph distributed storage cluster, create a ceph file system cephfs, and provide two mysql databases as storage; in order to ensure the synchronization and integrity of data, multiple mon nodes can be deployed, and then multiple nodes can be mounted to ensure service availability High availability, when a node is down, it will not affect data reading and writing;

[0040] S102, mount the ceph file system cephfs, and create a data directory; under the data directory, create a full directory and an incre directory, which are respectively used to store full backup data and incremental backup data; under the data directory, create a mysql1 directory and a mysql2 directory , which are used to store the files of two mysql databases, the mysql database socket sock under the mysql1 directory, and the mysql databa...

Embodiment 2

[0048] like image 3 As shown, the present embodiment provides a shared mysql database backup and recovery device, including:

[0049] The storage cluster unit is used to build a ceph distributed storage cluster and create a ceph file system cephfs;

[0050] The database unit is used to provide several databases to store data; the database unit includes a mysql database system module, and the mysql database system module is used to adjust the mysql configuration file; the mysql database system module includes a keepalived module, and the keepalived module uses It is used to detect the heartbeat service of the mysql database in real time;

[0051] A directory creation unit is used to create a data directory, and under the data directory, create a full directory, an incre directory, a mysql1 directory and a mysql2 directory;

[0052] The data backup unit is used to back up data, and the data backup includes full backup, incremental backup and differential backup; the data back...

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 invention discloses a shared mysql database backup and recovery method and device, and the method comprises the steps: a ceph distributed storage cluster is built, and two mysql databases are provided for storage; a mysql1 directory and a mysql2 directory which are respectively used for storing files of the two mysql databases are created; the two mysql database systems adjust mysql configuration files, and the positions, used for being stored on a cephfs system catalogue, of a lock and a binary log binlog of each mysql database system are modified respectively; heartbeat service detectionis carried out on the two mysql databases, and when the mysql-master fails, data recovery is triggered; before data recovery is triggered, data needs to be backed up, wherein data backup comprises full backup, incremental backup and differential backup; after each time of differential backup, a data recovery process needs to be carried out once; and when the mysql-master breaks down, the mysql-master is immediately switched to the mysql-backup to continue to serve, and the latest incremental backup in the ceph distributed storage cluster is extracted. According to the method, the reliabilityof backup is improved, the integrity of data recovery is ensured, and the data recovery time is shortened.

Description

technical field [0001] The invention relates to the field, in particular to a method and device for backing up and restoring a shared mysql database. Background technique [0002] MySQL is an open source relational database management system. Compared with other databases, MySQL is a bit different. Its architecture can be applied in many different scenarios and play a good role, mainly reflected in the architecture of the storage engine, plug-ins The traditional storage engine architecture separates query processing from other system tasks and data storage and retrieval. This architecture can select an appropriate storage engine according to business needs and actual needs. [0003] mysqldump is a tool used for database backup and data transfer. Generally, it can be used for backup when the amount of data is small (several gigabytes). When the amount of data is relatively large, it is not recommended to use the mysqldump tool for backup. Among them, mysqldump is a very pr...

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/21G06F16/27
CPCG06F11/1448G06F16/21G06F16/27
Inventor 梁永堂史伟闵宇
Owner GUANGDONG EFLYCLOUD COMPUTING CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products