Ja koristim ovu skriptu:
{
:local RecipientEmail "
[email protected]"
:local SenderEmail "
[email protected]"
:local SMTPServer 173.194.65.108
:log info "Backup procedure started"
:local Date ([:pick [/system clock get date] 7 11] . "-" \
. [:pick [/system clock get date] 0 3] . "-" \
. [:pick [/system clock get date] 4 6])
:local backupfile ("MikroTik-" \
. [/system identity get name] . "-" \
. $Date . "-" \
. [/system clock get time])
:local backupfilebin ($backupfile . "-bin")
:local backupfilecmd ($backupfile . "-cmd")
:put "Creating binary backup"
/system backup save name=$backupfilebin
:put "Creating command backup"
/export file=$backupfilecmd
:delay 10s
:log info "Sending binary backup to email"
:put "Emailing binary backup"
/tool e-mail \
send to=$RecipientEmail \
subject=("Binary backup: " . $backupfilebin) \
from=$SenderEmail \
file=$backupfilebin \
server=$SMTPServer
:put "Emailing command backup"
/tool e-mail \
send to=$RecipientEmail \
subject=("Command backup: " . $backupfilecmd) \
from=$SenderEmail \
file=$backupfilecmd \
server=$SMTPServer
:put "Backup sent"
:log info "Backup procedure finished"
}
I radi mi bez problema