geerlingguy / my-backup-plan

How I back up all my data.
807 stars 48 forks source link

Hint: automatic Mikrotik backup #6

Open petrkutalek opened 2 years ago

petrkutalek commented 2 years ago

Hi Jeff,

Automatic backup of Mikrotik device can be done very easily:

1) set up SSH access to your Mikrotik 2) save backup and copy it

ssh mymikrotik /system backup save name=/mymikrotik.backup
scp mymikrotik:/mymikrotik.backup .

or save configuration (textual) and copy it

ssh mymikrotik /export file=/mymikrotik
scp mymikrotik:/mymikrotik.rsc .

3) profit :)

As always, thanks for sharing your experience. 👍️

Petr

BTW: I'm always curious about your geerli.net domain. It seems to publicly contain only a private 10.0.0.0/8 A record; 🤔 so is it set up on a DNS server on the internal network for local addressing? Maybe it deserves some video in the future. 😃

geerlingguy commented 2 years ago

@petrkutalek - AFAICT, that only works if you're booted into RouterOS, though, right? I'm booted into SwitchOS for performance reasons.

geerlingguy commented 2 years ago

(Also related: #4)

sebweb3r commented 2 years ago

I (again RouterOS) run a modified version of this backup script for mikrotik stuff I cannot (easily) ssh into (f.e. at my sisters places) https://github.com/beeyev/Mikrotik-RouterOS-automatic-backup-and-update and push the config via ssh.

But it should be possible to use curl/wget scripts, like mentioned here: https://forum.mikrotik.com/viewtopic.php?t=172799 But I cannot test it yet (CSS device is not yet here and my Routerboards and CRS125 cannot boot SwOS) It (curl) works like a charm for my few non-RouterOS/OpenWRT devices so far.