Community discussions

MikroTik App
 
User avatar
cpresto
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue Jul 18, 2006 3:12 pm

Backup/Restore vs export/import

Fri Sep 28, 2007 1:59 am

Hi all,
I've faced problems doing a backup/restore on routerboard units starting from scratch. E.G., if I do a backup, reset the unit and restore the previously saved config file (.backup file), the configuration is not exactly the same I've saved before.
Is there a way to achieve this using export/import command (.rtf file) ?
Rgds
 
User avatar
Viroslash
Frequent Visitor
Frequent Visitor
Posts: 75
Joined: Wed Jun 20, 2007 5:39 am
Location: La Plata, Buenos Aires, Argentina
Contact:

Re: Backup/Restore vs export/import

Fri Sep 28, 2007 3:13 pm

mmm, if you paste the export info in the console, many values (as firewall rules, ip address, etc etc) can be duplicated. As I see, NOT is the same.
 
User avatar
cpresto
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue Jul 18, 2006 3:12 pm

Re: Backup/Restore vs export/import

Sat Sep 29, 2007 1:37 am

Have you tried backup/restore, does it work or do you have same problem moving configuration to different devices (same hardware)?
 
jarosoup
Long time Member
Long time Member
Posts: 596
Joined: Sun Aug 22, 2004 9:02 am

Re: Backup/Restore vs export/import

Sat Sep 29, 2007 1:59 am

I have always used import/export to do backups and restores as backup/restore has always been problematic. Export simply generates configuration commands that can be pasted directly back into the terminal. You may want to edit the export file so it only contains configuration options you want (like ip, dhcp, pool, etc) - it makes it much easier to read too.
 
User avatar
cpresto
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue Jul 18, 2006 3:12 pm

Re: Backup/Restore vs export/import

Sat Sep 29, 2007 2:14 am

I would like to use it to backup/restore the whole configuration.
I'm using MT as CPE for my Customers (I'm a WISP), so I wolud like to have several configuration files (depending on Cuscotmer's geographic location) that my technician might easily import (or restore) into the CPE. The standard configuration will be customized from NOC personell once installation is performed.
 
User avatar
jorj
Member
Member
Posts: 397
Joined: Mon Mar 12, 2007 4:34 pm
Location: /dev/null

Re: Backup/Restore vs export/import

Sat Sep 29, 2007 11:18 am

I have had this problem a million times. Or, actually less.
You really should read the export file carrefully.
For example, you HAVE to rename the interfaces as in your export files, PRIOR to importing.
Second, you HAVE to put security profiles for wireless BEFORE the wireless interface config, if you have wep or wpa set, or else you will receive error, because the security profile does not exist at that time.
There are many, many little details like that, wich will make your import of the export file a night mare.
I have put each export file into pieces, then put a name starting with a number for each piece, so as not to recieve this kind of errors.
Of course, you can import a file "arranged" with the proper order of the sentences, but this way i found it is harder to follow.
I guess MT stuff thought only to have a "clear text" configuration export, and not to actually importing, cause it's generally not working. Anyway, with a little work, it's done corectly. Thank you.
If there is any way that this could be fixed in a future release, meaning full export could be imported AS IS, ( with renaming the interfaces only), we should be very grateful.
Till then, put your export file like this:

01_security_profiles.rsc
02_interfaces.rsc
03_addresses.rsc
04_queues.rsc
............
xx_some_other_config.rsc
............
and so on, putting in each script the proper part of the full export.
This way of keeping configuration will save you A LOT of your time, when you have to replace a router.
Also try to keep them updated. It's your time, and your money in.
:)

If only for CPE use, you can always have a single "arranged" export file with default addresses of your choice, nat setting or routing, firewall settings, interface names ( default ones to be renamed acordingly: eg:
/inte set wlan1 name="uplink"
and so on, and you can import that file by connecting to the cpe in mac winbox, at first boot, or whenever you choose.
I am using this approach and .. as i said: my time, my money. ( or yours)
8)

rgds.
/jorj out.
 
User avatar
cpresto
Member Candidate
Member Candidate
Topic Author
Posts: 177
Joined: Tue Jul 18, 2006 3:12 pm

Re: Backup/Restore vs export/import

Sat Sep 29, 2007 11:39 am

Thank you jorj,
did you create .rsc CPE file from a single export action or did you build it merging several .rsc scripts (firewall, IP, security, etc...)?
Regarding keeping update router file configuration on the net, probably it might be solved with script, scheduler and tftp server: script will generate .rsc files on each machine and send these to a TFPT server (updating existing ones), scheduler lets this process take place once a day (during the night).

Rgds
 
User avatar
jorj
Member
Member
Posts: 397
Joined: Mon Mar 12, 2007 4:34 pm
Location: /dev/null

Re: Backup/Restore vs export/import

Sat Sep 29, 2007 2:29 pm

I created a single export file, on wich i work on my computer. It's simpler.
And you can, if you have a mail server, WITHOUT send authentication..... unfortunately, send by mail the export file. Search in the forum, and you will find examples. I am using one right now, and it works. But, only if the servers does not require authentication. tftp...... sorry. does not exist here. :)

Of course you can have multiple rsc files, with each branch to export, but you have to work on the router with several files, wile splitting the single export file on your station it's much easier. You can even write some scripts to do it for you, in wichever language you prefer. Generally you don't need to do that, unless you have some very specific and complicated scheme, wich has to be applied to the cpe. Wich I try to avoid at all times.

/jorj out.

Who is online

Users browsing this forum: No registered users and 74 guests