Automatic backup and email script

  1. Post the the script as copy past from the gui. Its hard to understand and debug script like this.
  2. Never ever auto upgrade your router. Only upgrade if:
    ..a. you need to upgrade. (new function, serious bug fix etc)
    ..b. read the forum over and over
    ..c. wait at least some week after a new release before upgrade.
    ..d. the read forum again to see if there are any show stoppers
    ..e. upgrade on an equal router with same software as prod ruter. test if all works fine
    ..f. make a backup
    ..g. then you may upgrade if you need.

Example on script posting.

:local emailAddress "mikrotik.o8507@xxxx.com"
:log info "BACKUP STARTING NOW"
:global backupfile ([/system identity get name] . "-" . [/system clock get time])
/system backup save name=$backupfile
:log info "BACKUP FILE SAVED, SENDING EMAIL IN 2 SECONDS"
:delay 2s
/tool e-mail send to="$emailAddress" subject=([/system identity get name] . " Backup " . [/system clock get date] . " " . [/system clock get time]) file=$backupfile
:delay 15s
:log info "BACKUP EMAIL SENT, REMOVING BACKUP FILE"
/file remove $backupfile
:log info "BACKUP FINISHED"

Here is a working gmail backup scrript.
http://forum.mikrotik.com/t/backup-config-to-gmail-v1-7/156147/1