Используя скрипт что приводится в офф вики:
{
:log info "Starting Backup Script...";
:local sysname [/system identity get name];
:local sysver [/system resource get version];
:local mktmodel [/system resource get board-name];
:log info "Flushing DNS cache...";
/ip dns cache flush;
:delay 2;
:log info "Deleting last Backups...";
:foreach i in=[/file find] do={:if ([:typeof [:find [/file get $i name] \
"$sysname-backup-"]]!="nil") do={/file remove $i}};
:delay 2;
:local smtpserv [:resolve "************"];
:local Eaccount "******************";
:local pass "*****************";
:local backupfile ("$sysname-backup-" . \
[:pick [/system clock get date] 7 11] . [:pick [/system \
clock get date] 0 3] . [:pick [/system clock get date] 4 6] . ".backup");
:log info "Creating new Full Backup file...";
/system backup save name=$backupfile;
:delay 2;
:log info "Sending Full Backup file via E-mail...";
/tool e-mail send from="<$Eaccount>" to=$Eaccount server=$smtpserv \
port=587 user=$Eaccount password=$pass file=$backupfile \
subject=("$sysname Full Backup (" . [/system clock get date] . ")") \
body=("$sysname full Backup file see in attachment.\nRouterOS version: \
$sysver $mktmodel\nTime and Date: " . [/system clock get time] . " " . \
[/system clock get date]);
:delay 5;
:local exportfile ("$sysname-backup-" . \
[:pick [/system clock get date] 7 11] . [:pick [/system \
clock get date] 0 3] . [:pick [/system clock get date] 4 6] . ".rsc");
:log info "Creating new Setup Script file...";
/export file=$exportfile;
:delay 2;
:log info "Sending Setup Script file via E-mail...";
/tool e-mail send from="<$Eaccount>" to=$Eaccount server=$smtpserv \
port=587 user=$Eaccount password=$pass file=$exportfile \
subject=("$sysname Setup Script Backup (" . [/system clock get date] . \
")") body=("$sysname Setup Script file see in attachment.\nRouterOS version: \
$sysver $mktmodel\nTime and Date: " . [/system clock get time] . " \
" . [/system clock get date]);
:delay 5;
:log info "All System Backups emailed successfully.\nBackuping completed.";
}
где
:local smtpserv [:resolve "************"];
:local Eaccount "******************";
:local pass "*****************";
данные от почты(домен использую свой с получением/отправкой писем проблем никаких нет, настройки отправки указаны корректно )
Версия микротика 6.49.2
В логах пишут:Error sending e-mail < (jul/**/20**)>: timeout occured
Error sending e-mail < Setup Script Backup (jul/**/20**)>: timeout occured
Пробывал ручной запуск через system-scripts:во флеш память делает бекап, но на почту не отправляется
-
Вопрос задан
-
653 просмотра