Nowadays, all kinds of Internet applications carry a large amount of user data, and user experience is closely related to it. In addition to data reading and writing speed, data protection is also crucial. If a server failure, network attack or operation error leads to the loss of data, such as the loss of music users’ playlists and reviews, the disappearance of game players’ props or even abnormal accounts, these experiences are undoubtedly very bad. TcaplusDB has two backup strategies. This article describes the timing of the backup operation.

  1. Every TcaplusDB environment that operates online has a scheduled backup policy

    1. At 1:05 am every day, all Tcapsvr slaves automatically perform cold data backup (TXH + CFG)

    2. All Tcapsvr slaves automatically perform incremental flow backup (Ulog) every 15 minutes

    3. The current Tcapsvr Master also automatically performs incremental stream ignore backup (Ulog) within 50 hours after a failover or failover occurs.

  2. For a newly built environment, automatic scheduled backup needs to be manually enabled as follows:

    1. Log in to the Tcapcenter machine using SSH as tCAPlus account. cd /data/tcaplus/tcaplus_service/bin/tcaplus_backup_script/backup_script_for_overseas/mysql_tcaplus_backup_script; cp config_info.txt.template config_info.txt

    2. Modify the configuration file config_info.txt for periodic backup. If Chinese garbled characters are displayed after opening the file, you can change the file to UTF-8

    3. Backup mode (backup_mode) Set to overseas mode (non-Tencent uses this mode) : backup_mode=1

    4. Need_backup_mysql =”True”

    5. The cold data backup window (allow_backup_TIME_FROM) can be adjusted by itself. The default value is 1:05 a.m. every day

    6. If Tmonitor is connected, you are advised to configure Tmonitor information and use a periodic script to clear expired Tmonitor data

    7. Svr_password is the SSH password of the TCAplus account. You need to enter the password to automatically back up data. Enter the ciphertext and use the encryption tool to obtain the password

      1. /data/tcaplus/tcaplus_service/bin/encrypt_tool/encrypt_tool “PlainText” 30+iBnHyorkIukZ+sT36gQ==
    8. Gluster is strongly recommended for cross-machine backup of backup data if possible. We have adapted all transaction refile and rebuild tasks for The Gluster storage cluster

      1. Gluster mode

        1. Set gluster switch to ON: need_gluster_backup=”ON”

        2. Set the actual mounting path of Gluster: gluster_Backup_path =”/data/glusterfs_dbbak”

        3. Gluster modify tcapcenter configuration files at the same time, the configuration information: vim/data/tcaplus tcaplus_service/CFG/tcapcenter/tcapcenter_cfg. XML

          1. Add four lines corresponding to the backup type, Gluster volume name, Gluster STORAGE node IP address, and Gluster mounting path under the BackUpApi label

          2. To restart tcapCenter, run the CD /data/tcaplus/tcaplus_service/bin command. ./tcapcenter_stop.sh ; sleep 10; ./tcapcenter_start.sh

      2. In single-cold standby mode, need_remote_backup=”ON”, remote_backup_passwd specifies the encrypted ciphertext and remote_backup_DIR specifies the backup storage path

TcaplusDB is a distributed NoSQL database produced by Tencent. The storage and scheduling code is completely self-developed. It has features such as cache + ground 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 gaming, Internet, government, finance, manufacturing and Internet of Things and other fields.