Hi,
I had been looking for this myself for a while and did not find a cli option to get it done.
Recently I discovered the configfile snmp operations, and through SNMP comware allows a tftp to running config.
This would be the setup:
1/ Install management system with net-snmp
Copy these files to the shared mibs folder of net-snmp:
hh3c-oid.mib
hh3c-common-system.mib
hh3c-config-man.mib
hh3c-sys-man.mib
rfc2578.sm2
rfc2579.sm2
rfc2580.sm2
2/ Configure devices with SNMP write (I used v2c, but v3 should work as well)
3/ Configure tftp server with config file. Sample file acl.cfg :
undo acl number 3001
# testing comments
acl number 3001
rule 0 permit tcp destination-port eq www
rule 5 permit ip
return
4/ on the management system, run this command:
# tell snmpset to use the MIBS folder and load all mibs. Configure snmp community and host ip as required.
# config file management creates "job" rows, which must be unique. In order to be sure the new record is available, delete the record first. In this example, record 1 is deleted (this record may not exist, so just to be safe)
snmpset -v 2c -M C:\usr\share\snmp\mibs -m ALL -c private 10.0.0.1 hh3cCfgOperateRowStatus.1 i destroy
# create new job record, with tftp server ip and filename:
snmpset -v 2c -M C:\usr\share\snmp\mibs -m ALL -c private 10.0.0.1 hh3cCfgOperateType.1 i net2Running hh3cCfgOperateProtocol.1 i tftp hh3cCfgOperateFileName.1 s acl.cfg hh3cCfgOperateServerAddress.1 a 10.0.1.100 hh3cCfgOperateRowStatus.1 i createAndGo
That is it, this worked for me (download and execute to running config).
To save the running to startup config ( did not lookup the correct MIB naming ...)
snmpset -v 2c -c private 10.0.0.1 1.3.6.1.4.1.25506.2.4.1.2.4.1.2.1 i 1 1.3.6.1.4.1.25506.2.4.1.2.4.1.9.1 i 4
See attached H3C doc for config file reference,
Hope this helps,
Best regards,Peter.