Tutorials & Docs
Managing a MikroTik router—whether a small home unit or a massive ISP-level Core Switch—requires careful configuration management. The command-line interface (CLI) in MikroTik RouterOS offers a powerful feature called , which allows administrators to save, transfer, and backup configurations in a human-readable script format.
Recent versions of RouterOS (v7+) introduced stricter security and verbosity controls for exports: Difference between backup and export-how to monitor changes
Quick checklist before sharing an export
Before diving into the syntax, it is vital to understand how an export differs from a standard backup in RouterOS. export Command backup Command Plain-text RouterOS CLI script ( .rsc ) Binary file ( .backup ) Readability Human-readable and editable Encrypted/compiled, unreadable Portability Can be imported to different hardware models Strictly for identical hardware models Partial Export Supports exporting specific sub-menus Full system only Passwords Stripped by default (depends on version) Includes all passwords and sensitive data 2. Basic Export Commands mikrotik export configuration
The primary method for exporting configuration is through the , accessible via Winbox, SSH, or Telnet. Global Full Export
Delete the mac-address parameter from those lines so the new router uses its own hardware MAC addresses. Step 2: Match Interface Names
Your router will now automatically back itself up, ensuring you have a disaster recovery plan in place. Managing a MikroTik router—whether a small home unit
To save the configuration as a script file within the router's internal storage, use the file= argument: /export file=my_router_config Use code with caution.
: This creates a full snapshot of the router's state, including system databases, passwords, and encryption keys. It is hardware-dependent and should generally only be restored onto the exact same physical device or model.
To restore from an exported .rsc file:
set [ find default-name=wlan1 ] ssid="MySecureWiFi" band=2ghz-b/g/n channel-width=20/40mhz-Ce
The export command is more than just a backup tool; it is the language of MikroTik configuration. By mastering the nuances of compact , verbose , and hide-sensitive exports, and understanding how they differ from binary backups, network engineers can ensure they have the flexibility to recover from disasters, migrate to new hardware seamlessly, and audit their network security with precision. Regular exports should be a cornerstone of any MikroTik network management policy.
For maximum security, expand this script to automatically upload the generated file to a remote backup server using /tool fetch via SFTP or email it using /tool e-mail . Summary Checklist for MikroTik Exports export Command backup Command Plain-text RouterOS CLI script
The , created with /export , saves your settings as a plain-text script file , making it a much more flexible tool for migrating configurations between different devices or simply for having a version-controlled, human-readable history of your setup. It is considered "version-safe" as you can edit and import it across different hardware and RouterOS versions without major issues. This guide focuses on the export command, which is the cornerstone of modern network management.
/interface list member add comment=defconf interface=bridge-local list=LAN add comment=defconf interface=ether1-WAN list=WAN