Document Type | Technical Information
Category | Backup/Recovery
Applicable Product Versions | 7FS02, 7FS02PS
Document Number | TBATI012
Overview
This document describes the Offline Backup (Cold Backup) procedure to safely back up files stored in TAS (Tibero Active Storage) to a local disk using the tbascmd command after properly shutting down the Tibero database.
Method
1. Check Backup Target Files
Check the tablespaces assigned to the data files.
SQL> col FILE_NAME for a40 SQL> col TABLESPACE_NAME for a10 SQL> select FILE_NAME,FILE_ID,TABLESPACE_NAME,STATUS from dba_datafiles;
Check the location of data files.
SQL> select name from v$datafile; NAME ------------------------------------------ +DS0/tac/system01/system01.dbf +DS0/tac/system01/undo0_01.dbf +DS0/tac/system01/usr01.dbf +DS0/tac/system01/tpr01.dbf +DS0/tac/system02/undo1_01.dbf +DS0/tac/system01/xwiki01.dbf
Check the redo log files.
SQL> SELECT MEMBER FROM V$LOGFILE; MEMBER ---------------------------------------------- /tbdata/tibero/system01/redo_01a.redo /tbdata/tibero/system02/redo_01b.redo /tbdata/tibero/system01/redo_02a.redo /tbdata/tibero/system02/redo_02b.redo /tbdata/tibero/system01/redo_03a.redo /tbdata/tibero/system02/redo_03b.redo
2. Control File Backup
Back up the Control File as an SQL Script.
SQL> alter database backup controlfile to trace as '{backup path}/control.sql' reuse noresetlogs;
SQL> alter database backup controlfile to trace as '{backup path}/control.sql' reuse resetlogs3. Stop DB Startup
Stop the Tibero Database. (Keep TAS running)
$ tbdown immediate
4. Copy Backup Files
- Connect to TAS using the tbascmd command and copy backup files to the local disk.
- The tbascmd command is used to connect to the TAS instance and manage files stored in the disk space.
$ tbascmd {TAS PORT}
[15:30]ASCMD +> cd +DS0/tac/system01
[15:31]ASCMD +DS0/tac/system01> ls
redo0_11.redo
redo0_21.redo
system01.dbf
undo0_01.dbf
tmp01.dbf
usr01.dbf
tpr01.dbf
redo1_11.redo
redo1_21.redo
xwiki01.dbf - Number of files found: 10
-- Use the cptolocal command to copy TAS files to local
[16:17]ASCMD +DS0/tac> cptolocal .passwd /home/tibero/backup
22
[15:32]ASCMD +DS0/tac/system01> cptolocal +DS0/tac/system01/.dbf /home/tibero/back/
[15:32]ASCMD +DS0/tac/system01> cptolocal +DS0/tac/system01/.dbf /home/tibero/back/
[16:07]ASCMD +DS0/tac/system02> cptolocal +DS0/tac/system02/*.dbf /home/tibero/back/
[16:10]ASCMD +DS0/tac/system02> exit5. Start DB
Start the Tibero DB after backup is complete.
$ tbboot
6. Verify Backup
$ ll total 12800044 -rw-r--r-- 1 tibero dba 4528 May 27 10:45 control.sql -rw-r--r-- 1 tibero dba 3145728000 May 27 10:49 system01.dbf -rw-r--r-- 1 tibero dba 3145728000 May 27 10:50 tmp01.dbf -rw-r--r-- 1 tibero dba 1048576000 May 27 10:49 tpr01.dbf -rw-r--r-- 1 tibero dba 1048576000 May 27 10:48 undo0_01.dbf -rw-r--r-- 1 tibero dba 3145728000 May 27 10:52 undo1_01.dbf -rw-r--r-- 1 tibero dba 1048576000 May 27 10:49 usr01.dbf -rw-r--r-- 1 tibero dba 524288000 May 27 10:51 xwiki01.dbf
Note
Before performing an offline backup (cold backup), it is essential to ensure that the database has been properly shut down.