Community discussions

MikroTik App
 
mavink
newbie
Topic Author
Posts: 32
Joined: Sun Sep 06, 2015 5:55 pm

Feature request: automating configuration backups

Wed Dec 09, 2015 9:22 pm

Since the Dude typically already has access to all RouterOS devices on a network, a logical addition would be a method to automate configuration backups. Some ideas:
  • Periodically do the API equivalent of /export compact on all devices, and store the output on the Dude server
  • Allow administrator to set limits for how many backups/days are stored
  • Preferably with a "smart" schedule such as 7 daily backups, 4 weekly backups, etc so save space
  • Improvement for the previous item: only store configurations that have changed since the last version
  • An option to also store complete backups generated by the /backup command
  • Since those can get big, an option to store these on a remote server (FTP upload, NFS or SMB mount, whatever is easiest to implement)
 
User avatar
bajodel
Long time Member
Long time Member
Posts: 551
Joined: Sun Nov 24, 2013 8:30 am
Location: Italy

Re: Feature request: automating configuration backups

Thu Dec 17, 2015 9:17 pm

Nice idea.. +1
 
User avatar
jstump
newbie
Posts: 45
Joined: Mon May 04, 2015 6:57 pm
Contact:

Re: Feature request: automating configuration backups

Thu Jan 21, 2016 8:50 pm

+1

This would be a perfect addition to the Dude.
 
i4jordan
Frequent Visitor
Frequent Visitor
Posts: 77
Joined: Mon Sep 02, 2013 1:42 am

Re: Feature request: automating configuration backups

Thu Jan 21, 2016 10:11 pm

I have written a script which makes a backup and a configuration export on a attached USB stick.
:global getDateTime do={
  :local thisdate [/system clock get date];
  :local thistime [/system clock get time];
  :local year [:pick $thisdate 7 11];
  :local month [:pick $thisdate 0 3];
  
  :if ($month="jan") do={[:set $month "01"]};
  :if ($month="feb") do={[:set $month "02"]};
  :if ($month="mar") do={[:set $month "03"]};
  :if ($month="apr") do={[:set $month "04"]};
  :if ($month="may") do={[:set $month "05"]};
  :if ($month="jun") do={[:set $month "06"]};
  :if ($month="jul") do={[:set $month "07"]};
  :if ($month="aug") do={[:set $month "08"]};
  :if ($month="sep") do={[:set $month "09"]};
  :if ($month="oct") do={[:set $month "10"]};
  :if ($month="nov") do={[:set $month "11"]};
  :if ($month="dec") do={[:set $month "12"]};
  
  :local day [:pick $thisdate 4 6];
  :local datetimestring ([$year] . [$month] . [$day] . "-" . [:pick $thistime 0 2] . [:pick $thistime 3 5]);
  
  :return ($datetimestring)

}

/system backup save name=("disk1/" . [/system identity get name] . "-" . [$getDateTime] . ".backup")
/export file=("disk1/". [/system identity get name] . "-export-config-" . [$getDateTime] . ".rsc")
 
User avatar
jstump
newbie
Posts: 45
Joined: Mon May 04, 2015 6:57 pm
Contact:

Re: Feature request: automating configuration backups

Thu Feb 11, 2016 10:06 pm

That's a nice script, but I would prefer something central through the Dude.

Automated backups to the Dude server! I know it's possible to do backups in other ways, but if we have everything connected and managed in one central place like the Dude, doing backups from there would be much less painful than going to every router and configuring a script/schedule...

Who is online

Users browsing this forum: No registered users and 30 guests