Backup old mikrotik and restore to a new device
A common task!
Backing up and restoring a Mikrotik router is a crucial step when upgrading or replacing a device. Here's a step-by-step guide to help you backup your old Mikrotik and restore it to a new device:
Backup your old Mikrotik:
-
Connect to the router: Use a console cable or SSH to connect to your old Mikrotik router.
-
Backup the configuration: Run the following command to backup the configuration:
/export compact file=backup.rsc
This will create a file named
backup.rsc
in the/flash
directory of the router. Thecompact
option reduces the file size by removing unnecessary comments and whitespace. -
Backup the firewall rules: Run the following command to backup the firewall rules:
/export compact file=backup-firewall.rsc
This will create a file named
backup-firewall.rsc
in the/flash
directory of the router. -
Backup the IPsec configuration: If you have IPsec configured, run the following command to backup the configuration:
/export compact file=backup-ipsec.rsc
This will create a file named
backup-ipsec.rsc
in the/flash
directory of the router.
Restore the backup to the new device:
-
Connect to the new device: Use a console cable or SSH to connect to your new Mikrotik router.
-
Upload the backup files: Use the
upload
command to upload the backup files to the new device:/upload file=backup.rsc /upload file=backup-firewall.rsc /upload file=backup-ipsec.rsc
-
Restore the configuration: Run the following command to restore the configuration:
/import file=backup.rsc
This will restore the configuration from the
backup.rsc
file. -
Restore the firewall rules: Run the following command to restore the firewall rules:
/import file=backup-firewall.rsc
This will restore the firewall rules from the
backup-firewall.rsc
file. -
Restore the IPsec configuration: If you had IPsec configured on the old device, run the following command to restore the configuration:
/import file=backup-ipsec.rsc
This will restore the IPsec configuration from the
backup-ipsec.rsc
file.
Verify the restore:
- Check the configuration: Verify that the configuration has been restored correctly by checking the router's settings and configuration.
- Test the firewall rules: Test the firewall rules to ensure they are working as expected.
- Test IPsec: If you had IPsec configured, test the VPN connection to ensure it is working as expected.
That's it! By following these steps, you should be able to backup your old Mikrotik and restore it to a new device.