Mikrotik Export Configuration May 2026
To report or export the configuration of a MikroTik router, you use the /export command in the terminal. Unlike a standard binary backup, an export creates a plain-text script (.rsc) containing the commands needed to recreate your settings. Quick Export Commands
Run these in the New Terminal window within Winbox or an SSH session: Goal Full Report export file=myconfig Saves the entire config to myconfig.rsc. Compact Report export compact file=myconfig Saves only changes from default settings. Verbose Report export verbose file=myconfig
Saves all settings, including defaults (useful for reference). Partial Report /ip address export file=ips Exports only a specific section (e.g., IP addresses). Hide Passwords export hide-sensitive
Exports the config without sensitive data (passwords, keys). Step-by-Step Procedure
export config problem - Beginner Basics - MikroTik community forum
command in MikroTik’s RouterOS is a powerful tool used to generate a human-readable script of your device's configuration. Unlike a standard binary backup, an export is a plain-text
file that you can edit, audit, or use to replicate settings across different hardware models. The Core Difference: Export vs. Backup
Understanding the difference is critical for data integrity: /system backup binary file . It is intended for restoring to the exact same mikrotik export configuration
device or identical hardware. It includes sensitive data like local users and passwords. plain-text script
. It is portable between different hardware models and can be opened in any text editor like It typically does export user passwords or decrypted certificates. How to Export Your Configuration You can perform an export using the New Terminal or via SSH. 1. Exporting to the Terminal Screen
To simply view your configuration without saving it to a file, type: Use code with caution. Copied to clipboard
This is useful for quick audits or copying specific sections manually. 2. Exporting to a File To save the configuration as a script file on the router: New Terminal Run the command: export file=my_config Navigate to the menu on the left sidebar. my_config.rsc and drag it to your desktop or right-click to download. 3. Partial Exports
If you only need a specific section (e.g., Firewall rules), navigate to that menu first: /ip firewall filter export file=firewall_only Use code with caution. Copied to clipboard Advanced Export Flags hide-sensitive
: In older RouterOS versions, this prevents passwords (like PPPoE or wireless keys) from appearing in the text file. show-sensitive
: In newer versions, sensitive data is hidden by default; use this flag if you intentionally want to include it. : Formats the output into shorter, more compact lines. How to Import an Exported Configuration To apply a saved file to a new or reset router: Upload the file to the list by dragging and dropping it into New Terminal import file-name=my_config.rsc To report or export the configuration of a
When importing to a different model, always review the script first. Interfaces might be named differently (e.g., sfp-sfpplus1 ), which can cause the script to fail if not adjusted. that you can use for your next export? Difference between backup and export-how to monitor changes
--- INPUT CHAIN (Traffic destined FOR the router) ---
add action=accept connection-state=established,related comment="defconf: accept established,related" add action=drop connection-state=invalid comment="defconf: drop invalid" add action=accept protocol=icmp comment="defconf: accept ICMP (Ping
7. Automation & Scripting
2. verbose – The Nuclear Option
While compact hides details, verbose includes everything—even default settings and initialization commands. This is rarely needed for daily work but is invaluable for debugging why a specific default value was overridden.
Syntax:
/export verbose file=debug-config
1. The Compact Export (Default)
Command: /export
Usage: This is the standard output used for viewing the configuration. It shows only the parameters that have been changed from their default values.
Why use it? It creates a clean, concise script that is easy to read. By omitting default settings, it reduces file size and visual clutter.
Step-by-Step: Migrating a Configuration to New Hardware
Let's walk through a real-world scenario: migrating a production router to brand-new MikroTik hardware.
Step 1: Export with compact and show-sensitive rename ether5 to ether3 if needed)
On the old router:
/export compact show-sensitive file=migration-full
Step 2: Download the .rsc file via WinBox (Files menu) or SCP.
Step 3: Edit the file on your PC. Remove hardware-specific lines such as:
/system routerboard settings(different board IDs)- Interface names that don’t match (e.g., rename
ether5toether3if needed)
Step 4: Upload the edited file to the new router.
Step 5: Reset the new router to defaults (/system reset-configuration).
Step 6: Import the configuration
/import file=migration-full.rsc
Step 7: Verify after reboot. Run /export compact again and compare with the original using a diff tool.
5. Security Considerations
| Practice | Reason |
|----------|--------|
| Never use show-sensitive in production logs | Exports PPP secrets, WiFi passwords, VPN keys |
| Remove exported .rsc files from router after transfer | Files remain in RAM/storage and could be retrieved |
| Encrypt exported files externally | Use zip -e or GPG before storing or emailing |
| Redact default credentials (admin/"") before sharing | Attackers could use known defaults |