Auto Backup Every 5 min & Restore auto after reboot router

me from Bangladesh.
Have any script who’s work like that -

*It Create Backup Every 5 min, Delete 2nd last backup file every 6 min, & if router restart it will Restore from last back with time setting.

My router - RB750, v5.25

please give me a solution. :frowning:

I am working on it right now.
I have one that is working sending an e-mail. Each day but i didn’t got the erase part yet.

add name=backup_mail policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive source="\
    :log info \"backup beginning now\" \
    \n\
    \n:global backupfile ([/system identity get name] . \"-\" . [/system clock\
    \_\
    \n\
    \nget time]) \
    \n\
    \n/system backup save name=\$backupfile \
    \n\
    \n:log info \"backup pausing for 10s\" \
    \n\
    \n:delay 10s \
    \n\
    \n:log info \"backup being emailed\" \
    \n\
    \n/tool e-mail send to=\"DESTINATION EMAIL\" subject=([/system ident\
    ity \
    \n\
    \nget name] . \\\
    \n\
    \n\" Backup\") from=([/system identity get name] . \"@YOURDOMAIN\") file\
    =\$backupfile \
    \n\
    \n:log info \"backup finished\" \
    \n\
    \n"

write if you want support for adapt the script.
Also you have to config first your e-mail in tool e-mail

You might want to take a look at my backup solution, which handles the file deletion part as well.
I posted it in Automated RouterOS Backup to FTP in Harry’s TechBlog.