Script backup

/system scheduler

add interval=1w name=backup_export on-event=backup_export policy=\

ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=\

may/06/2015 start-time=19:00:00

/system script

add name=backup_export owner=admin policy=\

ftp,reboot,read,write,policy,test,password,sniff,sensitive source="# Varia\

veis\

\n\r\

\n:gl dia ([:pick [/system clock get date] 4 6])\r\

\n\

\n:gl mes ([:pick [/system clock get date] 0 3])\

\n\r\

\n:gl ano ([:pick [/system clock get date] 7 11])\r\

\n\

\n:gl hora [/sys cl get time]\r\

\n\

\n:gl rb [/sys id get name]\

\n\r\

\n:gl arquivo (\"backup_export_\" . \$ano.\$mes.\$dia)\

\n\r\

\n#:gl arquivo (\$rb . \"_\" . \$mes)\r\

\n\

\n:log info \"Gerando backup...\"\r\

\n\

\nexport file=\$arquivo\r\

\n:delay 30s\

\n\r\

\n:log info \"Backup terminado.\"\

\n"