How to recover from the misuse of backup and restore?

Well, we have also an imperfect script:

Imperfect restore

Only thinking aloud, but let's say you have two devices, A and B (identical, same model and same hardware revision). Device A Is fully configured and device B Is new or however reset (even better of freshly netinstalled) without configuration.

In 12 steps:

  1. verify that both devices run the exact same firmware and RouterOS version.

  2. make a backup of device A

  3. make an export of device A (let's call It full_export)

  4. reset device A without configuration

  5. make an export of device A (let's call It min_export)

  6. make a diff file between full_export and min_export

  7. since min_export will be only a few lines long It should be easy to find which lines need to be removed or "add" commands need to be converted to "set" ones

  8. optionally verify that this diff file Is correct by applying It to router A and make another export (let's call It check_export) if check_export Is identical to full_export the diff file Is correct, otherwise loop to #6. Don't worry, in the worst case you can still restore device A through the binary backup and bring It back to the situation It was at step #1

  9. Reset router B without configuration and make an export (let's call It min_exportB)

  10. compare min_exportB against min_exportA, they should be identical with only MAC addresses different.

  11. apply the diff file to router B

  12. relax and enjoy