Configuration procedure
# Use a text editor on the PC to edit Python script test.py as follows:
#!usr/bin/python import comware comware.Transfer('tftp', '192.168.1.26', 'main.cfg', 'flash:/main.cfg') comware.Transfer('tftp', '192.168.1.26', 'backup.cfg', 'flash:/backup.cfg') comware.CLI('startup saved-configuration flash:/main.cfg main ;startup saved-configuration flash:/backup.cfg backup')
# Use TFTP to download the script to the device.
<Sysname> tftp 192.168.1.26 get test.py
# Execute the script.
<Sysname> python flash:/test.py <Sysname>startup saved-configuration flash:/main.cfg main Please wait...... Done. <Sysname>startup saved-configuration flash:/backup.cfg backup Please wait...... Done.