Does anyone have an example of a script that will export and email the config from a router?
Matt
Does anyone have an example of a script that will export and email the config from a router?
Matt
:local mailfrom "backups@example.tld"
:local rcptto "yourname@example.tld"
/export file config
/tool e-mail send 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
:delay 10
/system backup save name=email
/tool e-mail send to=$rcptto from=$mailfrom subject=("{mtbackup} " . [/system identity get name] . " backup, " . [/system resource get version]) body="See attached file for configuration backup." file=email.backup
I don’t suppose there is a way to encrypt the file before emailing it?
Matt
not that i know of. you should only be sending these using the server that has the end recipient, that way it’s not floating around the net. also, if you want encryption, create a vpn tunnel to your server maybe.
you could even enable the tunnel before sending the mail, and enable it only for this traffic - all with the same script.
Hello frens,
i used this Update SMTP & Backup scripts since 18 months ago nice.... ![]()