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

Sun Microsystems Acquires MySQL

I woke up to a very big announcement today. I was browsing digg and found that MySQL was acquired by Sun Microsystems. You can read more about the acquisition on the MySQL blog of Kaj Arno about the acquisition of MySQL by Sun Microsystems. My take, with Sun releasing Solaris into the Open Source realm, this is just another piece of software that they can put under their belt and package with Solaris. I have included some blurbs from Kaj Arno's blog below.
Read More

Corporate critics feel the stinging lash of DMCA misuse

I use to work for an ISP and was head of the Abuse Department. We only really received legitimate DCMA's that were then handled by legal. We didn't really seem to get that many DMCA notices, maybe its because we're a Canadian organization?
Corporate critics feel the stinging lash of DMCA misuse -

Two recent cases show that companies aren't always fans of criticism, and some will file misguided DMCA notices and defamation cases to scrub it from the Internet.

Read More...

Read More