Plugin command to initialize a storage plugin for the backup operation.
<plugin_executable> setup_plugin_for_backup <plugin_config_file> <local_backup_dir> <scope>
<plugin_executable> setup_plugin_for_backup <plugin_config_file> <local_backup_dir> <scope> <contentID>
gpbackup
invokes the setup_plugin_for_backup
plugin command during gpbackup
initialization phase. The scope argument specifies the execution scope. gpbackup
will invoke the command with each of the scope values.
The setup_plugin_for_backup
command should perform the activities necessary to initialize the remote storage system before backup begins. Set up activities may include creating remote directories, validating connectivity to the remote storage system, checking disks, and so forth.
The local directory on the Greenplum Database host (coordinator and segments) to which gpbackup
will write backup files. gpbackup
creates this local directory.
coordinator
, the local_backup_dir is the backup directory of the Greenplum Database coordinator.segment
, the local_backup_dir is the backup directory of a segment instance. The contentID identifies the segment instance.segment_host
, the local_backup_dir is an arbitrary backup directory on the host.The execution scope value indicates the host and number of times the plugin command is executed. scope can be one of these values:
coordinator
- Execute the plugin command once on the coordinator host.segment_host
- Execute the plugin command once on each of the segment hosts.segment
- Execute the plugin command once for each active segment instance on the host running the segment instance. The contentID identifies the segment instance.The contentID of the Greenplum Database coordinator or segment instance corresponding to the scope. contentID is passed only when the scope is coordinator
or segment
.
coordinator
, the contentID is -1
.segment
, the contentID is the content identifier of an active segment instance.The setup_plugin_for_backup
command must exit with a value of 0 on success, non-zero if an error occurs. In the case of a non-zero exit code, gpbackup
displays the contents of stderr
to the user.