Backup Script

For a while my company has used Greg Sowell’s Mikrotik backup script to backup the configs of all the routers we sell. While it has been incredibly useful, there were additional things we wanted to be able to use it for (such as upgrading RouterOS/Firmware) so I ended up writing a fairly similar application that has additional features and thought I should share it with you all in case you might find it useful. I wrote it with AutoHotKey using SQLite to store info about each device and released it as an open source project on GitHub https://github.com/LCT-Jonah/ahk-mikrotik-toolbox.

At our company we use it on a daily basis for managing routers and has worked quite well for the past month or so we’ve been using it in production. Here are what I consider to the the best features of it:

  • Scheduled and one-click backups of MT devices
  • Scheduled and one-click updates of Firmware and RouterOS
  • Start a Winbox or SSH session with a device with 1 click
  • Status reporting, lets you know if a backup or RouterOS upgrade was successful or a failure
  • Allows you to issue a list of commands to many routers at once

I am aware there are some security implications to my script though. Router credentials are stored in plain text in the database and all ssh host keys are trusted by default. I’m by no means a software developer, and don’t really have the knowledge needed to make it more secure.

Information on usage is located in the readme on the GitHub project linked above. I’d be happy to answer any questions or take any feedback from you all.