Page 1 of 1

Backup/Restore vs. Export/Import

Posted: Mon Jul 20, 2009 6:40 pm
by dreweinhorn
My first impression on reading the
included some misconceptions.

I looked at backup/restore and saw that it saves everything
in one big binary file. You cannot make any adjustments
before you restore.

Export/Import seemed much better.
It saves everything in a editable text file.
Once I get things working on a test router,
I can save the configuration to a text file,
edit the configuration, tweaking names,
ip numbers, etc. Copy the file to a production
router, tweak names and numbers, copy
to another production router.

Bzzzt. Wrong!

excerpt from the documentation in

http://www.mikrotik.com/testdocs/ros/3. ... config.php

Importing Configuration
Command name: /import

...

Note that it is impossible to import the whole router configuration using this feature. It can only be used to import a part of configuration (for example, firewall rules) in order to spare you some typing.

It took a bunch of work to get my exported configuration into a form that is importable.

Maybe I did things the hard way.
Is there an easy way?

Re: Backup/Restore vs. Export/Import

Posted: Mon Jul 20, 2009 7:20 pm
by eneimi
When migrating from RB to another RB, that means new interfaces, new mac-addresses, new board, new firmware, new ROS version probably etc.

Like you noticed, list of firewall rules etc should go seamlessly, else, you'll always have to do some editing.

Re: Backup/Restore vs. Export/Import

Posted: Mon Jul 20, 2009 8:03 pm
by dreweinhorn
After exporting a configuration,

and editing it to make another configuration for this bpx, or another box.

Is the an easy way to make it "importable",

getting around the nasty gotcha in the /import documentation?

Re: Backup/Restore vs. Export/Import

Posted: Tue Jul 21, 2009 12:19 am
by eneimi
You shouldn't have to edit anything.

I export and import firewall rules, hotspot data etc without any editing.

What exactly did you have to remove or add to the exported file before importing?

Re: Backup/Restore vs. Export/Import

Posted: Wed Jul 22, 2009 3:42 pm
by janisk
if you just use /export file=<the file> it will export all the settings, including defaults. edit out all the unnecessary stuff and you are good to go.

on the other hand you can go into submenu and save specific settings like - /ip address export

Re: Backup/Restore vs. Export/Import

Posted: Thu Jul 23, 2009 8:25 pm
by desoto
The first think I do is backup the system. Then open a terminal window and type in export file=backupfilename and press enter. Then I ftp into the unit download the rsc file to my computer using editor make changes and then ftp it back to a new unit and run the script.

Re: Backup/Restore vs. Export/Import

Posted: Fri Jul 24, 2009 3:34 pm
by normis
the "import" command simply and blindly executes any commands that are in the given file. ANY commands. this means that you can write your own commands in there, just like you would configure a new router. Then import this file into any number of routers.

That comment in the manual simply implies that a "/export file=" file will not always work on another system, you will have to edit it and tweak it. But as I said, you don't need to export anything to be able to import. Just make a new file, and write commands that you will need.