I have a Mikrotik cAP AC with routerOS 6.49.7 installed and a wireless hotspot setup on it, using certificates from the hotspot company providing the service.
I created a backup of the router using the “Backup” button in the file manager and downloaded the file to my computer.
I also exported the configuration ( /export filename=mybackup ) in a terminal and got a copy of that file too.
I see the backup file is only 64KB in size.
I need to upgrade router OS to version 7 as i would like to setup a wireguard link on it. But i am not exactly sure the hotspot will still work if i do the upgrade as i had an issue on a different location using the same hotspot system although i am not 100% sure the problem was because of the upgrade when i tried to restore an older backup file i had with router OS 6x
So the question is, if i upgrade to 7x, and i have any issues, can i use the backup file and the router will be downgraded back to 6x or the backup file only saves the configuration and some files, but is not a full image of the router including the installed OS?
I manage this router remotely so in case i need to reinstall anything from scratch, that is not an option here.
Backup is a binary backup of your config.
ONLY to be used on that device (or device with EXACT same HW and you still may need to handle MAC addresses to avoid duplicates) and ONLY when using the same ROS version.
Export of config is a text based representation of your config.
This can be used to import again (usually via terminal, section by section to verify no defaults will be overwritten which could be needed for the new version).
So neither option helps me here.. backup nor export.
So first idea that comes to mind:
Is there a way to DD the whole router as it is and dump a complete snapshot of the file system in case i need to restore if the OS upgrade gives me any issues?
Second idea… is it possible to just downgrade from 7x to the current OS 6x and then use the current backup to restore it?
You can snapshot the whole OS if you are using CHR, but that’s outside of the scope of ROS.
For every other hardware you cannot ‘dd’ the whole OS. And even if you could, how would you restore it back? Netinstall or serial console do not allow you to do such operations.
A ROS backup is practically a ‘dump’. Restoring from a backup it brings the router to the exact state it was when the backup was taken.
First: no (expection being CHR as explained by Cha0s)
Restore from export is not thát big a problem. Doesn’t take more then 15 minutes if you know what you’re doing.
Second: theoretically yes but upgrade and then downgrade again, might possibly change some things in background. So I wouldn’t count on a restore to behave as it should. It may, it may not.
You could try but be on the lookout for strange behavior (and remember then where it may come from).
for devices with built-in ROS there is no way to clone “disk” to restore ROS and settings in one go, you can reinstall with NetInstall clean system but then you need to restore settings from “backup” or “export”
for x86 or CHR which you install as a normal OS you can “clone/snapshot” whole disk which saves ROS+running configuration what let you restore it to this exact state on the same device … some limits apply e.g. HDD id has to be the same as ROS binds licencse to it.
I get that, but as holvoetn described, the router needs to be in the same ROS version as when the backup was taken. I need to upgrade ROS and it seems i would not be able to use that backup then if there are issues.
So not using CHR and zero experience with it, seems like im out of options.
Thank you guys.
I will check with the hotspot provider support if ROS 7x is compatible with their system otherwise leave it as it is.
AFAIK the way to save and restore a “RouterOS + config” copy is by using partitions
“Partitioning is supported on ARM, ARM64, MIPS, TILE, and PowerPC RouterBOARD type devices.”
(if there is enough room in storage, some have 128MB even 1GB)
see: https://mikrotik.com/products/matrix
This should allow to go back to the previous “RouterOS+config” environment.
The commands only support copies from partition to partition.
When running v7 with wifiwave2 driver, it’s quite probable that partition size has to be at least 96MB … I tried to partition storage on Audience (128MB split to two 64MB partitions) and it ran fine … but I couldn’t upgrade ROS due to insufficient free storage (to store downloaded package files). N.b. I tried this before RAM disk became option on all devices and I don’t know if using RAM disk changes this or not.
The backup is essentially all the user files, including config (but not OS as noted). More importantly here, it also includes the certificates. The config file should be saved – since it’s human readable — but the backup file is what you’d want if you’re trying to get a previous state restored. IMO, the config file is more useful to migrate a configuration to a new router etc. If it’s same router, and you had a problem, you’d almost always want to use the backup in that case.
Generally speaking, the upgrades go fine. And if you run into a problem, you can downgrade by copying routeros.npk for the version you want to the root of the Disk, and hit downgrade in System>Packages. Your config should should be preserved in the downgrade.
If not, the backup file will restore the previous files to the router, that exist in the backup. While it should be same version to restore a backup. Technically speaking RouterOS does not check the version, and normally works. While there is no guarantee if not same version…but the problems come in more if your using functions/config that changed between the version (e.g. newer version backup, on to an older router is horrible idea… the reverse, not so much)
If you’re on CHR, you have the additional option of using the virtualized host to take a snapshot of the disk. That would save both configuration and OS – since it’s a whole disk.
If it’s Mikrotik hardware, as long as you have the backup file (and password if you added one)… worse case is you run the netinstall tool to install the same version as the backup & then restore the backup on top. But netinstall is a bit more tedious and generally requires physical access to the router – but that reformat the router’s disk, install OS clean, and then you can restore your backup file (from same version).
Well extending the storage with something like SSD drive would be very welcome.
It’s like the old Android problem. You needed to jailbreak the Android OS , and format it as EXT4, to mount and use the microSD as internal storage.
Otherwise the microSD was not very usefull.(Only part of the APP could be moved). Use the SDcard as internal storage was added in Android 6 AFAIK.
So 16MB MT is not very usefull. I use hAP ac³ and even hAP ax³ (these ax sit in a metal enclosure anyway) , without wifiwave2 drivers.
Thank you all guys for the replies and useful information.
I got in touch with the provider of the hotspot installed on this device, and advised me to NOT upgrade to ROS 7x, as their system is not compatible and is not working with their HTTPS splash pages.