Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following command parameters are accepted:

PropertyDescription
compactOutput only modified configuration, the default behavior
fileExport configuration to a specified file. When the file is not specified export output will be printed to the terminal

show-sensitive (yes|no; Default: no). RouterOS version 7 only

hide-sensitive (yes|no; Default: no). RouterOS version 6 only

Show sensitive information, like passwords, keys, etc.

Hide sensitive information, like passwords, keys, etc.

terseWith this parameter, the export command will output only configuration parameters, without defaults.
verbose

With this parameter, the export command will output whole configuration parameters and items including defaults.

For example, export configuration from /ip address the menu and save it to a file:

...

Import command allows to specify the following parameters:

PropertyDescription
from-lineStart executing the script from the specified line number
file-nameName of the script (.rsc) file to be executed.
verboseReads each line from the file and executes individually, allowing to debug syntax or other errors more easily.
Tip

If the device has a default or existing configuration that requires replacement, it is necessary to initiate a configuration reset.

This involves applying a clean, empty configuration using the command /system/reset-configuration no-defaults=yes, followed by a device reboot.

...

PropertyDescription
keep-usersDo not remove existing users from the configuration
no-defaultsDo not load the default configuration, just clear the configuration
skip-backupSkip automatic backup file generation before reset
run-after-reset

Run specified .rsc file after reset. That way you can load your custom configuration.

Note

If a specific .rsc file execution takes more than 2 minutes, a script will fail, and LOG will contain

...

"runtime limit exceededor in rare cases "std failure: timeout" error.


For example hard reset configuration without loading default config and skipping backup file:

...