Download PDF
Home

1. RBFS CLI Overview

The RBFS command-line interface (CLI) provides a set of commands that you can use to monitor and configure devices running RBFS.

This document contains information about the RBFS CLI.

1.1. Starting CLI

The example below shows how to start the RBFS CLI.

admin@rtbrick:~$ cli
admin@rtbrick: op>
[ You are in operation mode]

1.2. Switching different modes

The example below shows how to switch between modes.

admin@rtbrick: op> switch-mode
    config                Enter a given mode
    debug                 Enter a given mode
    operation             Enter a given mode

The example below shows how to switch from the operation mode to the config mode.

admin@rtbrick: op> switch-mode config
admin@rtbrick: cfg>

1.3. Committing CLI configurations

The example below shows how to commit your changes.

admin@rtbrick:~$ cli
admin@rtbrick: cfg> <cli command goes here>
admin@rtbrick: cfg> commit

1.4. Viewing configuration

The example below shows how to view configuration.

admin@rtbrick: cfg> show config

1.5. Viewing uncommitted changes

To view the uncommitted changes, enter the following command:

admin@rtbrick: cfg> show diff

1.6. Saving configuration

To save configuration, enter the following command:

admin@rtbrick: cfg> save config my_config.json
Note
  • Ensure that you use .json at the end of the filename.

  • The configuration will be saved to the current working directory of CLI executable.

1.7. Loading configuration

To load configuration, enter the following command:

admin@rtbrick: cfg>  load config <filename>
Note
  • Ensure that you use .json at the end of the filename.

  • Remember to commit your changes after loading.

1.8. Viewing configuration in set format

To view configuration in a set format, enter the following command:

admin@rtbrick: cfg>  show config set

1.9. Viewing configuration in a given hierarchy [show config followed by your hierarchy]

To view configuration in a given hierarchy, enter the following command:

admin@rtbrick: cfg>  show config instance red address-family

1.10. Turn Paging on/off

To turn the paging on/off, enter the following command:

admin@rtbrick: cfg>  paging
      off      Pagination for commands that spwan more than screen length
      on       Pagination for commands that spwan more than screen length

1.11. Discarding the uncommitted diff

To discard the uncommitted diff, enter the following command:

admin@rtbrick: cfg> discard

1.12. Deleting entire running-config at a time

To delete the entire running-configuration at a time, enter the following command:

admin@rtbrick: cfg> discard all

1.13. Rollback to previous committed configurations

You can rollback to a previously committed configuration file if you need to revert to a previous configuration. RBFS saves the last 50 committed configurations, including the rollback ID, commit ID, and time.

1.13.1. Viewing commit log

To view the commit log, enter the following command:

show commit

admin@rtbrick: *> show commit
rollback ID                          Commit-ID                			       Timestamp
0		      29d5db038c1920fdsdsdsdsdsd323232       2021-01-28T09:44:25.175048+0000
1		      29d8998a8c1920fdsdsdsdsdsd323232       2021-01-26T05:44:25.175048+0000
2		      59d5db038c1920fdsdsdsdsdsd323232       2021-01-22T09:40:25.175048+0000
49	          29d5d988999q20fdsdsdsdsdsd323232       2021-01-2T01:44:25.175048+0000

1.13.2. Viewing the configuration differences between the current and the versions

In RBFS you can view the configuration differences between the current and the previous versions.

show diff <number>

admin@rtbrick: cfg> show diff 2
 system {
-    secure-management-status false;
+    secure-management-status true;
 }
admin@rtbrick: cfg>

1.13.3. Rollback to a previously committed configuration

To rollback to a specific configuration prior to the most recently committed one, enter the following command:

rollback <number>

<number> - Specifies the rollback ID. Range: 1 through 49. 0 refers to the active configuration, 1 to the most recent previous configuration. Default: 1

For example, to rollback to rollback ID 2, enter following command:

admin@rtbrick: cfg> rollback 2

1.13.4. Rollback to a specific version of the software configuration

To rollback to a specific version of the software configuration, enter the following command:

rollback commit-id <commit-hash>

Example:

admin@rtbrick: cfg> rollback commit-id 29d5db038c1920fdsdsdsdsdsd323232

©Copyright 2021 RtBrick, Inc. All rights reserved. The information contained herein is subject to change without notice. The trademarks, logos and service marks ("Marks") displayed in this documentation are the property of RtBrick in the United States and other countries. Use of the Marks are subject to RtBrick’s Term of Use Policy, available at https://www.rtbrick.com/privacy. Use of marks belonging to other parties is for informational purposes only.