Skip to content
Back to Blog
MikroTik

Backup and Restore in MikroTik: Protecting Your Configuration

Learn the difference between .backup and export in MikroTik, how to restore configurations, and best practices for config protection.

May 2026
8 min read

Backing Up and Restoring RouterOS Configuration

Having a current backup of your router configuration is essential. Hardware can fail, misconfigurations can happen, and firmware upgrades can occasionally cause unexpected issues. A backup lets you recover quickly.

RouterOS offers two distinct backup methods, each with different use cases.

Method 1: Binary Backup (/system backup)

A binary backup saves the entire RouterOS configuration in a compressed binary file. This is the fastest method and captures everything, including passwords.

Creating a Backup

TEXT
/system backup save name=myrouter-2024-01-15

This saves a file called myrouter-2024-01-15.backup to the router flash storage. To see it:

TEXT
/file print

Downloading the Backup

You can download the .backup file via Winbox (Files menu) or SCP:

TEXT
scp admin@192.168.1.1:myrouter-2024-01-15.backup ./

Restoring from Binary Backup

Upload the backup file to the router, then:

TEXT
/system backup load name=myrouter-2024-01-15.backup

The router will reboot and restore the saved configuration. Note: This restores the configuration from the exact RouterOS version that created the backup. Restoring a backup from a very different version may cause issues.

Password Protection

You can optionally add a password to the backup:

TEXT
/system backup save name=myrouter-2024-01-15 password=BackupPass123

Then when restoring:

TEXT
/system backup load name=myrouter-2024-01-15.backup password=BackupPass123

Method 2: Export (/export)

The export command generates a human-readable .rsc script file containing RouterOS commands that recreate the configuration. This is more portable and version-independent.

Full Export

TEXT
/export file=myrouter-export-2024-01-15

This creates myrouter-export-2024-01-15.rsc — a plain text file you can open in any editor.

Exporting a Specific Section

You can export just part of the configuration:

TEXT
/ip address export file=ip-addresses
/ip firewall export file=firewall-rules
/interface export file=interfaces

Viewing the Export Without Saving

TEXT
/export

This prints the configuration to the terminal, useful for quickly reviewing settings.

Compact Export (Hides Defaults)

TEXT
/export compact file=myrouter-compact

The compact flag only shows settings that differ from RouterOS defaults, making the file smaller and easier to read.

Restoring from Export

Upload the .rsc file to the router, then import it:

TEXT
/import file=myrouter-export-2024-01-15.rsc

This runs the commands in the file line by line. If your router already has conflicting configuration, some commands may fail — it is best to import onto a fresh or reset router.

Comparing the Two Methods

Feature/system backup/export
FormatBinaryPlain text (.rsc)
PasswordsIncludedNot included by default
Version dependencyYesNo (mostly)
Human readableNoYes
Partial backupNoYes
Import on clean routerYesYes

Best Practices

  • Schedule regular backups: Use the RouterOS scheduler to run backups automatically.
TEXT
/system scheduler add name=weekly-backup interval=7d on-event="/system backup save name=auto-backup" start-time=00:00:00
  • Store backups off-router: Always download backups to a remote location. If the router dies, you cannot access files stored on it.
  • Test restores: Periodically verify your backup actually works by restoring it to a test router.
  • Use both methods: Keep a binary backup for fast recovery and an export for version portability.
  • Name files with dates: Include the date in the file name so you know which backup is most recent.

Sending Backups via Email

RouterOS can email backups automatically:

TEXT
/tool e-mail set server=smtp.example.com from=router@example.com
/system scheduler add name=email-backup interval=7d on-event="/system backup save name=weekly; /tool e-mail send to=admin@example.com subject=RouterBackup file=weekly.backup"

Summary

  • Use /system backup save for quick, complete binary backups.
  • Use /export for human-readable, portable configuration scripts.
  • Always store backups off the router.
  • Schedule automatic backups with /system scheduler.
  • Test your backups regularly to ensure they actually work.