Community discussions

MikroTik App
 
idoch
just joined
Topic Author
Posts: 6
Joined: Mon Mar 26, 2018 6:54 pm

Exclude Address Lists from Export?

Thu Jul 08, 2021 11:04 pm

Is it possible to exclude address lists from an export?

We have some very large address lists - some dynamic and some curated that contain information that may only be valid for a brief period of time. It is likely that new lists will be available as soon as any restore operation is complete. The address lists are a significant portion of the configuration export.

Any ideas are appreciated!
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11587
Joined: Thu Mar 03, 2016 10:23 pm

Re: Exclude Address Lists from Export?  [SOLVED]

Fri Jul 09, 2021 1:07 am

Dynamic entries in lists don't get exported. So if you can make all (most?) list entries dynamic, it won't bloat configuration exports.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Exclude Address Lists from Export?

Fri Jul 09, 2021 3:27 am

Sorry, but what's the problem to have it on export?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26368
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Exclude Address Lists from Export?

Fri Jul 09, 2021 11:02 am

You can edit export files, just like any text files. Before importing, remove the stuff you don't want to be imported.
 
idoch
just joined
Topic Author
Posts: 6
Joined: Mon Mar 26, 2018 6:54 pm

Re: Exclude Address Lists from Export?

Fri Jul 09, 2021 2:56 pm

Sorry, but what's the problem to have it on export?
I should have been more clear about this, The exports with the lists are huge, often too big to be sent by email (using a script on the device that takes an export and emails it for backup). The issue is not the size on import, the issue is that (due to their size) it is difficult to get the exports from the device to a safe place.

Large GEOIP lists, IP lists for security, etc. All of these could be recreated and imported if the device needed to be restored, but it's probably not worth the wear and tear to 1. Delete them, 2. Perform the Export 3. Reimport the lists

It would be great to have things like GEOIP or any of the available lists based on abuse as a separate service (without each entry being part of the config), but that seems like too much to ask.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Exclude Address Lists from Export?

Fri Jul 09, 2021 3:11 pm

As alrady wroten from other user, simply import it as dynamic, and we never be on export.
 
msatter
Forum Guru
Forum Guru
Posts: 2912
Joined: Tue Feb 18, 2014 12:56 am
Location: Netherlands / Nīderlande

Re: Exclude Address Lists from Export?

Fri Jul 09, 2021 3:57 pm

I should have been more clear about this, The exports with the lists are huge, often too big to be sent by email (using a script on the device that takes an export and emails it for backup). The issue is not the size on import, the issue is that (due to their size) it is difficult to get the exports from the device to a safe place.
I have been writing on a export and restore script for address-lists. It reduces the number of characters you need to backup/restore such a list.

I think that it is able to convert to static but I don't think it I already made it convert to dynamic. But that could be implemented. It is still beta and I did not spend much time on it more than a year now.

I made it it for the same reason to have smaller exports/backup. But then I am thinking why is that not a option on backup/restore or export/import to ignore address-lists. It chould be choice of the user to not export/import those lists.

Edit: checking my script I can make them dynamic but only with a time-out, RouterOS limitation on script/terminal, and then the max timeout is 35 weeks 3 days and 13 hours 13 minutes and 56 seconds. I can make that time as MAXimum when selecting restore as dynamic with a warning that the it will expire in time. This is implemented only for backup for making it easy to generate different address-list for different 'client' routers.

The help test:
:gone
Edit 2: the name of the address-list can not contain spaces or special control characters used in RouterOS.
Last edited by msatter on Sun Aug 15, 2021 1:11 pm, edited 4 times in total.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Exclude Address Lists from Export?

Fri Jul 09, 2021 3:59 pm

Why address-list shiud be choised and anoter part not?

I do not want export bridges when do export.
Should be user choice...
 
idoch
just joined
Topic Author
Posts: 6
Joined: Mon Mar 26, 2018 6:54 pm

Re: Exclude Address Lists from Export?

Fri Jul 09, 2021 5:05 pm

Why address-list shiud be choised and anoter part not?

I do not want export bridges when do export.
Should be user choice...
Address lists are very "bulky" -- at lest that's my reasoning. I'd be equally happy with a real GEOIP service that is part of the "system" rather than part of the config, but I asked for that 10+ years ago and it's unlikely to happen. I'd be thrilled if my config could just say "block * from the country of Monaco on Sunday" by reference without having to build and maintain my own list of all IPs of Monaco.

Who is online

Users browsing this forum: Bing [Bot], mkx, patrikg, unhuzpt and 52 guests