Steps to Backup Mikrotik Configuration and Restore via Winbox

How to Backup Mikrotik Configuration and Restore via Winbox

Backing up your MikroTik router’s configuration with Winbox is like creating a safety net for your network settings.

It captures all the essential information about your router, including firewalls, routing rules, and wireless settings.

This becomes crucial if your router malfunctions or needs a reset.

With a saved backup, you can quickly restore your network to its previous state using Winbox, saving you time and effort from manually reconfiguring everything.

Mikrotik Configuration backup process through GUI

Using the graphical user interface for some users, especially beginners, is an easier way to apply settings. On your Mikrotik VPS, follow the below steps:

1. Connect to the Mikrotik router using Winbox with Admin privileges.

2. After entering the Mikrotik router by Winbox, find the “File” item on the left side and click on it to open the File List window.

How to Backup Mikrotik Configuration

3. Select the “Backup” option.

Backup and Restore Mikrotik Configuration

4. In the name input field, specify a name for the Mikrotik backup configuration file.

You can specify a password for the backup file to increase the security of the backup file you create( It is Optional).

For this, set a strong and safe password in the Password field to prevent other people from accessing the Mikrotik configuration backup file.

The encryption field is used to select the encryption options to encrypt the backup file, which we recommend to accept the default selection.

You can also skip encryption by checking the check box next to “Don’t Encrypt” because if you plan to use the backup file to recover the password, you should not encrypt the backup file.

Finally, click on the “Backup” option.

Select backup option

5. In the file list window, you will see the backup file you just created. Select the backup file you just created and then right-click to download it.

Select the “Download” option from the drop-down menu.

Select "Download" option

Select the desired folder and path where you want the downloaded backup file to be saved, then click “Ok.”

Go to the location where you saved the backup file and run the backup file.

There is an easier way to copy and download the desired backup file, drag it from the Winbox environment, and drop it in the desired location on your PC.

To delete the backup file you created from Mikrotik, select it and click on the red icon in the top bar.

delete the backup file

Mikrotik Configuration backup process through CLI

The Mikrotik backup config command line also helps in backup Mikrotik configuration.

Some users are interested in applying settings through the Mikrotik command prompt as an alternative method.

After connecting to the Mikrotik router through Winbox, click the “New terminal” option.

Run the following commands with Admin privileges:

[admin@MikroTik] > system backup save name=MikroTikBackup dont-encrypt=yesSaving system configuration
Configuration backup saved
[admin@MikroTik] >

Final Notes:

  • You can also run theexport file= desired backup name.cfgcommand in the Winbox terminal environment to create a backup file of the Mikrotik configuration with the extension .rsc Text File and, like the GUI method, find the backup file through the “File” section and drag it from the Winbox environment and drop it into the desired folder on your PC.
  • The Backup Mikrotik rsc file is human-readable, allowing you to review or edit the configuration if needed.
  • MikroTik doesn’t have a direct “save config” command like some other routers. Mikrotik save config can be done by using the export command or using the system backup feature.

Restoring MikroTik configuration backup file using GUI

Creating a Mikrotik configuration backup file has many advantages; one of its most common uses is configuring a new router.

The steps to restore Mikrotik’s backup file through Winbox GUI are not complicated at all, you will come to this conclusion in the following.

To restore the Mikrotik support file, follow the instructions below.

1. Connect to the Mikrotik router through Winbox.

2. Access the unconfigured router by selecting the “Neighbors” tab. (Check if the OS version of the previous router and the unconfigured router are the same.)

3. Select the “File” option.

4. Select the “Upload” option in the File List window.

how to Restore Mikrotik Configuration backup file via Winbox

5. Select the backup file and click on “open.”

Select backup file

Note: You can drag the backup file from your PC to the File list window to transfer the backup file to the File window.

6. Therefore, the backup file you created will be available in the new router, and now to restore it, you must select the support file and click on the “Restore” option.

Select Restore option

7. By selecting the Restore option, if you have set a password for the backup file, you will be asked for the password of the backup file.

Therefore, enter the password of the backup file in the Password field. Then click on “Restore.”

Restore Mikrotik Backup File

Answer” yes” to the request to confirm the restore configuration and reboot.

confirm the restore configuration

As a result, you will be disconnected from your router, and it will take some time for the router to reboot.

Click on the “Refresh” button to see your router with a new identity because the new router restores the configuration from the backup file.

By selecting the “connect” option, you will receive the previous router configuration when logging into your new Mikrotik router.

Select Connect Option

Congratulations, you have successfully restored the backup configuration.

Restoring MikroTik Configuration Backup File Using CLI

The Mikrotik command prompt is an ideal method for some users to restore the Mikrotik configuration backup file.

After connecting to the new router using Winbox and selecting New terminal, run the following commands:

[admin@MikroTik] > system backup load name=MikroTikBackuppassword:
Restore and reboot? [y/N]: y
Restoring system configuration
System configuration restored, rebooting now
[admin@MikroTik] >

To ensure a safe rollback in case of configuration issues, you can use the /system backup save filename=[backup_filename.backup] command before making significant changes to your MikroTik router.

How to Backup Mikrotik Settings?

On the below steps, follow the paths:

  • Web Interface: Login > Files > Backup (optional: name & password).
  • Winbox: Connect > Files > New > Backup (optional: name & password).
  • Terminal: Upload backup file (if needed).
  • Terminalcd /files (navigate to backup location).
  • Terminal/system backup load filename=[backup_filename.backup].
  • Both Methods: Confirm & enter password (if needed).
  • Both Methods: Monitor restoration progress.
  • Web/Winbox: Download backup for safekeeping.
  • Both Methods: Reboot (unless using dont-reboot option in terminal).
  • Store backup securely (separate from router).

How do I Back up my Mikrotik Router Configuration?

There are two main methods to back up your Mikrotik router configuration:

Method 1: Using the MikroTik RouterOS Web Interface

  • Log in to your MikroTik RouterOS with a web interface using a user with admin privileges.
  • Click on the Files menu on the left side of the screen.
  • Click on the Backup button at the top of the files window.
  • Optional: You can name your backup file here and set a password for added security.
  • Encryption: The default encryption is usually sufficient, but you can choose a different option if desired.
  • Click the Backup button again.

This will create a backup file (usually named “backup.backup”) in the RouterOS file system. You can then download this file to your computer for safekeeping.

Method 2: Using Winbox

Winbox is a free graphical configuration tool for MikroTik RouterOS.

  • Download and install Winbox from the MikroTik website.
  • Connect to your MikroTik router using Winbox.
  • Navigate to the File list.
  • Right-click on a space in the list and select New.
  • Choose Backup from the menu.
  • Optional: You can name your backup file here and set a password for added security.
  • Encryption: The default encryption is usually sufficient, but you can choose a different option if desired.
  • Click OK.

This will create a backup file and download it to your computer.

How to Export all Mikrotik Configuration?

Follow the below steps for the Mikrotik export config:

  • Export your entire MikroTik configuration with the /export command in the terminal:
  • Access the MikroTik terminal with admin privileges.
  • Type: /export (shows config in terminal).
  • Optional: Save to a file: /export > [filename].rsc (replace [filename] with your name).

This creates a script Mikrotik restore rsc file (.rsc file) for recreating your configuration, not a human-readable text file.

You can use “/export file=mybackup.rsc” in MikroTik to create a backup of your configuration for safekeeping.

How to Restore the Backup Mikrotik Terminal?

  1. Access the MikroTik terminal.
  2. Upload backup file (if needed).
  3. Use /system backup load filename=[backup_filename.backup].
  4. Confirm and enter the password (if needed).
  5. Monitor the restoration process.
  6. Reboot (unless using dont-reboot option).

How to Reset Mikrotik Configuration Command?

There are two main ways to reset the MikroTik configuration, using the command line:

  • Software Reset (Preferred): /system reset-configuration.
  • Hardware Reset Button: Less precise, consult your device’s manual for specific instructions.

How to Convert MikroTik Backup File to Text?

MikroTik backup config files (“.backup” extension) cannot be directly converted to readable text format.

They are designed for internal use by the RouterOS and contain compressed configuration data.

However, you can use one of the below methods:

  • Using the Terminal Window: Type the following command for Mikrotik export configuration in plain text format:
/export file=Backup_File_Name compact
  • Using the ROSbackup.py Script (for encrypted backups).
  • Using the /export Command: To export the configuration to a readable file, run:
/export file=backup

How to Backup Mikrotik Configuration Command Line?

There are two main ways to back up your MikroTik configuration, using the command line:

  • Using /system backup save:

This command creates a backup file directly on the router.

Syntax/system backup save filename=[backup_filename.backup]

Note: Replace [backup_filename.backup] with your desired filename.

  • Uploading a pre-made backup:

Upload your backup file (created elsewhere) to the MikroTik router using tools like SCP or Winbox file transfer.

Then, use the /system backup load command to restore the uploaded backup.

How to restore a RouterOS device Configuration from a .backup file

In case of a MikroTik device malfunction, restore your network settings to a previous state by uploading the .backup file (created with export or Winbox) using the import command in the terminal or the Winbox interface’s Files menu.

FAQ

Since mac addresses are changed when restoring the backup file of the previous router in a new Mikrotik router, the similarity of the mac addresses in ether1 prevents communication between the old and new router. This problem occurs when you try to configure a new router using the backup file of the previous Mikrotik router. Select the Reset Mac Address button in the interface<ether1> section and the General tab to return to the default mac address settings.

By backing up the Mikrotik RouterOS configuration, you can use the router configuration in the new router. Backup Creates a binary file of the entire configuration. In addition, when you forget the password of the backup file, it is helpful in password recovery, but the export file cannot be used to recover passwords. Export Generates a text file with a human-readable representation of the configuration, and it cannot be expected to export a decrypted certificate.

Conclusion

Mikrotik backup and Mikrotik restore backup are very important for Mikrotik router and network administrators to keep the Mikrotik server safe and protect important information on the Mikrotik server.

To safeguard your network settings, you must have a regular RouterOS backup using the export command or Winbox’s System Backup tool.

Leave a Reply

Your email address will not be published. Required fields are marked.