About Me

MTIN is a full service consulting firm with over 15 years of experience. We specialize in ISP networks.  Other clients include enterprise, education, government, and SOHO.  We have Mikrotik, Cisco, and other certified engineers on staff. Our corporate page can be found at http://www.mtin.net

 

November 2009
M T W T F S S
    Dec »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Mikrotik Backup Script

The following can be pasted into your terminal. Just edit the appropriate fields and you are ready to go.

/ tool e-mail
set server=1.2.3.4 from="you@somewhere.comt"

/system script
add name=ebackup policy=ftp,reboot,read,write,policy,test,winbox,password,sniff source="/\
 system backup save name=([/system identity get name] . \"-\" . \\\r\
 \n[:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . [:pi\
 ck [/system clock get date] 4 6]); \\\r\
 \n/tool e-mail send to=\"YOU@SOMEWHERE.com\" subject=([/system identity get name\
 ] . \" Backup \" . \\\r\
 \n[/system clock get date]) file=([/system identity get name] . \"-\" . [:pick [/syst\
 em clock get date] 7 11] . \\\r\
 \n[:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6] . \".ba\
 ckup\");:delay 10; \\\r\
 \n/file rem [/file find name=([/system identity get name] . \"-\" . [:pick [/system c\
 lock get date] 7 11] . \\\r\
 \n[:pick [/system clock get date] 0 3] . [:pick [/system clock get date] 4 6] . \".ba\
 ckup\")]; \\\r\
 \n:log info (\"System Backup emailed at \" . [/sys cl get time] . \" \" . [/sys cl ge\
 t date])"
/system scheduler
add comment="" disabled=no interval=1w name=sched_backup_mail on-event=\
 ebackup start-date=jan/01/1970 start-time=07:30:00

If you enjoyed this post, make sure you subscribe to my RSS feed!
  • Digg
  • LinkedIn
  • StumbleUpon
  • Twitter
  • WordPress
  • Facebook
  • Share/Bookmark

1 comment to Mikrotik Backup Script

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>