Chapter 5
Changing Configuration Data
RUGGEDCOM NETCONF
Reference Guide
44
Copying Data
</target>
</lock>
</rpc>]]>]]>
The device responds with the following:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1011">
<ok/>
</rpc-reply>]]>]]>
The candidate configuration is now locked.
Section 5.2.2
Copying Data
You can use the copy-config command to do the following:
• copy a specified configuration to an XML file on the device. Do this when you want to save a configuration to a
file and then download the file through the web interface or command line interface.
• copy an XML file on the device to a specified configuration. Do these when you want to overwrite a specified
configuration with a file that has been uploaded to the device through the web interface or through the
command line interface.
When using copy-config to save the configuration to an XML file, the file is saved in the
/var/lib/config
directory on the device. You can download the through the RUGGEDCOM ROX II Web interface or through the
command line interface.
To save a configuration to an XML file, do the following:
1. Connect to and log in to the device.
2. Issue the copy-config command:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<copy-config>
<target>
<url>file:///{filename.xml}</url>
</target>
<source>
<{configuration}/>
</source>
</copy-config>
</rpc>]]>]]>
•
{filename.xml}
Specify a filename for the new XML file.
•
{configuration}
Specify the configuration to save: running or candidate.
For example, this command saves the running configuration to a file named
running_config_01.xml
:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<copy-config>
<target>
<url>file:///running_config_01.xml</url>
</target>
<source>
<running/>
Summary of Contents for RUGGEDCOM MX5000RE
Page 8: ...Table of Contents RUGGEDCOM NETCONF Reference Guide viii ...
Page 12: ...Preface RUGGEDCOM NETCONF Reference Guide xii Customer Support ...
Page 26: ...Chapter 1 Introduction RUGGEDCOM NETCONF Reference Guide 14 Sample Session Editing Data ...
Page 40: ...Chapter 3 NETCONF Sessions RUGGEDCOM NETCONF Reference Guide 28 Killing a Session ...
Page 64: ...Chapter 5 Changing Configuration Data RUGGEDCOM NETCONF Reference Guide 52 Committing Changes ...
Page 148: ...Chapter 8 NETCONF XML Elements RUGGEDCOM NETCONF Reference Guide 136 validate ...