• Breaking News

    Monday 2 January 2017

    97. Mikrotik Backup Configuration to Email




    You can contact me: plus.google.com/+PhallaCCMT; youtube.com/phallaccmt; facebook.com/Phalla.CCMT; twitter.com/PhallaCCMT and Phalla.CCMT@gmail.com

    Script:

    :local GDate [/system clock get date]
    :local GDay [ :pick $GDate 4 6 ]
    :local GMonth [ :pick $GDate 0 3 ]
    :local GYear [ :pick $GDate 7 11 ]
    :local GResult "$GDay $GMonth $GYear"
    :local BFile ([/system identity get name] . "_Backup.backup")

    :local GmailSMTP
    :set GmailSMTP [:resolve "smtp.gmail.com"];

    #--------------------------------------------------------#

    /system backup save name=$BFile
    :delay 3s
    :log info "Backup being emailed"

    /tool e-mail send to="alertphalla@gmail.com" cc="phalla.ccmt@gmail.com" subject=([/system identity get name] . \
    " Backup on $GResult") from=alertphalla@gmail.com file=$BFile server=$GmailSMTP

    :log info "$GResult Backup is finished"


    Note:
            - Gmail Server : 173.194.77.108
            - Gmail Port     :  587

    Ref: http://wiki.mikrotik.com/wiki/Send_Backup_email
            http://wiki.mikrotik.com/wiki/Automated_Backups

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel