Updated on 2025-01-09 GMT+08:00

Commands for Canceling a Release

Function

The cancel-publication command is used to modify a fine-grained DR release.

Syntax

python3 $GPHOME/script/DisasterFineGrained.py -t cancel-publication --disaster-object-list-file <disaster-object-file> --config-file <configFile> [--all-cancel]

Parameter Description

Long Option

Short Option

Data Type

Description

Range

Default Value

Example

-t

N/A

String

The interface supports multiple functions. cancel-publication cancels a release.

  • -t generate-config
  • -t prepare
  • -t create-publication
  • -t alter-publication
  • -t cancel-publication
  • -t get-current-disaster

N/A

-t cancel-publication

--disaster-object-list-file

N/A

String

DR object list file

N/A

N/A

--disaster-object-list-file /home/userA/disaster_object_list.txt

--config-file

N/A

String

Path of the dual-cluster DR configuration file.

NOTE:

N/A

N/A

--config-file /home/userA/config.ini

--all-cancel

N/A

Boolean

This parameter is optional. It cancels all releases.

N/A

N/A

--all-cancel

Usage Guide

  • The cancel-publication command must be executed on the active node of the active cluster. After the current backup process is complete, this command stops the subsequent periodic backup.
  • The --disaster-object-list-file parameter in the cancel-publication command must be set to a canceled incremental DR object.
  • DR objects whose release failed to be canceled are written into $HOME/config/fail_disaster_object.txt after the command is executed.
  • If the input parameter contains --all-cancel, all releases are canceled.
  • The updated publication parameter file is stored in $HOME/config/pub.list by default.
  • You need to manually create the DR object list file --disaster-object-list-file. The file format is as follows:
    db_name   //DB level
    db_name.schema_name   //Schema level
    Level db_name.schema_name.table_name  //Table level

Example Command

Cancel a release task.

python3 $GPHOME/script/DisasterFineGrained.py -t cancel-publication --disaster-object-list-file $HOME/config/disaster_object_list.txt --config-file /home/mpp/mppcases_c10/cluster/gs_rch_DR-v6/test/backupRestore.ini

System Response

[perfadm@ecs-env-2988 config]$ python3 $GPHOME/script/DisasterFineGrained.py -t cancel-publication --disaster-object-list-file $HOME/config/disaster_object_list.txt --config-file /home/mpp/mppcases_c10/cluster/gs_rch_DR-v6/test/backupRestore.ini
[Start ESL disaster fine grained process]
Stop backup loop.
Stop crontab for backup
Stop crontab successfully.
Stop backup successfully.
Start parse disaster object file.
parse disaster object file end, [disaster object num]: 1, [time]: 0.000s.
Start filter disaster object.
filter disaster object end, [db num]: 0, [schema num]: 1, [table num]: 0, [time]: 0.019s.
Start validate cancel disaster object.
validate cancel disaster object end, [object num]: 1, [time]: 0.024s.
Start cancel publication.
cancel publication end, [db num]: 0, [schema num]: 1, [table num]: 0, [time]: 0.059s.
The publication file path: /home/perfadm/config/pub.list
[Finished ESL disaster fine grained process]