Collecting Storage System Configuration Data Using the CLI
You can use the CLI to back up or import device configuration data.
Exporting Storage System Configuration Data
All configuration information of a storage system must be exported before a system upgrade or capacity expansion. Exported data can be used to restore the storage system if the upgrade or capacity expansion fails.
Prerequisites
- The FTP or SFTP server is accessible to the storage system. Log in to the server, and run ping ip. If the server receives data packets from the front-end port, the communication between the storage system and server is normal. If the server receives no data packets from the front-end port, replace the network cable, change the IP address of the front-end port, or add a route between the front-end port and server port, and try again. For details about how to change the IP address of a front-end port or add a route between a front-end port and a server port, see the DeviceManager online help.
- The FTP or SFTP service on the server has been enabled.
- A folder has been created for saving configuration files.
Context
Configuration data of the storage system can be collected only using the CLI.
Precautions
- Configuration data of the storage system is exported in a .dat file. Do not modify any content in this file.
- If the storage system serves as a server in the file transfer with external systems, it supports the SFTP service only. If the storage system serves as a client, it supports both the FTP and SFTP services.
- If configuration files need to be imported, contact Huawei technical support.
Procedure
- Log in to the CLI of the storage system as a super administrator.
- Run the export configuration_data ip=? user=? password=? db_file=? [ port=? ] [ protocol=? ] [ clean_device_file=? ] command to export configuration files to an FTP or SFTP server.Table 4-17 Parameter description
Parameter
Description
Value
ip=?
IP address of an FTP or SFTP server to which you want to import a configuration file.
[Example]
-
user=?
User name for logging in to an FTP or SFTP server.
[Example]
The value contains 1 to 64 characters.
password=?
Password for logging in to an FTP or SFTP server.
[Example]
The value contains 1 to 63 characters.
db_file=?
File name of and path to a configuration file on an FTP or SFTP server.
[Example]
The file name extension must be .dat. If you specify a file name, the file name cannot contain any of the following characters: \ / : * ? " < > |.
port=?
ID of the port used on an FTP or SFTP server.
[Example]
The value ranges from 1 to 65535.
- If protocol=FTP, the default value is 21.
- If protocol=SFTP, the default value is 22.
protocol=?
Protocol type.
[Example]
The value can be FTP or SFTP. The default value is SFTP.
To ensure the security of data transfer, you are advised to use SFTP.
clean_device_file=?
After the configuration file is exported to an FTP server or a SFTP server, whether to delete the temporary configuration file cached in the storage system memory during configuration file export.
The value can be yes or no, where:
- yes: immediately deletes the temporary configuration file cached in the storage system memory.
- no: deletes the temporary configuration file cached in the storage system memory after five minutes.
The default value is yes.
forcible_export=?
Whether an export is forcibly performed.
The value can be yes or no, where:
- If forcible_export=yes, the configuration data is forcibly exported without checking whether there are ongoing configuration tasks on the system. Configuration files forcibly exported cannot be imported to the storage system for restoring configuration.
- If forcible_export=no, whether there is any ongoing configuration task on the system is checked before the export. If any, the export is prohibited.
Importing Storage System Configuration Data
If a system fails to be upgraded or malfunctions, you can import backed up system configuration data to restore system configurations.
Prerequisites
- Storage systems can access a File Transfer Protocol (FTP) server over the network.
- The FTP service has been enabled on the FTP server.
- The selected system configuration file is a correct backup.
Context
Storage system configuration information can be imported only using the CLI.
Precautions
- The type of a configuration file to be imported is *.dat. Do not modify exported configuration file contents.
- Do not perform any operation when importing a configuration file.
Procedure
- Log in to the CLI as the super administrator.
- Run the import configuration_data ip=xxx.xxx.xxx user=? password=? db_file=? command to import a configuration file from the FTP server to the storage system.
For details about this command, see the OceanStor Dorado Advanced O&M Command Reference.