Feature request: automating configuration backups

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)

Nice idea.. +1

+1

This would be a perfect addition to the Dude.

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")

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…