Auto Backup Filename.rsc and Send To Gmail - MikroTik Script RouterOS

How To Auto Backup Filename.rsc And Send To Gmail

Setup Your mail first on Tool > Email

/tool e-mail set address=74.125.200.109 [email protected] password=xxxx port=587 start-tls=yes [email protected]
Input this script to Scheduler and you can set backup to gmail every week use interval like "7d 00:00:00"

#************************************************************
# BACKUP FILENAME.RSC AND SEND TO GMAIL 
#************************************************************
:global backupfilersc ([/system identity get name] . "-" . [/system clock get time])
/export file=$backupfilersc
:delay 30s
:log info "backup being emailed"
/tool e-mail send to="[email protected]" subject=([/system identity get name] . " - ". [/system clock get time] . " - " . [/system clock get date] . "") [email protected] file=("$backupfilersc" . ".rsc")
:delay 30s
/file remove ("$backupfilersc" . ".rsc")