ConfiBack Logo

Keyword macros

What is Keyword macro?

Keyword macro is a tool to insert variable values to profile command, make special commands or flag command, which returns device’s configuration to backup.

Types of Keyword macros

customizable

Keyword macro, which name is expected by application, but it’s value is customizable.

functional

Keyword macro/flag used for special command, which directs application code. Typically keyword backup means, that output of this command will be saved, because it contains device configuration. By default, output of commands is not processed.

internal

Keyword macro, which is defined internally in application and it shouldn’t be redefined.

specific

Keyword macro, which is defined by ConfiBack user. Can contain eg. TFTP server address, or any custom value.

Creating and managing Keyword macros

To create or manage keyword macro go to device list and open device edit form, because keyword macro values are specific for every device. There you can enter name of keyword macro (without braces!) and its value. Typically the minimum is a password keyword macro.

Keyword macro usage

To use keyword macro in command, you have to enclose it by braces. Example:

copy startup-config tftp {tftpaddress} configrepo/{devicename}-startup.cfg

Explanation: There are two keyword macros {tftpaddress} - user defined specific macro, and {devicename} - an internal keyword macro.

Keyword macros table

Keyword Meaning Usage Type
backup
Save output Place it to beginning of command to flag, that result should be saved as configuration backup. functional
ftp>192.168.1.1
FTP command In Telnet+TFTP+FTP profile to open FTP and get backup file. This command should come after configuration export to TFTP server. functional
sleep>10
Wait for 10 seconds Do not send next command in the profile until 10 seconds (customizable value) not timed out. Usable after issuing copy tftp command, where it takes long. functional
blank
An empty value When you want to send Enter without any command, place it as command. It’ll be replaced by empty string. internal
devicename
Name of device A way how to diversify filenames of configuration export (Telnet+TFTP+FTP). Place it as a file name or directory name (if directory exists). internal
username
User’s name In Telnet profile to authentify access to device, if required. customizable
password
Password In Telnet profile to authentify access to device. Or in Telnet or SSH profile to enter password after enable command. customizable
mykw
My specific User defined keyword macro, eg. for IP address of TFTP server. specific

Special keyword macros

Keyword Meaning Usage Type
binary
Binary backup When backup file is binary, define this keyword macro for desired device. customizable functional
binary

Flags device, that it has binary backups. Value is not examined. If the binary is present in device keyword macros, application automatically encodes input to base64 (and save it to database). Downloading configuration automatically decodes file back.

Note

This keyword macro is not intended to use in Profile Commands.