Sunday, February 5, 2017

Send Mikrotik User Manger Backup File Every Day Via E-mail



/system script
add name=UserManger policy=\
   ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":gl\
   obal SenderId #SENDER@gmail.com\r\
   \n:global SenderUser  #USER\r\
   \n:global GmailPwd #SENDER-PWD\r\
   \n:global RecMail #Receive@gmail.com\r\
   \n:local gmailip \"smtp.gmail.com\"\r\
   \n:global sub1 ([/system identity get name])\r\
   \n:global sub2 ([/system clock get time])\r\
   \n:global sub3 ([/system clock get date])\r\
   \n:global UserMangerFile usermanger\r\
   \n:log warning \"Mikrotik Sending UserManger Backup File.....BY >>>>WWW.ITLE\
   ARNWEB.COM<<<<\"\r\
   \n:log warning \"Creating new backup files\"\r\
   \n/tool user-manager database save name=\$UserMangerFile\r\
   \n:delay 10s\r\
   \n/tool e-mail set address=\$gmailip from=\$SenderId password=\$GmailPwd por\
   t=587 start-tls=yes user=\$SenderUser\r\
   \n:log info \"Sending Backup File.....BY >>>>WWW.ITLEARNWEB.COM<<<<\"\r\
   \n/tool e-mail send to=\$RecMail password=\$GmailPwd subject=\"UserManger Ba\
   ckup File (\$sub1 \$sub2 \$sub3) \" from=\$SenderId file=\$UserMangerFile se\
   rver=\$gmailip start-tls=yes\r\
   \n:log warning \"Please Wait....System is Busy\"\r\
   \n:delay 30s\r\
   \n/file remove \$UserMangerFile\r\
   \n:delay 05s\r\
   \n:log warning \"Finished\"\r\
   \n"
/system scheduler
add interval=1d name=UserManger on-event=UserManger policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=feb/05/2017 start-time=12:00:00

/

Dowload Scripts

0 comments:

Post a Comment