Data Backup and Recovery
This chapter describes how to backup and recover ZetaData data.
Overview
ZetaData consists of SSVR instance, TAS instance, and TAC instance.
SSVR instances can be configured on multiple servers and are managed by TAS instances to provide volumes to TAC instances. TAS instances are also configured as clusters to match the TAC instances. We do not provide backup capabilities for SSVR and TAS . Typical TAC backups are the same as those done using a storage-agnostic database solution.
ZetaData Backup and Recovery
There are the following three methods for ZetaData data backup and recovery.
Logical backup and recovery with tbexport
Same as a general backup method. Backed up files can be loaded with tbimport.
Physical backup and recovery with RMGR
Physically backs up files managed by a database.
If a database is configured with TAS, a database file cannot be accessed with an OS utility but can be accessed with RMGR.
RMGR supports backup when a database's storage is a local disk, SAN disk, SAN disk that uses TAS, or ZetaData. If RMGR is used, backup and recovery are performed in a database node. A user does not need to perform additional tasks for backup and recovery.
Cold backup and recovery with tbascmd
Copies TAS files saved in disk spaces to a local directory by using tbascmd to execute the cptolocal command in a command line tool of TAS. It backs up all files for Tibero operation to a local file system by using the cptolocal command while only TAS instance operates after ending a Tibero instance.
Before performing recovery, perform checkpoint to save data located only in memory to flash and disk as follows:
SQL> alter system checkpoint
Before performing backup, check the file type and block size as follows:
SQL> select a.type, a.block_size, b.name from v$as_file a, v$as_alias b
where a.file_number = b.file_number;
Backup all necessary files such as control, redo, and data files as follows.
TBASCMD can be accessed through tbascmd (port number). The port number is set in LISTNER_PORT of the TAS tip file.
The following is an example of backing up the c1.ctl control file locally on a TAS instance using port 9120.
$ tbascmd 9120
ASCMD> cptolocal +DS0/c1.ctl /home/node0/c1.ctl
The result of executing the above command shows that a backup file and a rollback script file using the cpfromlocal command have been created.
$ ls /home/node0
c1.ctl c1.ctl_rollback.sh
User can back up all files managed by the DB using the cptolocal command of tbascmd and then transfer and restore them to the TAS disk space of another node.
Transfer the backup files to the local directory of the node you want to migrate to and use the cpfromlocal command to copy the backup files from the local file system to the disk space of TAS. At this time, specify the file type (file type '-t') and block size (block size '-b') that were checked while backing up as arguments. There are five types of file types: CTRL, REDO, DATA, TEMP, and ARCH.
The following is an example of copying a backup file to disk space DS0 on node #1 TAS.
cpfromlocal /home/node1/c1.ctl +DS0/c1.ctl -b 16384 -t CTRL
cpfromlocal /home/node1/log001.log +DS0/log001.log -b 512 -t REDO
cpfromlocal /home/node1/usr001.tdf +DS0/usr001.dtf -b 32768 -t DATA
cpfromlocal /home/node1/temp001.dtf +DS0/temp001.dtf -b 32768 -t TEMP
cpfromlocal /home/node1/log-t0-r0-s1.arc +DS0/ARCH/log-t0-r0-s1.arc -b 512 -t ARCH
Caution
Restoring a file with an incorrect block size can cause inconsistency issues.
It is recommended that you use or reference the cpfromlocal command after modifying the script file generated as a result of the cptolocal command to suit your circumstances.
Last updated