Page 1 of 1

EXPORT - IMPORT (failure)

Posted: Wed Mar 18, 2015 11:27 am
by roswitina
I will test the export/import function from mikrotik. RouterOS 6.27.

I use the "export compact file=config" command to generate the file config.rsc
If I use the "import config.rsc" command the system says "failure: already have device with such name"
The file "config.rsc" has not been changed.

What i'm doing wrong?


Re: EXPORT - IMPORT (failure)

Posted: Wed Mar 18, 2015 2:29 pm
by boen_robot
The "export" generates a file that is supposed to be applied to a "fresh" installation of RouterOS. Since you're applying it on the same system (or a non-fresh, but similar system), the items you have are already there, and therefore "import" can't add them.

Even though it says "compact", that doesn't mean you're generating any sort of "diff" relative to a current state. In both "compact" and verbose modes, "export" generates a file for a fresh installation. The only difference is that "compact" omits things that RouterOS uses as defaults on fresh installations.

If you're trying to create a snapshot with which to update other existing devices, you should either inspect the file and "manually" remove the existing things, or better yet, create only exports at the modified menus. Before importing, remove all items in that menu, so that when you import them, they aren't there, and are thus added.