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 from=xxx@gmail.com password=xxxx port=587 start-tls=yes user=xxxx@gmail.com
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 BY BUANANET
#************************************************************
: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="xxxx@gmail.com" subject=([/system identity get name] . " - ". [/system clock get time] . " - " . [/system clock get date] . "") from=xxxx@gmail.com file=("$backupfilersc" . ".rsc")
:delay 30s
/file remove ("$backupfilersc" . ".rsc")
Credit: www.o-om.com