Backup and recovery

Backup vs Export in RouterOS: Saving and Restoring a MikroTik Configuration

When to use a binary .backup file and when to use a text .rsc export, how to create both safely in RouterOS v7, and how to restore without surprises.

Commands in this article follow RouterOS v7 documentation but have not yet been marked as lab-tested on this site. Always test changes in a lab or maintenance window and keep a backup.

Problem

You are about to change a production router — or you need to move a configuration to a new device — and you are not sure whether to take a backup or an export. Picking the wrong one is how people end up with a restore that fails, or a new router that copies the old one's MAC addresses.

Symptoms

  • A .backup file from one router will not restore cleanly on a different model.
  • An imported .rsc file stops halfway with an error.
  • After a restore, interfaces or passwords are not what you expected.

Likely causes

  • A backup is a binary snapshot of one specific device. It includes user passwords, certificates and interface MAC addresses, and it is meant to be restored on the same router (or an identical replacement).
  • An export is a readable script. It is portable and easy to review, but it only contains configuration you can type — and in RouterOS v7 it hides passwords and keys unless you ask for them.

Prerequisites

  • Full-permission login (WinBox, WebFig or SSH).
  • Somewhere off the router to keep the files — a router that dies takes its local files with it.

Solution

1. Take a binary backup (for restoring this same router)

In WinBox: Files → Backup, enter a name and a password, then Backup. Or in the terminal:

RouterOS CLI
# Encrypted backup of this router
/system backup save name=before-change password=Use-A-Strong-Passphrase

2. Take a text export (for reading, comparing and reusing)

RouterOS CLI
# Readable configuration; secrets are hidden by default in v7
/export file=config-before-change

# Include passwords and keys only when you truly need them, and store the file securely
/export show-sensitive file=config-full

3. Copy both files off the router

Drag them out of Files in WinBox, or download with SFTP. Then confirm they exist:

RouterOS CLI
/file print where name~"before-change|config-"

Verification

  • Open the .rsc file in a text editor: you should see sections such as /interface, /ip address and /ip firewall filter.
  • Note the file sizes and dates in Files so you know which copy is current.

Common errors

  • Restoring a backup on a different model. Use the export instead and apply only the sections you need.
  • Importing a full export on top of an existing configuration. Duplicate entries cause errors. Reset first, or import only selected sections.
  • Forgetting the backup password. An encrypted backup cannot be restored without it.

Rollback

To roll back on the same router, load the backup. The router reboots immediately, so do this in a maintenance window:

RouterOS CLI
/system backup load name=before-change.backup password=Use-A-Strong-Passphrase

Tip: For small, risky edits, turn on Safe Mode first (the Safe Mode button in WinBox, or Ctrl+X in the terminal). If your session drops, RouterOS undoes the changes made since Safe Mode was enabled.

Go deeper in class

This topic is covered hands-on in MTCNA — MikroTik Certified Network Associate.

View MTCNA