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

    How To Auto Backup Filename.backup 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.BACKUP AND SEND TO GMAIL BY BUANANET
    #************************************************************
    :global backupfile ([/system identity get name] . "-" . [/system clock get time])
    /system backup save name=$backupfile
    :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=("$backupfile" . ".backup")
    :delay 30s
    /file remove ("$backupfile" . ".backup")
    Credit: www.o-om.com