.. figure:: images/ConfiBack.png :alt: ConfiBack Logo :align: left :height: 32pt :width: 32pt Profiles and Profile Commands ============================= What is Profile? ---------------- Every vendor of network devices has his own style of getting configuration backup out. Not only command structure can be different, but even technology of connection. Profile is a list of commands, which are executed throught technology defined in profile too. Profile can be shared among devices, which use the same technology and command structure. It is not neccessary to write a new profile for each device, if it has same profile style. .. _profile-commands: Writing Profile commands ------------------------- Profile command is one row in Profile and it corresponds to one row in telnet/ssh session, submited using Enter key (confirmation is default, but can be unset for every command). In command you can use clear text and :doc:`Keyword macros `, which can work as variables. It's useful for making Profiles available for several devices. There are also :ref:`project defined Keyword macros `, which have special meaning. The most important Keyword macro is ``{backup}``, which flags Profile command to save its output as configuration backup. *Examples* of Profile commands are below in Profile types. Profile types ------------- .. glossary:: Telnet This connection type uses unencrypted Telnet protocol. All authetication credentials have to be send insecurely as one of commands. Some devices requires only password and no username. *Example of Telnet profile:* .. csv-table:: :header: "Command","Confirm?","Order","Comment" :widths: 25,10,10,55 ``{blank}``,True,1,"Confirm welcome banner using Enter key." ``{username}``,True,2,"Enter user name." ``{password}``,True,3,"Enter password." ``enable``,True,4,"Go to Enable mode." ``terminal length 0``,True,5,"Set infinite terminal lenght to disable paging of displayed text." ``{backup}show startup-config``,True,6,"Show device startup config and save it to ConfiBack." ``exit``,True,7,"End Enable mode." ``exit``,True,8,"Close connection." ``y``,False,9,"Confirm exit by typing Y key only." .. note:: Keywords enclosed in braces are :ref:`Keyword macros `. SSH2 Secured Shell v2 connection is encrypted connection. However it is not implemented very well on several devices. If SSH2 doesn't work for your device, try to use another type of connection. *username* and *password* are required for connection establishment, so they aren't in connection profile commands. *Example of SSH2 profile:* .. csv-table:: :header: "Command","Confirm?","Order","Comment" :widths: 25,10,10,55 ``terminal length 0``,True,1,"Set infinite terminal lenght to disable paging of displayed text." ``{backup}show startup-config``,True,2,"Show device startup config and save it to ConfiBack." ``exit``,True,3,"Close connection." Works well at Cisco enterprise routers. FTP Unsecured File Transfer Protocol. Some network devices can export its configuration only through FTP as downloading configuration file. Using FTP you can manually upload any backup, you made, into ConfiBack. FTP profile commands uses raw FTP commands. You need only one command called RETR. .. csv-table:: :header: "Command","Confirm?","Order","Comment" :widths: 25,10,10,55 ``{backup}RETR boot.cfg``,False,1,"Get device startup config and save it to ConfiBack." FTP with TLS :term:`FTP connection ` secured with TLS. .. note:: Not tested. Telnet+TFTP+FTP Complicated way to get configuration file. Connection via :term:`Telnet`, configuration file is uploaded to TFTP server and downloaded from same place, but via :term:`FTP`. .. csv-table:: :header: "Command","Confirm?","Order","Comment" :widths: 25,10,10,55 ``{blank}``,True,1,"Confirm welcome banner using Enter key." ``{username}``,True,2,"Enter user name." ``{password}``,True,3,"Enter password." ``enable``,True,4,"Go to Enable mode." ``copy startup-config tftp 172.16.0.55 configrepo/{devicename}-startup.cfg``,True,5,"Copy configuration file to TFTP server repository." ``{backup}{ftp>172.16.0.55}RETR tftpboot/configrepo/{devicename}-startup.cfg``,True,6,"Download startup config from FTP repository and save it to ConfiBack." ``exit``,True,7,"End Enable mode." ``exit``,True,8,"Close connection." ``y``,False,9,"Confirm exit by typing Y key only." Good for HP ProCurve or Nortel switches.