Backup and file back mechanism of tcapsusdb

Time:2021-5-11

Backup and file back mechanism of tcapsusdb

With the rapid development of e-commerce and office online, enterprises are more and more dependent on information system. Database, as the core of information system, plays an important role. For the database, due to the huge amount of data and very important, every data loss may be a great loss.

But in the actual operation process, no one can completely guarantee that the data will not be lost or damaged at all. Therefore, in order to prevent the loss caused by accidental deletion and natural disasters, and ensure the consistency of the database, database backup is necessary.

For a database, data backup is very important, so it is necessary for DBAs to understand the principle of database backup, which can help them deal with database backup better.

Tcapsusdb, as a NoSQL distributed database, has a perfect data backup system. Next, tcapsusdb will introduce how tcapsusdb performs cold standby and file back to ensure the data security of customers.

Cold standby

At present, tcapsusdb supports two ways of data backup: full data file cold backup, which is carried out regularly every day. After the table is created, there is a script to back up and store the data file automatically, and the storage cycle of full backup file is 25 days; The other is incremental backup, which is the backup of the changed data based on the last full or incremental backup. It is mainly based on the binlog of tcapsusdb, once every 15 minutes, and the incremental pipeline storage period is 15 days. Through the combination of the two ways of backup, the ability of rapid recovery through backup during the abnormal period of the system is guaranteed. When the service data is landed in the storage node, CRC verification will fail if the data is tampered, and the wrong data will not be returned to the user.

Cold backup refers to the backup after the database is shut down. When the backup node of tcapsusdb is in full cold backup, the full data file is in a completely static state at the start time of cold backup. At this time, the full data is backed up by byte copy, and there is no consistency problem at all. During the cold standby period, the front-end reading and writing are not affected at all. New requests will write small modification sets, and requests will merge the full amount of data and small modification sets.

Retreated

Tcapsusdb supports two methods of file return:

File return mode describe Support mode
Cold standby back to gear Use the backup file back to the cold standby time point, accurate to milliseconds. Temporarily supported by work order
Accurate file return Use the backup file and binlog file back to any specified point in time, accurate to milliseconds. Temporarily supported by work order

The following four kinds of return ranges are supported: cold standby return and precise return

Scope of file return describe Support mode
Full service return All tables are back to file Temporarily supported by work order
Single table back to file File back only for single table Temporarily supported by work order
Record file back For a single record, you can specify key Tencent cloud console support
Conditional file back Specify the filter conditions, such as the key to be returned Temporarily supported by work order

The above is the introduction of tcapsusdb cold standby and back filing system. In the following tcapsusdb knowledge base series, tcapsusdb will reveal more principles and secrets of tcapsusdb design. Please look forward to it!


Tcapsusdb is a distributed NoSQL database produced by Tencent. The code for storage and scheduling is completely self-developed. It has the characteristics of cache + landing fusion architecture, Pb level storage, millisecond delay, lossless horizontal expansion and complex data structure. At the same time, it has the characteristics of rich ecology, convenient migration, extremely low operation and maintenance cost and five nine high availability. Customers cover games, Internet, government affairs, finance, manufacturing and Internet of things.