- You update using ssh / Winbox ⇢ New terminal using:
1 | /system package update install |
- Or from Winbox, press System ⇢ Packages ⇢ Check For Updates ⇢ Download&Install
- To manually update, you simply download the new software and with the mouse/pad drag the file to the Winbox file window. Then you reboot, and RouterOS automatically discovers the software and installs it before starting up. For home devices, put the software in the flash folder, otherwise it will be deleted at reboot. Be sure that you use the software version that matches your MikroTik devices chipset. The chipset is shown in parentheses in the top of the Winbox window, after the routers identity (name) - using the wrong chipset software might brick your router.
- You can use Netinstall.
- If you have many MikroTik devices you need to manage and update, you can use The Dude to update them in batches.
- Or you can add the different RouterOS images you want to use on a master MikroTik router, and set the other routers to use that router as the upgrade central.
See Winbox: System ⇢ Auto upgrade or use /system upgrade print
- You can script the updating, from your own proxy server, here is an example - also check the Wiki about scheduler.
If you want your router to update during the night, you can edit the date and use this script:
1 2 3 | /system scheduler add name=Upgrade on-event="/system package update install" \ policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \ start-date=jan/03/2017 start-time=03:00:00 |
This script will run each night and check if newrouteros.npk exists, and if it do, then reboot to upgrade:
1 2 3 4 5 6 7 8 9 | add comment="Check if newrouteros.npk exists. If found, then reboot to update." interval=1d name=\ "Reboot to update" on-event=":local filename \"newrouteros.npk\"; \\\r\ \n:if ([:len [/file find name=\$filename]] > 0) do={ \\\r\ \n :put \"New RouterOS package named newrouteros.npk found, will reboot in 60 seconds to install\"; \\\r\ \n :delay 60; \\\r\ \n :put \"Rebooting now\"; \\\r\ \n /system reboot \\\r\ \n}" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=nov/14/2012 start-time=\ 03:00:00 |
Read more on the wiki about Upgrading RouterOS.
When upgrading, you always run a risk of getting unforeseen problems. A very convenient way to prepare for this, is to add extra partitions on the router. You may then upgrade the test partition, and if it do not work as expected, you can reboot into the untouched production partition.
If a partition completely fails for some reason (failed upgrade, problematic configuration introduced, software problem), the next partition will automatically boot instead.
You may also copy only the active configuration, without changing the OS version with: /partitions save-config-to partition=partX
And you may also restore config from another partition to the active partition.
If you need to test on remote devices, it may prove helpful to add a script that runs at start time and if not disabled manually, will activate the safe partition and reboot.
If repartitioning fails and automatic boot from a safe partition fails, you may:
More about partitions: https://wiki.mikrotik.com/wiki/Manual:Partitions