Difference between revisions of "Send Backup email"

From MikroTik Wiki
Jump to: navigation, search
Line 1: Line 1:
 +
{{cleanup}}
  
 
== Example 1 ==
 
== Example 1 ==
Line 7: Line 8:
 
/tool e-mail send subject=([/system identity get name]. " Backup") from=([/system identity get name]. "@68519viernheim.de") to="backup@68519viernheim.de" body=("SW-ID:" . [/system license get "software-id"]. "\ngueltig bis:" . [/system license get "upgradable-until"] . "\nfeatures: " . [/system license get "features"] . " \nlevel:" . [/system license get "level"]) file=([/system identity get name]. ".backup")
 
/tool e-mail send subject=([/system identity get name]. " Backup") from=([/system identity get name]. "@68519viernheim.de") to="backup@68519viernheim.de" body=("SW-ID:" . [/system license get "software-id"]. "\ngueltig bis:" . [/system license get "upgradable-until"] . "\nfeatures: " . [/system license get "features"] . " \nlevel:" . [/system license get "level"]) file=([/system identity get name]. ".backup")
  
you have to wait a short time course the file must be create before send :=()
+
you have to wait a short time course the file must be create before send
  
 
----
 
----

Revision as of 12:15, 24 November 2005

This article needs to be to conform to a higher standard of quality.
Error.png

This means that the article should be updated to the latest information available,
it's formatting improved, and irrelevant information removed. Anyone can help improving our wiki, please contribute!

See Wikipedia:How to edit a page and for help, or this article's talk page.

Example 1

/system backup save name=[/system identity get name]

delay 5

/tool e-mail send subject=([/system identity get name]. " Backup") from=([/system identity get name]. "@68519viernheim.de") to="backup@68519viernheim.de" body=("SW-ID:" . [/system license get "software-id"]. "\ngueltig bis:" . [/system license get "upgradable-until"] . "\nfeatures: " . [/system license get "features"] . " \nlevel:" . [/system license get "level"]) file=([/system identity get name]. ".backup")

you have to wait a short time course the file must be create before send


--Rainer Wieland 17:19, 23 Nov 2005 (EET)

Example 2

add name="backup_mail" source="system backup save name=email
\n/tool e-mail send \
to=\"me@mydomaint.abc\" from=\"someone@somewhere.abc\" server=\"213.157.170.43\" subject=\(\[/system \
identity get name\] . \" \" . \[/system clock get time\] . \" \" . \[/system clock get date\] . \" \
Backup\"\) file=email.backup" policy=ftp,reboot,read,write,policy,test

These scripts are of course used with schedulers, example:

/ system scheduler
add name="sched_start_dc1" on-event=start_dc1 start-date=sep/21/2005 start-time=23:00:00 interval=1d \
comment="" disabled=no
add name="sched_backup_mail" on-event=backup_mail start-date=sep/23/2005 start-time=07:30:00 interval=7d \
comment="" disabled=no
add name="sched_stop_dc1" on-event=stop_dc1 start-date=sep/22/2005 start-time=07:00:00 interval=1d comment="" \
disabled=no