Community discussions

MikroTik App
 
HiddenVision
just joined
Topic Author
Posts: 2
Joined: Thu Jun 11, 2015 9:17 pm

Scripting assistant for dummies.

Thu Aug 16, 2018 7:50 pm

Hi All,
Just a fly-by comment on a thought I had the other day.

I wondered if it would be possible for the GUI interfaces (WEB or Winbox) to present the scripting equivalent of the commands used while making changes.

So you could do this and that using the GUI and then see a list of the actual scripting commands needed to make the changes.
then just copy, paste and edit into a file and done.

I know the help section for Scripts is great anyway but Just a wacky thought.

Hv.
 
nostromog
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Jul 18, 2018 3:39 pm

Re: Scripting assistant for dummies.

Thu Aug 16, 2018 10:54 pm

I got a lot of information from the export command.

Once you have the router configured, you do
/ export file="config-<loc>-2018-08-16-01"
And later
scp admin@192.168.88.1:config-<loc>-2018-08-16-01.rsc ~/router/configs/
The name is designed so that you can have several router histories of configurations stored safely. <loc>
is supposed to mean some string that identifies the particular router (I manage three).
The export commad dumps a reasonably minimalistic script that will reconstruct the configuration.

Comparing with a merge tool two configurations makes it easy to spot what the change was,
and makes it easy to copy parts of the configuration of a router to another.

The command can also be called for parts of the subtree. For example /system scripts export will
dump your scripts...

Who is online

Users browsing this forum: abbio90, pe1chl and 117 guests