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:

  1. Connect to the router: Use a console cable or SSH to connect to your old Mikrotik router.

  2. 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. The compact option reduces the file size by removing unnecessary comments and whitespace.

  3. 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.

  4. 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:

  1. Connect to the new device: Use a console cable or SSH to connect to your new Mikrotik router.

  2. 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
  3. 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.

  4. 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.

  5. 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:

  1. Check the configuration: Verify that the configuration has been restored correctly by checking the router's settings and configuration.
  2. Test the firewall rules: Test the firewall rules to ensure they are working as expected.
  3. 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.