...
The following command parameters are accepted:
Property | Description |
---|---|
compact | Output only modified configuration, the default behavior |
file | Export 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. |
terse | With 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:
Property | Description |
---|---|
from-line | Start executing the script from the specified line number |
file-name | Name of the script (.rsc) file to be executed. |
verbose | Reads 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. |
...
Property | Description | ||
---|---|---|---|
keep-users | Do not remove existing users from the configuration | ||
no-defaults | Do not load the default configuration, just clear the configuration | ||
skip-backup | Skip automatic backup file generation before reset | ||
run-after-reset | Run specified .rsc file after reset. That way you can load your custom configuration.
|
...
|
For example hard reset configuration without loading default config and skipping backup file:
...