A small script I created after going through many scripts available at the Mikrotik wiki. This is a simple script that creates a backup file of the Mikrotik RouterOS and emails the file to any email address specified in the script.
:global 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] . ".backup")
/system backup save name=$file
/tool e-mail set server=smtp.example.com
/tool e-mail set from="backup@example.com"
/tool e-mail send to="reports@example.com" subject="Mikrotik RouterOS Firewall Backup" body="Attached is the backup file of Mikrotik RouterOS" file=$file
:global 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] . ".backup")
/system backup save name=$file
/tool e-mail set server=smtp.example.com
/tool e-mail set from="backup@example.com"
/tool e-mail send to="reports@example.com" subject="Mikrotik RouterOS Firewall Backup" body="Attached is the backup file of Mikrotik RouterOS" file=$file
0 comments:
Post a Comment