Lantronix 900-558 manual Best Practices, Importing

Page 18

4: Configuration Using XML

allow for providing root and enable level passwords so that this can also be done at the password prompt.

Web browser—Web Manager can be used to import and export an XCR to the device server file system. It can also be used to import an XCR from an external source such as your local hard drive.

FTP—The device server FTP server can export and import XCRs when an FTP get or put command on the filename xport_pro.xcr is requested. On export (FTP get of xport_pro.xcr), the FTP server obtains the current XCR from Evolution OS™ and sends it as a file. On import (FTP put of xport_pro.xcr), the FTP server processes the file by sending it directly to the XML engine. In both cases the device server filesystem is not accessed. The file xport_pro.xcr is not read from or written to the file system. See FTP in the XPort Pro User Guide.

TFTP—TFTP supports XCR importing. Due to limited security capabilities of TFTP, the option is disabled by default.

Best Practices

You can import or export an entire XCR, or just a portion of it, by specifying the group name and/or group instances. In the examples below, import and export operations are performed from the CLI on the local filesystem and require a XCR on the local filesystem. The Web Manager provides the same functionality.

Caution: Using Microsoft Word to edit and save an XCR will change the format of the file and make it incompatible with Evolution OS. This is true even if the file is saved as Plain Text (.txt) or an XML Document (.xml). Notepad, a third party text editor, or a specialized XML editor should be used instead.

Importing

The following syntax can be used to import configurations from a file:

xcr import <file>

xcr import <file> <groups and/or group:instances>

The first line imports all groups specified in the XML config record named in <file>. Any filename is valid, and the file name and extension are not important.

Caution: The filename xport_pro.xcr is not acceptable, because performing a FTP get on that name produces the current configuration and does not perform an FTP from the filesystem. Also, the filename xport_pro.xsr is not acceptable, because performing an FTP get on that name produces the current status and does not get anything from the filesystem.

In the second line:

Instance follows group with a colon (see the third example on the next page).

Multiple groups are separated with a comma.

Any white space requires the list of groups to be quoted.

Only the named groups get imported, even if the XCR contains additional XCR groups.

The following syntax can be used to export configurations to a file on the device server’s file system:

XPort Pro Command Reference

18

Image 18
Contents Command Reference Copyright and Trademark Configuration Using XML Table of ContentsCommand Line Interface Commands and LevelsList of Figures CLI Level HierarchyList of Tables Chapter Summaries ConventionsAdditional Documentation Document DescriptionOverview XML Architecture and Device ControlConfiguration Using Telnet Configuration Using Serial PortsCommand Line Interface Navigating the CLI HierarchyUsing Keyboard Shortcuts and CLI Understanding the CLI Level HierarchyCLI Level Hierarchy Login Level Commands Configuration Using XML XML Configuration Record Document Type Definition Quick Tour of XML Syntax DeclarationRecord, Group, Item, and Value Tags XML Group ExampleImporting and Exporting an XML Configuration File XML Example of Multiple ItemsBest Practices ImportingExporting XML Configuration Groups XCR GroupsRandom URI Cidr Configuration Using XML Configuration Using XML Configuration Using XML Cidr Configuration Using XML Configuration Using XML Unknown Aes encrypt key Aes decrypt key Host mode Configuration Using XML XML Status Record Groups and Items 9XSR Groups and Items Configuration Using XML Configuration Using XML Configuration Using XML Arpa Configuration Using XML UDP Configuration Using XML Configuration Using XML Configuration Using XML Configuration Using XML Configuration Using XML Configuration Using XML Commands and Levels Commands and Levels Commands and Levels Accept tunnel-accept1 level commandsMode tunneling Arp config-arp level commands Cli config-cli level commandsClient ssh-client level commands Configure config level commands Connect tunnel-connect1 level commands FiguredHost instance Cp email-cp2 level commands Cp email-cp4 level commandsCp email-cp3 level commands Cp email-cp1 level commandsCp output tunnel-connect-cpoutput1 level commands Cp output tunnel-accept-cpoutput1 level commandsCpm cpm level commands Device device level commandsDiagnostics config-diagnostics level commands Disconnect tunnel-disconnect1 level commandsDns dns level commands Email 1 email1 level commandsEmail 2 email2 level commands To textCommands and Levels Email 3 email3 level commands Email 4 email4 level commands Enable enable level commands Filesystem filesystem level commands Ftp config-ftp level commands Host 1 tunnel-connect-host11 level commandsHost 1 config-host1 level commands Port numberHost 10 tunnel-connect-host110 level commands Name textHost 10 config-host10 level commands Host 11 tunnel-connect-host111 level commands Host 11 config-host11 level commands Host 12 tunnel-connect-host112 level commands Host 12 config-host12 level commands Host 13 tunnel-connect-host113 level commands Host 13 config-host13 level commands Host 14 tunnel-connect-host114 level commands Host 14 config-host14 level commands Host 15 tunnel-connect-host115 level commands Host 15 config-host15 level commands Host 16 tunnel-connect-host116 level commands Host 16 config-host16 level commands Host 2 tunnel-connect-host12 level commands Host 2 config-host2 level commands Host 3 tunnel-connect-host13 level commands Host 3 config-host3 level commands Host 4 tunnel-connect-host14 level commands Host 4 config-host4 level commands Host 5 tunnel-connect-host15 level commands Host 5 config-host5 level commands Host 6 tunnel-connect-host16 level commands Host 6 config-host6 level commands Host 7 tunnel-connect-host17 level commands Host 7 config-host7 level commands Host 8 tunnel-connect-host18 level commandsCommands and Levels Host 8 config-host8 level commands Host 9 tunnel-connect-host19 level commandsCommands and Levels Host 9 config-host9 level commands Http config-http level commandsAuth uri realm Auth user uri user password Icmp config-icmp level commands Ip address ip address/cidr If 1 config-ifeth0 level commandsIp config-ip level commands Mtu bytesIp filter config-filter level commands Line 1 line1 level commandsGap timer milliseconds XPort Pro Command Reference 103 Lpd lpd level commands Link config-etherneteth0 level commandsLog config-diagnostics-log level commands Kill lineLpd 1 config-lpd1 level commands Modbus modbus level commands Modem tunnel-modem1 level commandsTest print number of lines Packing tunnel-packing1 level commands Password tunnel-accept-password1 level commands Ppp 1 ppp1 level commandsLocal ip ip address/cidr Rss config-rss level commands Query port config-queryport level commandsRoot level commands Peer ip ip addressServer ssh-server level commands Rss modbus-rss level commandsSerial tunnel-serial1 level commands Authorized user username passwordSmtp config-smtp level commands Snmp config-snmp level commandsSsh ssh level commands Ssh config-cli-ssh level commandsSsl ssl level commands Syslog config-syslog level commands Tcp config-tcp level commandsHost text Telnet config-cli-telnet level commands Terminal 1 config-terminal1 level commandsTerminal network config-terminalnetwork level commands Tftp config-tftp level commands Traps config-snmp-traps level commands Tunnel 1 tunnel1 level commandsXml xml level commands Udp config-udp level commandsVip config-vip level commands Secret xcr export file group listXcr import file group list Xcr dump group listXcr export file group list Xsr dump group list