I have something what can't to do.
I want to send backup & log files via one e-mail but don't know what to write in script.
When use only one file, work fine but wih 2x don't work. (I can configure script to send file by file with two e-mails, but batter is send two files with one mail )
Btw, don't have log info from script in log when try to run this script (I think is that becouse have some error).
So, my script is down and below is copied part of the script where is th problem (Marked RED).
Code: Select all
:log info "Backup Configurations"
:global backupconf ([/system identity get name] . "-" . [/system clock get time] . \ "." "CONF")
/system backup save name=$backupconf
:log info "Backup pausing for 2s"
:delay 2s
:log info "Backup log"
:global backuplog ([/system identity get name] . "-" . [/system clock get time] . \ "-" "LOG")
/log print file=$backuplog
:log info "Backup log pausing for 10s"
:delay 10
:log info "Backup being emailed"
/tool e-mail send to="ognjen.stanisavljevic@mega.rs" subject=([/system identity get name] . "-" . [/system clock get time] . \
" Backup Configuration & Log - SBB-Optic") from=mikrotik@mega.rs file=$backupconf file=$backuplog server=mail.mega.rs
:log info "backup LOG finished"
/tool e-mail send to="ognjen.stanisavljevic@mega.rs" subject=([/system identity get name] . "-" . [/system clock get time] . \
" Backup Configuration & Log - SBB-Optic") from=mikrotik@mega.rs file=$backupconf file=$backuplog server=mail.mega.rs
If someone have solution, post here. I would like to hear your thoughts