Page 1 of 1

Backup Script

Posted: Wed Mar 30, 2011 4:19 pm
by hci
Why doesn't this script work anymore? Last worked on Mikrotik 3.30 and stopped after that.

:local mailfrom "backup@XXXXXXXXXXXXX.com"
:local rcptto "backup@XXXXXXXXXXXXX.com"

/export file config

/tool e-mail send server=X.X.X.10 to=$rcptto from=$mailfrom subject=("{mtbackup} " . [/system identity get name] . " backup, " . [/system resource get version]) body="See attached file for configuration export." file=config.rsc

Re: Backup Script

Posted: Sun Apr 03, 2011 12:39 am
by Sulyvien
Since ROS 4.6:

email - user must enable tls explicitly

use:
/tool e-mail send tls=yes server=X.X.X.10 to=$rcptto from=$mailfrom subject=("{mtbackup} " . [/system identity get name] . " backup, " . [/system resource get version]) body="See attached file for configuration export." file=config.rsc

Re: Backup Script

Posted: Fri Apr 15, 2011 5:04 am
by bburley
You may need to add a delay before emailing. It could be trying to send the file before the backup export is complete.