Creating a "better" backup strategy for MikroTik RouterOS involves moving beyond the basic binary backup file. A robust strategy ensures you can recover not just the configuration, but also specific settings and scripts, on any hardware version. Here is a guide to creating a comprehensive MikroTik backup and restore strategy.
The Ultimate Guide to MikroTik Backup & Restore A "better" backup strategy relies on the 3-2-1 Rule (3 copies, 2 media types, 1 off-site) and utilizing MikroTik’s export tools rather than just the binary backup file. 1. Understand the Two Types of Backups Before creating backups, you must understand the difference between the two methods available in RouterOS. A. The Binary Backup ( .backup )
What it is: A proprietary, encrypted binary file. Pros: Contains absolutely everything (passwords, certificates, logs, DHCP leases). Cons: Hardware-specific. You generally cannot restore a binary backup from a hAP ac² onto a CCR2004. Use case: Quick full restores on the exact same hardware .
B. The Config Export ( .rsc )
What it is: A plain text script containing the commands to recreate the configuration. Pros: Human-readable, editable, and hardware-independent. You can copy the text, paste it into a terminal on a different router model, and it will work (mostly). Cons: Does not contain binary data like SSH keys or certificates (unless exported separately) and does not save passwords in plain text by default. Use case: Migrating config to new hardware, partial restores, and version control (Git).
2. How to Create a "Better" Backup Do not rely on just the .backup file. Always generate both. Method 1: Via WebFig or WinBox
Go to Files . Click Backup . Enter a name (e.g., 2023-10-27_full ). Enter a password (highly recommended). Click Backup . (This creates the .backup file). mikrotik backup restore better
For the text export:
Open New Terminal . Type: export file=2023-10-27_config This creates a file named 2023-10-27_config.rsc .
Method 2: Via Terminal (Scriptable) This is the preferred method for automation. Run these commands: # 1. Create binary backup with password /system backup save name=backup_binary password=YourStrongPassword 2. Create text export (hide-sensitive keeps passwords hidden) /export file=backup_config hide-sensitive 3. (Optional) Create a complete export including passwords (Be careful with this file!) /export file=backup_config_sensitive The Ultimate Guide to MikroTik Backup & Restore
3. Automating Backups (The "Better" Way) Manual backups are often forgotten. Use the built-in scheduler to email or upload backups automatically. Example: Email Backup Script This script sends the binary backup to your email every week.
Configure Email Tool: /tool e-mail set address=smtp.gmail.com port=587 tls=starttls user=your-email@gmail.com password=your-app-password