19-8
User Guide for Resource Manager Essentials 4.1
OL-11714-01
Chapter 19 CLI Utilities
CWCLI

Uses of cwcli config

With cwcli config, you can:
Device and Archive Updates
Modify a device's running configuration. You can allow personnel of your organization to modify
the device's configuration without explicitly providing them with Telnet access to the device.
Deleting Configurations
Delete unwanted versions of the configuration file from the archive. This is a command-line variant
of the UI purge feature.
Comparing Configurations
Generate 'diffs' of different configuration versions of the same device to find out what modifications
were made. This is a command-line counterpart for GUI-based reports.

Device and Archive Updates

Whenever you use cwcli config to update the running configuration of the device, the tool also archives
the newly written configuration to the archive, bypassing the auto-detection mechanism.

Getting a Version of the Device Configuration

To obtain a version of the device's configuration from the device, modify it, and then write it back to the
device. You use two features of cwcli config to do this.
1. Use the export command to obtain a copy of the desired configuration version file.
2. Edit and deploy it on the device using the import function. If the update succeeds, import also
archives the configuration in the archive as the latest version.
Example:
cwcli config export -u user -p pass -device zebra.domain.com -version 3 -f zebraconf
version 3 of device zebra's configuration has been obtained from the device. It is available in the file
zebraconf. You must edit the file and make the necessary modifications.
cwcli config import -u user -p pass -device zebra.domain.com -f zebraconf
The edited file is written back to the device and archive. If there were five configurations originally, a
sixth one is now added.
If you want to update the running config on the device, and are certain that the latest archived version is
the same as the running config, then you can obtain the latest version as follows:
cwcli config export -u user -p pass -device zebra.domain.com -f zebraconf
the latest version is copied to file zebraconf.
After writing the edited configuration to the device, you might want to reboot the device. You can do this
automatically from cwcli config by using the -reboot argument to the import command:
cwcli config export -u user -p pass -device zebra.domain.com -f zebraconf -reboot
In addition, you might want to write file zebraconf to both the running as well as the startup
configuration. To do this, enter the following command:
cwcli config export -u user -p pass -device zebra.domain.com -f zebraconf -save