Mikrotik Back-It-Up: The Ultimate Guide to RouterOS Backups Protecting your network configuration is the single most important maintenance task for any system administrator. A single hardware failure, power surge, or mistaken configuration command can take your entire network offline. For MikroTik users, RouterOS provides powerful, built-in tools to ensure you never lose your settings.
This guide covers the two distinct backup methods in MikroTik, how to automate them, and how to safely restore your data. Binary Backups vs. Script Exports
MikroTik offers two completely different ways to save your configuration. Understanding the difference is critical for a successful recovery. 1. The Binary Backup (.backup)
This method creates a complete snapshot of the router’s entire system state.
What it contains: System files, user passwords, encryption keys, and licenses. Format: Encrypted, non-readable binary file.
Best use case: Restoring the exact same physical router after a failed upgrade or system reset.
Limitation: Cannot be reliably restored onto a different router model, as it copies interface names and hardware-specific MAC addresses. 2. The Configuration Export (.rsc)
This method generates a text file containing the precise Terminal commands needed to recreate your setup.
What it contains: Readable RouterOS CLI commands (e.g., /ip address add…). Format: Plain text script.
Best use case: Migrating configurations to a new or upgraded MikroTik model, or auditing changes.
Limitation: By default, it excludes sensitive data like local user passwords and security keys. How to Create Manual Backups
You can back up your MikroTik router using either the WinBox graphical interface or the Command Line Interface (CLI). Using WinBox (GUI) Open WinBox and connect to your router. Navigate to Files in the left-hand menu.
To create a binary backup: Click Backup, choose a file name, set a password (highly recommended), and click Backup.
To create a text export: Click Export, specify a file name, and click Start.
Drag and drop the newly created files from the WinBox File List window directly onto your computer desktop. Using the CLI (Terminal) For a binary backup, run this command:
/system backup save name=my_router_backup password=YourSecurePassword Use code with caution. For a text script export, run this command: /export file=my_router_config Use code with caution. Automating Your Backups with Scripts
Manual backups are easily forgotten. You can automate MikroTik to back itself up weekly and email the files directly to your inbox using a built-in RouterOS script. Step 1: Configure Your Email Settings
Before scheduling backups, configure your SMTP settings so the router can send external mail:
/tool e-mail set address=://gmail.com port=587 start-tls=yes [email protected] [email protected] password=your_app_password Use code with caution. Step 2: Create the Backup Script
Navigate to System -> Scripts in WinBox, add a new script named email-backup, and paste the following code:
:local routerName [/system identity get name]; :local fileName (\(routerName . "-" . [:pick [/system clock get date] 0 3] . "-" . [:pick [/system clock get date] 4 6] . "-" . [:pick [/system clock get date] 7 11]); /system backup save name=\)fileName password=YourSecurePassword; :delay 5s; /tool e-mail send to=“[email protected]” subject=(\(routerName . " Backup") body=("Attached is the automated backup for " . \)routerName) file=$fileName; Use code with caution. Step 3: Schedule It
Navigate to System -> Scheduler to run the script automatically every 7 days:
/system scheduler add name=weekly-backup-task start-date=startup interval=7d on-event=email-backup Use code with caution. How to Restore Your Configuration
When disaster strikes, follow these steps to recover your network. Restoring a Binary Backup Upload the .backup file to the Files section of the router. Select the file and click Restore. Enter the backup password and confirm the system reboot. Restoring a Script Export
If you are moving to a new router model, a binary restore will fail. Use the text export instead:
Open the .rsc file on your computer using a text editor (like Notepad++).
Remove hardware-specific lines, such as old MAC addresses or interface names that do not match the new device.
Open the new router, click New Terminal, and paste the edited commands to build your configuration piece by piece. Summary Checklist for Network Admins
Never use binary backups across different models. It causes interface errors.
Always encrypt binary backups. Unencrypted backups expose your network topology.
Store copies off the device. A dead router means dead backup files if they are only stored internally.
Keep both formats handy. Save a .backup file for quick recovery and an .rsc file for future hardware upgrades. If you want to set up this automation, let me know: Which RouterOS version you are currently running?
Do you prefer saving backups to an email, an FTP server, or a cloud drive?
Do you need help setting up secure password encryption for your files?
I can provide the exact script syntax tailored to your specific infrastructure.
Leave a Reply