Backup and restore only DHCP LEASE and QUEUE part of config?

Im about to have an expert come and hard reset my RB3011 because he came last week to configure it with load balancing and failover, and he worked on it for a while then said, “SORRY , IT CANT BE DONE IN THIS STATE, I NEED TO RESTART IT AND HAVE NO DEFAULT CONFIG!”
So he will come and hard reset it again apparently, in order to make the damn thing happy with beign given 2 WAN ports.

So firtsly, is that true?

If so, how do i make it so i dont have to do this god forsaken process again:
I’d have to add a whole bunch of static DHCP server entries for all my customer router mac addresses,
and then, id have to add all the complicated queue rules again.

Last time, i had to just take a screenshot of the setup, because that was the only way to copy the data in any meaningful way. Using the export function creates a damn mess that excel cannot deal with.

IS it possible to just restore / import the DHCP server leases part, and the queues part?

I’d say that need for reset is probably not exactly true, but sometimes it may be simpler to start from scratch, rather than hunting for forgotten parts of previous config that conflict with something.

As for keeping some of it, except for few things like system user accounts or certificates, export is what you want. Just don’t open it in Excel, it’s text file with commands, use some plaintext editor. Then you can find e.g. blocks starting with “/ip dhcp-server” (there’s more than one with different parts) and import them back by pasting them in Terminal.

Or if you have expert at your disposal, simply tell him to do it. It shouldn’t take him more than few minutes.

I do export configurations with such a script to be able to restore whole configration from binary backup or just parts from the rsc file

/system scheduler
add interval=1d name=ExportConfig on-event=ExportConfig policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=nov/23/2020 start-time=05:58:46
/system script
add dont-require-permissions=no name=ExportConfig owner=teodor policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":\
    local databiezaca [/system clock get date]\r\
    \n:local dzien [ :pick \$databbiezaca 4 6 ]\r\
    \n:local mies [ :pick \$databbiezaca 0 3 ]\r\
    \n:local rok [ :pick \$databbiezaca 7 11 ]\r\
    \n:local plik \"\"\r\
    \n#:set plik (\"\$[/system identity get name]\".\"_\".\"\$rok\".\"\$mies\"\
    .\"\$dzien\")\r\
    \n:set plik (\"\$[/system identity get name]\")\r\
    \n:log info \"Eksportuje konfiguracje \$plik\"\r\
    \n/export file=\"\$plik\"\r\
    \n/system backup save name=\"\$plik\"\r\
    \n/tool e-mail send to=emailaddresstosendto subject=(\"Konfiguracja \$plik (\$[/\
    system resource get architecture-name]/\$[/system resource get version]) @\
    \_\$[/system clock get date] \$[/system clock get time]\") file=\"\$plik.rsc,\$plik.backup\" \r\
    \n"
/tool e-mail
configure e-mail settings according to your needs

right!, well, thanks for that,. we did the export but then during the load balancing excercise it became apparant my entire network was going to operate completely differently, now with multiple LANs on multiple ports with no bridge, (apparently thats faster) so no more bridge meant that everyone on the 3,4,5,6,7 etc LAN ports needed to have new LAN IPs, which also meant that i cant run a DHCP server on those ports apparently.

So everything changed and all the queue and DHCP list became invalid anyway lol.

what are you trying to achieve out of the load balancing?
I dont know how to write this without being rude as I have tried a couple times but from the information you have provided so far I dont think that separating the lans are needed at all and this can either be done jsut through the route table(always want to achieve this if possible) or it will need to hit the firewall/mangle rules and at that point who care what subnet they are on cos you can filter out traffic in either a broad or really specific way.

so the guy came and did the hard reset and all that, but now everyone is complaning about lag and slow internet. the day after the guy finished, he did say to me, please set up the firewall and security, whcih i have not yet done.

i have no idea how to do that.
I had my brothe rin law log in and look at it, he sent me a screenshot video of the interface menu and the 2 wan ports were up but one of them was randomly showing 0 throughput for brief half second intervals, every 4 or 5 seconds.

So i tol dhim to turn that wan port off, disable in interface, but then apparently it didnt fix it, so he turned it back on.

Now its doing that random 0 kbps throughput on all ports.

Is this some kind of hack where somoene is bringing us donw because i have no firewall?
THere is intense competition where i host this thing, and the culture here is just digusting crab mentallity, i could very much imagine that someone is upset with me doing well and is trying to bring down my network.

COuld this wierd random drop out every 4 seconds be some kind of denial of service attack from within my network becasue i didnt do anything to get the firewall up and running?

Hello Bartosz,

Is this script still working for you? I'm having a problem.

My email is configured correctly.

Thank you in advance for your feedback.

Yes, it works for 7.19.4 so it should work for 7.23 but not tested it.

Copied script, imported with terminal, adjusted to= ... address and executed script with e-mail received as result.

Seems that it does not work for you as you have problems with accessing the Internet world: New setup - no internet

Unfortunately, it doesn't work for me.

Zrzut ekranu 2026-06-21 220031

It only works if I remove the following commands from the last line (11) of the script: file="$plik.rsc,$plik.backup". The email is then sent, but without the attachment.

:local databiezaca [/system clock get date]
:local dzien [ :pick $databbiezaca 4 6 ]
:local mies [ :pick $databbiezaca 0 3 ]
:local rok [ :pick $databbiezaca 7 11 ]
:local plik ""
#:set plik ("$[/system identity get name]"."_"."$rok"."$mies"."$dzien")
:set plik ("$[/system identity get name]")
:log info "Eksportuje konfiguracje $plik"
/export file="$plik"
/system backup save name="$plik"
/tool e-mail send ``to=me@post.com`` subject=("Konfiguracja $plik ($[/system resource get architecture-name]/$[/system resource get version]) @ $[/system clock get date] $[/system clock get time]")

Please copy and show the exact non working script source you use/run.
Do not edit, just verbatim copy.

Please find below requested info:

:local databiezaca [/system clock get date]
:local dzien [ :pick $databbiezaca 4 6 ]
:local mies [ :pick $databbiezaca 0 3 ]
:local rok [ :pick $databbiezaca 7 11 ]
:local plik ""
#:set plik ("$[/system identity get name]"."_"."$rok"."$mies"."$dzien")
:set plik ("$[/system identity get name]")
:log info "Eksportuje konfiguracje $plik"
/export file="$plik"
/system backup save name="$plik"
/tool e-mail send to="me@post.com" subject=("Konfiguracja $plik ($[/system resource get architecture-name]/$[/system resource get version]) @ $[/system clock get date] $[/system clock get time]") file="$plik.rsc,$plik.backup"

[admin@MikroTik] > /system script run ExportConfig
Saving system configuration
Configuration backup saved
input does not match any value of file

I suspect that you you do not have enough place on the device to have both export and backup files saved. Comment command sending an email and check this.
What version of ROS do you use? What device model?

x86

ROS 7.21.4

free HDD space: 236.5 GiB

Can you find the exported files on the disk when the script ends it's execution?. They are not deleted so you can check this.
If I tweak the script and there are missing files then I get same error as you.

The files are on disk.

They're created every time I run the script.

That was the first thing I checked, before I wrote about my problem.

The problem is with the "file" command in line 11 (the last one).

If it's the last line of the script, I get the following error: /tool/e-mail/send (file) line 11.

Zrzut ekranu 2026-06-21 220031

Do not use any spaces or other "strange" characters in device's name. Make sure it's one consistent word.
For me you named the router "Mikro Tik " what confuses script executor as it looks for "Mikro" and "Tik" files

Zrzut ekranu 2026-06-22 103648

I changed the router name from "MikroTik" to "mikrotik" and the problem is the same:

Zrzut ekranu 2026-06-22 103738

No idea what's going on .... try Winbox 4

Are there spaces in the names on the screenshots?

mikrotik.rsc mikrotik.backup or is it only my halucination?