How to create Backup Mikrotik Configuration and Restore via Winbox
Creating a backup of your MikroTik router’s configuration using Winbox ensures your network settings are secure. This backup includes critical details such as firewall settings, routing rules, and wireless configurations. If your router ever fails or requires a reset, you can effortlessly restore it to its original state with the saved backup, sparing you the hassle of reconfiguring everything from scratch.
Mikrotik Configuration Backup via GUI
For many users, especially beginners, using the graphical interface simplifies the process of managing settings. Follow these steps on your Mikrotik VPS:
- Connect to the Router:
Launch Winbox with Admin privileges and connect to your Mikrotik router.
- Open the File List:
Once connected, locate the “File” menu on the left side and click it to open the File List window.
- Start the Backup Process:
Click on the “Backup” option.
- Configure Backup File:
– Name: Enter a name for your backup file.
– Password (Optional): To enhance security, you can set a strong password to protect your backup file.
– Encryption: The default encryption settings are recommended, but you can skip encryption by checking the “Don’t Encrypt” box if you need the backup for password recovery.
Once all settings are configured, click on the “Backup” button to create your backup file.
- Download the Backup File:
– Locate the File: In the File List window, find the backup file you just created.
– Initiate Download: Right-click on the backup file and select the “Download” option from the drop-down menu.
– Choose Destination: Select the folder and path where you want to save the backup file on your PC, then click “OK.”
– Access the File: Navigate to the location where you saved the backup file and verify that it is there.
For a quicker method, you can simply drag the backup file from the Winbox environment and drop it into the desired location on your computer.
Deleting the Backup File
To remove the backup file from your Mikrotik router, select the file in the File List window and click on the red delete icon located in the top bar. This will permanently delete the backup file from your router’s storage.
Mikrotik Configuration Backup via CLI
The command line interface (CLI) can also efficiently back up your Mikrotik configuration. This method is preferred by some users who are more comfortable with command-line operations.
- Connect to the Router:
Open Winbox and connect to your Mikrotik router. Then click the “New Terminal” option to open the command prompt.
- Run Backup Command:
With Admin privileges, execute the following command to save your configuration:
[admin@MikroTik] > system backup save name=MikroTikBackup don’t-encrypt=yes
Saving system configuration
Configuration backup saved
[admin@MikroTik] >
Alternative Backup Method
For a human-readable backup file, you can use the export command:
export file=desired_backup_name.cfg
This will create a .rsc file which you can find in the “File” section. Like the GUI method, you can drag this file from the Winbox environment and drop it into your desired folder on your PC.
Additional Notes
– The .rsc backup file allows you to review or edit the configuration if needed.
– Mikrotik does not have a direct “save config” command like some other routers. Instead, configuration can be saved using the export command or the system backup feature.
Restoring Mikrotik Configuration Backup via GUI
Creating a Mikrotik configuration backup offers several benefits, especially when setting up a new router. Restoring the backup through the Winbox GUI is straightforward. Here’s how you can do it:
- Connect to the Router:
Open Winbox and connect to your Mikrotik router.
- Access the New Router:
Select the “Neighbors” tab to access the unconfigured router. Ensure that the OS version of the new router matches that of the previous one.
- Open File List:
Click on the “File” option to open the File List window.
- Upload the Backup File:
In the File List window, select the “Upload” option.
- Select and Open the Backup File:
Choose the backup file and click “Open.”
Note: You can also drag the backup file from your PC directly into the File List window to transfer it.
- Restore the Backup:
Once the backup file is in the new router’s File List, select it and click on the “Restore” option to complete the restoration process.
- Enter Password for Backup File:
If your backup file is password-protected, you will be prompted to enter the password. Enter the password in the Password field and click “Restore.”
Note: Enter the correct password to proceed with the restoration.
- Confirm and Reboot:
Confirm the restoration by answering “yes” to the prompt. The router will then reboot, which will cause a temporary disconnection.
- Refresh and Reconnect:
After the router has rebooted, click the “Refresh” button in Winbox. You will see the router with its new configuration identity. Select the “Connect” option to log into your router, now configured with the restored settings.
admin@MikroTik] > system backup load name=MikroTikBackup
password:
Restore and reboot? [y/N]: y
Restoring system configuration
System configuration restored, rebooting now
[admin@MikroTik] >
If your backup file is password-protected, enter the password when prompted.
- Backup Before Major Changes:
To safeguard against configuration issues, it’s wise to create a backup before making significant changes. Use the following command to save your current configuration:
/system backup save name=[backup_filename.backup]
By following these steps, you can efficiently restore your Mikrotik configuration using the CLI, ensuring a smooth transition to your new router.
How to Backup Mikrotik Settings
Follow these steps to back up your Mikrotik settings:
Web Interface:
- Login: Access your router through the web interface with admin privileges.
- Navigate to Files: Go to the ‘Files’ section.
- Create Backup: Click on ‘Backup’ (you can optionally set a name and password for the backup).
Winbox:
- Connect: Use Winbox to connect to your router.
- Navigate to Files: Open the ‘Files’ section.
- Create Backup: Click ‘New’ and select ‘Backup’ (you can optionally set a name and password for the backup).
Terminal:
- Upload Backup File: Upload the backup file if needed.
- Navigate to Backup Location: Use
`cd /files
` to go to the backup directory. - Load Backup: Run `
/system backup load filename=[backup_filename.backup]
`.
Restoration Steps for Both Methods:
- Confirm & Enter Password: Confirm the restore process and enter the password if required.
- Monitor Progress: Keep an eye on the restoration progress.
- Reboot: Restart the router unless you are using the `don’t-reboot` option in the terminal
Safekeeping:
– Download Backup: Ensure you download the backup file to your computer for safekeeping.
– Store Securely: Keep the backup file in a secure location, separate from the router.
Backing Up Mikrotik Router Configuration
You can back up your Mikrotik router configuration using two main methods:
Method 1: Using the MikroTik RouterOS Web Interface
- Log In: Access the MikroTik RouterOS web interface with admin credentials.
- Navigate to Files: Click on the ‘Files’ menu.
- Create Backup: Click ‘Backup’ at the top of the files window.
– Optional: Name the backup file and set a password for added security.
– Encryption: The default encryption setting is usually sufficient, but you can choose a different option if needed.
- Download Backup: This creates a backup file (e.g., “backup.backup”) that you can download to your computer.
Method 2: Using Winbox
- Download and Install Winbox: Get Winbox from the MikroTik website.
- Connect to Router: Use Winbox to connect to your MikroTik router.
- Navigate to File List: Open the ‘Files’ section.
- Create Backup:
– Right-click and Select New: Choose ‘Backup’ from the menu.
– Optional: Name the backup file and set a password.
– Encryption: Default encryption is usually adequate, but you can choose a different option if desired.
- Save Backup: This will create and download a backup file to your computer.
Summary
In this guide, we detailed the process of creating and restoring a backup for your Mikrotik router configuration using both the Winbox graphical user interface and the command line interface (CLI). We explained how to initiate a backup, configure security options, and store the backup file securely. The restoration process is also covered, demonstrating how to upload and restore the configuration using both the GUI and CLI. The guide emphasizes the importance of regular backups and secure storage, providing a comprehensive approach to maintaining and recovering your Mikrotik router settings efficiently.