Rolling Back Configuration Changes

This sample procedure shows how to use the rollback command to return to the most recently committed configuration. This command is useful if you make configuration changes, and then decide not to keep the changes.

This example shows how to view the default configuration for redirect server when the component is running, make configuration changes for redirect server, then return to the most recently committed configuration that does not include the changes. Redirect server redirects HTTP requests to a captive portal page.

  1. Enter configuration mode.
    user@host> configure Entering configuration mode.[edit]user@host#
  2. View the current configuration (if any) for redirect server.
    [edit]
    user@host# show redirect-server
    tcp-port 8800;
    destination-url;
    refresh;
    refresh-document etc/refresh.html;
    request-rate 12000;
    request-burst-size 18000;
    client-rate 25;
    client-burst-size 50;

    The statements in the output show the default configuration for redirect server.

  3. Configure the destination URL for redirect server.
    [edit]user@host# set redirect-server destination-url http://www.mycompany.com/default.html
  4. View the updated configuration.
    [edit]
    user@host# show redirect-server
    tcp-port 8800;
    destination-url http://www.mycompany.com/default.html;
    refresh;
    refresh-document etc/refresh.html;
    request-rate 12000;
    request-burst-size 18000;
    client-rate 25;
    client-burst-size 50;

    The destination-url statement shows the new URL.

  5. Use the rollback configuration mode command to return to the most recently committed configuration.
    [edit]user@host# rollback rollback complete.
  6. View the configuration again to make sure that your change is no longer present.
    [edit]
    user@host# show redirect-server 
    tcp-port 8800;
    destination-url;
    refresh;
    refresh-document etc/refresh.html;
    request-rate 12000;
    request-burst-size 18000;
    client-rate 25;
    client-burst-size 50;

    The destination-url statement shows there is no URL.

  7. Exit configuration mode.
    [edit]user@host# exit Exiting configuration mode.

 

Related Documentation