Brocade Network OS NETCONF Operations Guide v4.1.1 User Manual

Page 52

Advertising
background image

20

Network OS NETCONF Operations Guide

53-1003231-02

Managing the configuration

2

The most common configuration management operation is to copy the running-config file to the
startup-config file. You must perform this operation to save configuration changes across reboots.
To copy the running-config file to the startup-config file, issue the following RPC.

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="212">

<bna-config-cmd xmlns="urn:brocade.com:mgmt:brocade-ras">

<src>running-config</src>

<dest>startup-config</dest>

</bna-config-cmd>

</rpc>

<rpc-reply message-id="212" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<session-id xmlns="urn:brocade.com:mgmt:brocade-ras">5</session-id>

<status xmlns="urn:brocade.com:mgmt:brocade-ras">in-progress</status>

</rpc-reply>

To monitor the progress of the copy operation, issue the <bna-config-cmd-status> custom RPC.
Provide the session-ID returned by the corresponding <bna-config-cmd> as the input parameter.

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="212">

<bna-config-cmd-status xmlns="urn:brocade.com:mgmt:brocade-ras">

<session-id>5</session-id>

</bna-config-cmd-status>

</rpc>

<rpc-reply message-id="212" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<status xmlns="urn:brocade.com:mgmt:brocade-ras">completed</status>

</rpc-reply>

To archive or back up the running-config or startup-config file, specify <running/> or <startup/> as
the <src> parameter, and the URL of the archive as the <dest> parameter. The following example
archives the running-config file.

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="212">

<bna-config-cmd xmlns="urn:brocade.com:mgmt:brocade-ras">

<src>running-config</src>

<dest>https://[email protected]:passphrase/cfg/archiveMay7.txt</dest>

</bna-config-cmd>

</rpc>

<rpc-reply message-id="212" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<session-id xmlns="urn:brocade.com:mgmt:brocade-ras">6</session-id>

<status xmlns="urn:brocade.com:mgmt:brocade-ras">in-progress</status>

</rpc-reply>

To restore an archived configuration, specify the archive URL as the <source> parameter and
<running/> or <startup/> as the <target>.

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="212">

<bna-config-cmd xmlns="urn:brocade.com:mgmt:brocade-ras">

<src>https://[email protected]:passphrase/cfg/archiveMay7.txt</src>

<dest>running-config</dest>

</bna-config-cmd>

</rpc>

<rpc-reply message-id="212" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

<session-id xmlns="urn:brocade.com:mgmt:brocade-ras">6</session-id>

<status xmlns="urn:brocade.com:mgmt:brocade-ras">in-progress</status>

</rpc-reply>

Advertising