backup and restore config on 4.17

how can you extract a configuration from a running version of 4.17 and restore it to another new 4.17 router?

It seems that when you try to restore, there’s alot of junk in the file that restore procedure does not like.

Anyone have an idea about this?

that’s why the RSC export file is in a readable text file, so you can edit out the unneeded things, and import only what matters to you

but is there a way to get a pure working backup file that you dont need to go through and cleanup?

No, very sadly there is not.
Happy editing.

somehow I would like to run the file via a bash script and have it remove the unwanted lines…

I’m going to check this out now.

can you tell me what the command is to backup? i tried using the file list backup in windbox, but this outputs a binary un-editable file…?!?

i just used the binary file backup and restore from one router to another router using windbox and it worked. at least the new router took the restore and rebooted and came up correctly.

Is there issues of doing this?

BTW, the release of both routers is 4.11 not 4.17

http://wiki.mikrotik.com/wiki/Manual:Configuration_Management

The configuration backup can be used for backing up MikroTik RouterOS configuration to a binary file, which can be stored on the router or downloaded from it using FTP for future use. The configuration restore can be used for restoring the router’s configuration, exactly as it was at the backup creation moment, from a backup file. The restoration procedure assumes the cofiguration is restored on the same router, where the backup file was originally created, so it will create partially broken configuration if the hardware has been changed.

Restoring binary backups on other hardware is definitely not recommended. You may, among other things, have cloned MAC addresses, which would lead to problems if the two routers ever share a broadcast domain.

Text configuration is done via the “/export” and “/import” commands: http://wiki.mikrotik.com/wiki/Manual:Configuration_Management#Exporting_Configuration

ok i did several exports and imports and found several issues…

The command executed on root was "export file=all_config
this backed up everything thing to all_config.rsc

once opening this file there is several discrepancies:

  1. when importing, all ip addresses are missing in the router even though the /ip address is in the .rsc
  2. user list missing users, the .rsc does not have all users in it during export, only the default admin user.
  3. When exporting, it also parses the scripts files inside the export file…
  4. when exporting and importing onto a different router in case of a replacement for instance, the mac addresses of all ports on the old router get imported to the new router. In this case, none of the port work.
  5. getting an error on import stating : failure: group with the same name already exists, yet i cannot see in the .rsc what it’s refering to…


    MikroTik RouterOS 4.11 (c) 1999-2010 http://www.mikrotik.com/

[admin@MikroTik] > import file-name=Customer-July6-2011
Opening script file Customer-July6-2011.rsc

Script file loaded successfullyfailure: group with the same name already exists
[admin@MikroTik] >

Hence the comment by Mikrotik staff that you have to edit the file.

To make this clear: there is no way to transfer a configuration from one router to the other in just one go. Binary backups aren’t supported on anything other than the device where the backup was created, text backups need heavy manual editing before they can be imported. This is a shortcoming in RouterOS, and my biggest gripe with the product.

LOL, you have to be kidding right?..

What’s the meaning of backing up if you can’t even restore onto a new router (same model) ?

This is absolutely ridiculous…

I just tried restoring the backup binary file and it seems to be ok, i mean the mac address of the new router have not been replaced with the old routers mac, user list is there, ip’s are there…

Can Microtik specifically say why and what causes problem when doing the Backup/Restore to a binary file?

Can Microtik specifically say why and what causes problem when doing the Backup/Restore to a binary file?

there are no problems if the router is the same or similar. however, an rsc file gives you the abiility to make a clean universal import file where you know exactly what it will import.

actually there was a nice program for editing these configuration exports, but I can’t find it, it was posted here on the forum, one of the users made it. Maybe Fewi remembers it?

http://forum.mikrotik.com/t/milliscript-freeware-to-manage-export-configuration-files/36187/1

thanks, that’s the one!

This script is nice, but seems to be missing parts also.

For instance, the ppp secret is in the rsc file when importing, yet does not get populated…

Also, I keep getting a group name already exist, yet i dont know what group name it’s talking about… the error indication is not very informative…

Script file loaded successfullyfailure: group with the same name already exists

Before importing, i execute “system reset-configuration no-defaults=yes” just to make sure everything is removed from the router. Yet it looks like the import is failing half way but not sure where.

just paste the contents of the file into the terminal, you will see exactly where it stops importing