Community discussions

MUM Europe 2020
 
rankcybernet
just joined
Topic Author
Posts: 7
Joined: Thu Sep 05, 2013 6:34 pm

Auto Backup Every 5 min & Restore auto after reboot router

Mon Dec 02, 2013 4:32 pm

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. :(
 
jfvelamoscoso
Trainer
Trainer
Posts: 59
Joined: Fri Oct 25, 2013 12:52 am
Location: Arequipa - Peru

Re: Auto Backup Every 5 min & Restore auto after reboot rout

Thu Dec 12, 2013 8:09 pm

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
----------------------------------------
jfvelamoscoso@gmail.com
Network Engineer Noc Department
MTCNA, MTCTCE

If it helps please give some karma
 
User avatar
zap71
Frequent Visitor
Frequent Visitor
Posts: 83
Joined: Fri Sep 27, 2013 11:10 am
Location: Berlin, Germany
Contact:

Re: Auto Backup Every 5 min & Restore auto after reboot rout

Fri Dec 27, 2013 8:09 pm

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.

Who is online

Users browsing this forum: No registered users and 14 guests