Skip to content

Dump configuration files from Mikrotik switches to git repository using ssh

Notifications You must be signed in to change notification settings

ffzg/mikrotik-switch

Repository files navigation

Dump configuration files from Mikrotik switches to git repository using ssh


See doc/1-ssh.txt for info how to install ssh keys


Configuration:


Create backup directory and init git in it:

dpavlin@black:~/mikrotik-switch$ mkdir backup
dpavlin@black:~/mikrotik-switch$ cd backup/
dpavlin@black:~/mikrotik-switch/backup$ git init
dpavlin@black:~/mikrotik-switch/backup$ cd ..

Now run export-backup.sh for each switch that you have:

dpavlin@black:~/mikrotik-switch$ ./export-backup.sh sw-dpc-2

This will fetch switch config, add it to git and commit changes


If you specify --all to export-backup.sh it will use existing files
in backup/ directory to update all existing switch configurations,
so you can add something like following entry to your cron:

/home/dpavlin/mikrotik-switch/export-backup.sh --all



About

Dump configuration files from Mikrotik switches to git repository using ssh

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published