If you are unable to manage your MikroTik device, you can factory reset by pressing the reset button. It may be a small pinhole, it may be a button on the side of the device, or for router boards you may need to short-circuit the board or a jumper.
Remember that even if you have no IP access to the MikroTik, you can always access it with Winbox using the "Neighbours" tab to access by MAC address, as long as you have a cable in the device. So if you are only missing IP connection to your router, you do not need to reset the configuration.
Any MikroTik includes both the user installed RouterBOOT (firmware) and OS, and a backup RouterBOOT (firmware). You can only update the user installed primary version.
When you hold down the reset button before turning on power, the device will boot using the backup RouterBOOT. If you need to reset while booting the user installed RouterBOOT, instead press down the reset button right after turning on power.
If you still have some access to the device, you can also force booting into the backup RouterBOOT using:
/system routerboard settings set force-backup-booter=yes
If you have attached to the MikroTik with a serial cable, you can access advanced options in the RouterBOOT loader, see the options in the RouterBOOT wiki.
To update the user RouterBOOT (firmware), run:
# View factory (backup), currently installed and latest available RouterBOOT / firmwares:
/system routerboard print
# Upgrade the firmware to latest available:
/system routerboard upgrade
# If upgrade is succesfull, reboot to apply new firmware:
Backup and restore works with binary files. The files backed up, are only compatible with the exact same hardware specification, it is not enough that it is the same chipset. But if you restore a backup from two hardware types that are very similar, you will be able to restore the file but with some strange results. Ex. backing up the hAP ac lite and restoring to the hAP ac, where the main difference is that the hAP ac has an extra port, will result in all the port names set to wrong ports on the hAP ac. This means that nothing will work, as your NAT, IP addresses etc. suddenly are on the wrong interfaces.
The export writes a text file with scripts for setting the entire configuration. The script file is fully interchangable between all MikroTik devices.
# Export entire configuration into a file, named with device name and date:
# Export only the ethernet settings to screen, for copy+paste:
/interface ethernet export