Commands for Generating a Configuration File
Function
The generate-config command is used to create the initial settings for the dual-cluster DR configuration file and the active/standby cluster switchover configuration file for fine-grained DR. These settings can be modified after generation.
Syntax
python3 $GPHOME/script/DisasterFineGrained.py -t generate-config --user <user> --primary-env <primaryEnv> --standby-env <standbyEnv> --primary-host-ip <primaryHostIp> --restore-host-ip <restoreHostIp> --meta-destination <metaDestination> --media-destination <mediaDestination> [--config-file <configFile>] [--switchover-config-file <switchoverConfigFile>]
Parameter Description
Long Option |
Short Option |
Data Type |
Description |
Range |
Default Value |
Example |
---|---|---|---|---|---|---|
-t |
N/A |
String |
The interface supports multiple functions. Set this parameter to generate-config to generate a configuration file. |
|
N/A |
-t generate-config |
--user |
N/A |
String |
Username |
N/A |
N/A |
--user omm |
--primary-env |
N/A |
String |
Absolute path of the environment variable file of the active cluster |
N/A |
N/A |
--primary-env /path/env |
--standby-env |
N/A |
String |
Absolute path of the environment variable file of the standby cluster |
N/A |
N/A |
--standby-env /path /env |
--primary-host-ip |
N/A |
String |
IP address of the node where the backup is performed in the active cluster |
N/A |
N/A |
--primary-host-ip 192.168.249.156 |
--restore -host-ip |
N/A |
String |
IP address of the node where the restoration is performed in the standby cluster |
N/A |
N/A |
--restore -host-ip 192.168.244.161 |
--meta-destination |
N/A |
String |
Specifies the backup destination for the chosen media. |
N/A |
N/A |
--meta-destination /data1/userA/meta |
--media-destination |
N/A |
String |
Specifies the metadata file location. |
N/A |
N/A |
--media-destination /data1/userA/media |
--config-file |
N/A |
String |
Generates the path for storing the dual-cluster DR configuration file.
NOTE:
The OS user omm must have the write permission on the path. |
N/A |
N/A |
--config-file /home/userA/config.ini |
--switchover-config-file |
N/A |
String |
Generates the path for storing the active/standby switchover configuration file.
NOTE:
The OS user omm must have the write permission on the path. |
N/A |
N/A |
--switchover-config-file /home/userA/sw_config.ini |
Usage Guide
- The generate-config command must be executed on the active node of the active cluster.
- If the input parameters --config-file and --switchover-config-file are not specified, the configuration files are generated in $HOME/config/backupRestore.ini and $HOME/config/sw_backupRestore.ini by default. The two input parameters specify the paths for the generated configuration files.
- If environment variables are separated, include --primary-env and --standby-env in the input parameters. If the environment variables are not separated, specifying them is unnecessary.
Example Command
Generate a configuration file without separating environment variables, and specify the address of the generated configuration file.
python3 $GPHOME/script/DisasterFineGrained.py -t generate-config --user perfadm --primary-host-ip 192.168.250.152 --restore-host-ip 192.168.244.53 --meta-destination /home/CI/log/metadata --media-destination /home/CI/log/mediadata --config-file $HOME/config.ini --switchover-config-file $HOME/sw_config.ini
System Response
[perfadm@ecs-env-2988 ~]$ python3 $GPHOME/script/DisasterFineGrained.py -t generate-config --user perfadm --primary-host-ip 192.168.250.152 --restore-host-ip 192.168.244.53 --meta-destination /home/CI/log/metadata --media-destination /home/CI/log/mediadata --config-file $HOME/config.ini --switchover-config-file $HOME/sw_config.ini generate config file path is /home/perfadm/config.ini, /home/perfadm/sw_config.ini.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot