# Performing GaussDB (DWS) Backup

You can perform the backup of a GaussDB (DWS).

## Procedure

You can perform full backup and incremental backup operations for a GaussDB (DWS).

1. Login to a GaussDB (DWS) data node (DN).

       su - omm

       source ${BIGDATA_HOME}/mppdb/.mppdbgs_profile

2. Create the following file, add the Roach client IP as content and save it.

       /srv/BigData/mppdb/medialist

3. Use the below commands for different backup.

   For full Backup:

       python3 $[$GPHOME/script/GaussRoach.py] -t $[backup] --master-port $[master port number] --media-type $[NBU] --media-destination "CVOBConfigSetting=sCVXBSAConfig_$[Instance name]_$[Database name],CvInstanceName=$[Instance001],CvBackupLevel=$[FULL]" --metadata-destination $[metadata destination path] --client-port $[client port number]

   For incremental Backup:

       python3 $[$GPHOME/script/GaussRoach.py] -t $[backup] --master-port $[master port number] --media-type $[NBU] --media-destination "CVOBConfigSetting=sCVXBSAConfig_$[Instance name]_$[Database name],CvInstanceName=$[Instance001],CvBackupLevel=$[INCR]" --metadata-destination $[metadata destination path] --client-port $[client port number] --prior-backup-key $backup key value]

   For specific database backup:

       python3 $[$GPHOME/script/GaussRoach.py] -t $[backup] --master-port $[master port number] --media-type $[NBU] --media-destination "CVOBConfigSetting=sCVXBSAConfig_$[Instance name]_$[Database name],CvInstanceName=$[Instance001],CvBackupLevel=$[FULL]" --metadata-destination $[metadata destination path] --client-port $[client port number] --dbname $[database name]

   For specific table backup:

       python3 $[$GPHOME/script/GaussRoach.py] -t $[backup] --master-port $[master port number] --media-type $[NBU] --media-destination " CVOBConfigSetting=sCVXBSAConfig_$[Instance name]_$[Database name],CvInstanceName=$[Instance001],CvBackupLevel=$[FULL]" --metadata-destination $[metadata destination path]   --client-port $[client port number] --agent-port $[agent port number] --nbu-on-remote --nbu-media-list $[/srv/BigData/mppdb/medialist] --dbname $[database name] --tablename $[table name]

4. Use the following command to view list of backup information:

       python3 $[$GPHOME/script/GaussRoach.py] -t $[show] --all-backups --metadata-destination $[metadata destination path]

For more information about Roach tool specific options, you can refer to Huawei GaussDB (DWS) documentation.

×

Loading...