Document Type | Technical Information
Category | Backup/Recovery
Applicable Product Version | 7FS02PS
Document Number | TBATI039
Overview
BCT
An abbreviation for Block Change Tracking, it is a method to back up only the changed blocks when performing an incremental backup after a full backup with tbrmgr.
By reading the redo buffer, whenever a block is modified, the change history is recorded as a bitmap in the BCT file.
During incremental backup, this bitmap is referenced to quickly back up only the changed blocks instead of all blocks.
Related Parameters
- Set in
$TB_HOME/config/$TB_SID.tip - Set the
BLOCK_CHANGE_TRACKINGparameter to the absolute path of the BCT file ex) BLOCK_CHANGE_TRACKING=/home/t/tbdata/tibero.bct
Related Commands
- Enable BCT feature:
ALTER SYSTEM ENABLE BLOCK CHANGE TRACKING; - Disable BCT feature:
ALTER SYSTEM DISABLE BLOCK CHANGE TRACKING;
Method
Test Scenario
Modify $TB_SID.tip
...
BLOCK_CHANGE_TRACKING=/home/tibero/tibero7/block/tibero.bct
Enable BCT and Verify Activation
- Enable BCT with the command
ALTER SYSTEM ENABLE BLOCK CHANGE TRACKING; - If the ENABLED column in
_vt_bctis 1, BCT is enabled; if 0, it is disabled
$ tbsql sys/tibero
tbSQL 7
TmaxTibero Corporation Copyright (c) 2020-. All rights reserved.
Connected to Tibero.
SQL> select * from _vt_bct;
ENABLED SET_ID CUR_SET_ID REQ_TSN
---------- ---------- ---------- ----------
0 0 0 170649
0 1 0 170597
2 rows selected.
SQL> ALTER SYSTEM ENABLE BLOCK CHANGE TRACKING;
System altered.
SQL> select * from _vt_bct;
ENABLED SET_ID CUR_SET_ID REQ_TSN
---------- ---------- ---------- ----------
1 0 0 172019
1 1 0 170597
2 rows selected.
Perform Full Backup
$ tbrmgr backup -o /home/tibero/tibero7/block/backup
==============================================================================
= Recovery Manager(RMGR) starts =
= =
= TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. =
==============================================================================
archive log check succeeded
RMGR '-o' option used
: backing up to /home/tibero/tibero7/block/backup
==============================================================================
RMGR - Backup (FULL)
==============================================================================
Initializing the backup progress, it may take few minutes...
BACKUP (set_id: 4, ts_id: 0, df_id: 0)
100.0% |===============================| 13568/13568 blks 0.00s
Synchronizing...
BACKUP (set_id: 4, ts_id: 1, df_id: 1)
100.0% |===============================| 13056/13056 blks 0.00s
Synchronizing...
BACKUP (set_id: 4, ts_id: 3, df_id: 2)
100.0% |===============================| 1280/1280 blks 0.00s
Synchronizing...
BACKUP (set_id: 4, ts_id: 4, df_id: 3)
100.0% |===============================| 2560/2560 blks 0.00s
Synchronizing...
Switching an online logfile...
Backing up the control file...
Control file backup succeeded
Database backup succeeded
RMGR backup ends
Perform Incremental Backup
$ tbrmgr backup -i -o /home/tibero/tibero7/block/backup2
==============================================================================
= Recovery Manager(RMGR) starts =
= =
= TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. =
==============================================================================
archive log check succeeded
RMGR '-o' option used
: backing up to /home/tibero/tibero7/block/backup2
==============================================================================
RMGR - Backup (INCREMENTAL)
==============================================================================
Initializing the backup progress, it may take few minutes...
BACKUP (set_id: 3, ts_id: 0, df_id: 0)
100.0% |===============================| 269/269 blks 0.00s
Synchronizing...
BACKUP (set_id: 3, ts_id: 1, df_id: 1)
100.0% |===============================| 1056/1056 blks 0.00s
Synchronizing...
BACKUP (set_id: 3, ts_id: 3, df_id: 2)
100.0% |===============================| 2/2 blks 0.00s
Synchronizing...
BACKUP (set_id: 3, ts_id: 4, df_id: 3)
100.0% |===============================| 916/916 blks 0.00s
Synchronizing...
Switching an online logfile...
Backing up the control file...
Control file backup succeeded
Database backup succeeded
RMGR backup ends