Lantronix LX6 manual Importing

Page 19

4: Configuration Using XML

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.

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:

xcr export <file>

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

The same guidelines above regarding importing configurations also apply to exporting configurations. If no groups are specified, then the export command will export all configuration settings to the file. If instances are specified after the groups, only those group instances are written. If no instance is specified, all instances of that group are written.

Exporting

The following example exports only the accept mode tunneling settings for 1 to the file "tunnel_1.xcr" on the device server filesystem:

xcr export tunnel_1.xcr "tunnel accept:1"

The following example exports only the mode tunneling settings for all to the file "tunnel_all.xcr" on the device server filesystem:

xcr export tunnel_all.xcr "tunnel "

The following example imports only the settings for 2 from an XCR named "factory_config.xcr" on the device server filesystem. If "factory_config.xcr" has other configuration settings, they are ignored:

xcr import factory_config.xcr ":2"

The following example imports only settings for all from a configuration record on the device server filesystem named "foobar.xcr":

xcr import foobar.xcr ""

To import only mode tunnel settings for 1 and all settings for 2 from an XML configuration record named "production.xcr" that contains these settings (and possibly more), issue the following command:

xcr import production.xcr "tunnel :1"

The following example exports mode tunneling for all to the file tunnel_config.xcr on the device server filesystem:

xcr export tunnel_config.xcr "tunnel"

XPort® Pro Lx6 Embedded Device Server Command Reference

19

Image 19
Contents Embedded Device Server Command Reference Copyright and Trademark Table of Contents List of Figures List of Tables Conventions Chapter SummariesAdditional Documentation DeviceInstaller Online HelpXML Architecture and Device Control OverviewConfiguration Using the Serial Port Configuration Using TelnetNavigating the CLI Hierarchy Command Line InterfaceUnderstanding the CLI Level Hierarchy Using Keyboard Shortcuts and CLICLI Level Hierarchy Enable Level Commands XML Configuration Record Document Type Definition Configuration Using XMLDeclaration Quick Tour of XML SyntaxXML Example of Multiple Named Values Record, Group, Item, and Value TagsXML Example of Multiple Items Best Practices Importing and Exporting an XML Configuration FileImporting XCR Groups XML Configuration GroupsConfiguration Using XML Icmp Configuration Using XML Configuration Using XML Configuration Using XML Configuration Using XML URI XSR Group and Items XML Status Record Groups and ItemsConfiguration Using XML Configuration Using XML LISTEN, Synrecvd Configuration Using XML Status Configuration Using XML Group Name Item Name Configuration Using XML Configuration Using XML Commands and Levels Accept tunnel-accept1 level commands Commands and LevelsFlushes the serial data buffer upon establishing an accept Remove ip IP address Arp config-arp level commandsCli config-cli level commands Add IP address MAC addressConnect tunnel-connect1 level commands Configure config level commandsIf instance Host instance Cp email-cp3 level commands Cp email-cp4 level commandsCp email-cp1 level commands Cp email-cp2 level commandsCp output tunnel-connect-cpoutput1 level commands Add cp to group bit Cp output tunnel-accept-cpoutput1 level commandsCpm cpm level commands Add cp to groupDiagnostics config-diagnostics level commands Device device level commandsDisconnect tunnel-disconnect1 level commands Lookup hostorip Timeout millisecondsDiscovery config-discovery level commands Dns dns level commandsFrom text Email 1 email1 level commandsCc text Email numberTo text Email 2 email2 level commandsEmail 3 email3 level commands Email 4 email4 level commands Commands and Levels Enable enable level commands Ftp config-ftp level commands Filesystem filesystem level commandsHost 1 tunnel-connect-host11 level commands Port number Host 10 tunnel-connect-host110 level commands Host 11 tunnel-connect-host111 level commands Host 12 tunnel-connect-host112 level commands Host 13 tunnel-connect-host113 level commands Host 14 tunnel-connect-host114 level commands Host 15 tunnel-connect-host115 level commands Tunneling Show Shows the current configuration Show history Host 16 tunnel-connect-host116 level commands Host 2 tunnel-connect-host12 level commands Host 3 tunnel-connect-host13 level commands Host 4 tunnel-connect-host14 level commands Host 5 tunnel-connect-host15 level commands Host 6 tunnel-connect-host16 level commands Commands and Levels Host 7 tunnel-connect-host17 level commands Host 8 tunnel-connect-host18 level commands Host 9 tunnel-connect-host19 level commands Http config-http level commands Icmp config-icmp level commands Ipv6 address ip address/prefixlength Icmpv6 config-icmpv6 level commandsIf 1 config-ifeth0 level commands Ip address ip address/cidrLine 1 line1 level commands Ip config-ip level commandsBaud rate bits per second Name text Gap timer millisecondsLink config-etherneteth0 level commands Modem tunnel-modem1 level commands Log config-diagnostics-log level commandsPacking tunnel-packing1 level commands Serial tunnel-serial1 level commands Root level commandsSmtp config-smtp level commands Telnet config-cli-telnet level commands Syslog config-syslog level commandsHost text Terminal 1 config-terminal1 level commands Terminal network config-terminalnetwork level commands Xcr dump group list Tunnel 1 tunnel1 level commandsXml xml level commands Secret xcr export file group listXsr dump group list Xcr import file group listXsr export file group list
Related manuals
Manual 74 pages 16.36 Kb