Discussion:
[rancid] Mikrotik Router Backups
Eric Merkel (Mail Lists)
2009-06-15 21:08:17 UTC
Permalink
I've patched rancid 2.3.2 to handle mikrotik router backups per the following thread http://www.gossamer-threads.com/lists/rancid/users/3826

The new program mtlogin seems to work ok. However when I run /usr/local/rancid/bin/mtlogin -c" system package print detail;system routerboard print;system license print;export" 10.11.9.1 it pauses after login waiting for the command prompt and spits out some special characters ^[[?6c^[[36;3R. Once it detects the login prompt it runs the previous commands showing the configs etc as it should then at the very end says "interrupted" and quits.

When the rancid-run process runs I get the following errors.

Trying to get all of the configs.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 1.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 2.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 3.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 4.
10.11.9.1: missed cmd(s): system routerboard print

If you are not familiar with Mikrotik, it has a command line interface although some of the text is color coded. I am wondering if these special characted codes could be causing the issue. If not where do I start looking? Thanks!

===
Eric Merkel
***@gmail.com
Chris Boot
2009-06-16 18:04:42 UTC
Permalink
Eric,

You need to make sure '+ct' is on the end of your username. This
disables colour (+c) and autodetection (+t). See http://www.mikrotik.com/download/CHANGELOG_3
for more details, under "What's new in 3.0rc14".

HTH,
Chris
Post by Eric Merkel (Mail Lists)
I've patched rancid 2.3.2 to handle mikrotik router backups per the
following thread http://www.gossamer-threads.com/lists/rancid/users/3826
The new program mtlogin seems to work ok. However when I run /usr/
local/rancid/bin/mtlogin -c" system package print detail;system
routerboard print;system license print;export" 10.11.9.1 it pauses
after login waiting for the command prompt and spits out some
special characters ^[[?6c^[[36;3R. Once it detects the login prompt
it runs the previous commands showing the configs etc as it should
then at the very end says "interrupted" and quits.
When the rancid-run process runs I get the following errors.
Trying to get all of the configs.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 1.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 2.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 3.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 4.
10.11.9.1: missed cmd(s): system routerboard print
If you are not familiar with Mikrotik, it has a command line
interface although some of the text is color coded. I am wondering
if these special characted codes could be causing the issue. If not
where do I start looking? Thanks!
===
Eric Merkel
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
--
Chris Boot
***@bootc.net
Eric Merkel (Mail Lists)
2009-06-30 23:57:32 UTC
Permalink
Chris,

I've finally gotten back to looking at this and the +ct seems to have helped
expect to properly parse the login info. However, I am still having the
issue of rancid geting the error "missed cmd(s): system routerboard print",
etc when rancid runs from cron. However if I run rancid-run from the command
line it seems to work fine. Any clue what might cause that? Am I missing an
environment variable or something?

I appreciate all your help this far!

===
Eric Merkel
***@gmail.com
----- Original Message -----
From: "Chris Boot" <***@bootc.net>
To: "Eric Merkel (Mail Lists)" <***@gmail.com>
Cc: <rancid-***@shrubbery.net>
Sent: 2009-06-16 14:04
Subject: Re: [rancid] Mikrotik Router Backups
Eric,
You need to make sure '+ct' is on the end of your username. This disables
colour (+c) and autodetection (+t). See
http://www.mikrotik.com/download/CHANGELOG_3 for more details, under
"What's new in 3.0rc14".
HTH,
Chris
Post by Eric Merkel (Mail Lists)
I've patched rancid 2.3.2 to handle mikrotik router backups per the
following thread http://www.gossamer-threads.com/lists/rancid/users/3826
The new program mtlogin seems to work ok. However when I run /usr/
local/rancid/bin/mtlogin -c" system package print detail;system
routerboard print;system license print;export" 10.11.9.1 it pauses after
login waiting for the command prompt and spits out some special
characters ^[[?6c^[[36;3R. Once it detects the login prompt it runs the
previous commands showing the configs etc as it should then at the very
end says "interrupted" and quits.
When the rancid-run process runs I get the following errors.
Trying to get all of the configs.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 1.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 2.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 3.
10.11.9.1: missed cmd(s): system routerboard print
=====================================
Getting missed routers: round 4.
10.11.9.1: missed cmd(s): system routerboard print
If you are not familiar with Mikrotik, it has a command line interface
although some of the text is color coded. I am wondering if these
special characted codes could be causing the issue. If not where do I
start looking? Thanks!
===
Eric Merkel
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
--
Chris Boot
Loading...