MikroTik – Backing Up Your MikroTik & Routerboard Config

Another great script that will email you a copy of your MikroTik/Routerboard device config. You can find the source on the MikroTik Wiki below.

http://wiki.mikrotik.com/wiki/Send_Backup_email

Some notes about the script on the MikroTik wiki and below.

  • I had to modify the script on the MikroTik website, it had used /tool e-mail set address instead of /tool e-mail set server.
  • Ensure that you specify an IP Address for sending an email, a host name will fail.

I’ve moved the code to GitHub just because its awesome and it will track changes! The latest code is available at https://github.com/jordantrizz/mikrotik-scripts/blob/master/backup

/export file=([/system identity get name] . "-" . \
[:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6]); \
/tool e-mail send to="[email protected]" subject=([/system identity get name] . " Backup " . \
[/system clock get date]) file=([/system identity get name] . "-" . [:pick [/system clock get date] 7 11] . \
[:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6] . ".rsc"); :delay 10; \
/file rem [/file find name=([/system identity get name] . "-" . [:pick [/system clock get date] 7 11] . \
[:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6] . ".rsc")]; \
:log info ("System Backup emailed at " . [/sys cl get time] . " " . [/sys cl get date])

Please note: The code above was incorrectly formatted and may have had some characters changed or stripped when it was first posted. I have since updated the above code and it should be correct, if you have any issues then post a comment. -Jordan @ 09/12/12


Did you like this article?


0 Shares:
You May Also Like

Official Jailbreak for iPhone 2.1 Firmware Released OSX Only

There is now an official iphone-dev.org version of QuickPwn that supports the 2.1 firmware released by Apple on friday.
Some of the popular press and blogs have been backing the opposition. :-) While criticism and competition is fine it should be reported correctly, with all the facts. and certainly minus the FUD. Do you guys think we are “less and less relevant with each passing day” ? We don’t think so, and we certainly prefer our hacks to theirs. ;-) Though even if the world deems us irrelevant, the iPhone family of devices is still fun to hack!
Read More