This commit is contained in:
Michael Grote 2023-08-02 18:52:22 +02:00
parent d4f775c2e9
commit 324b441d27
6 changed files with 28 additions and 61 deletions

View file

@ -0,0 +1,28 @@
# oxidized-selfmade aka routeros-config-backup
This is a small script that pulls the config of one or multiple routeros-devices and pushes them into git-repository.
## Usage
```yaml
version: "3"
services:
routeros-config-export:
container_name: routeros-config-export
restart: always
image: registry.mgrote.net/oxidized-selfmade:master
volumes:
- /home/mg/key_git:/key_git:ro # passwordless ssh-key for pushing to the git-repository
- /home/mg/key_rb5009:/key_rb5009:ro # passwordless ssh-key for a specific device, if you have mutltiple devices with different keys, mount them all here
environment:
# Format <FQDN>,<SSH_KEY_PATH to ssh-private-key(passwordless)> #siehe volunmes # |- damit keine newline am ende erstellt wird
DEVICES: |-
# <fqdn of the device>,<user>,<path to ssh-key>
rb5009.grote.lan,admin,/neu
GIT_REPO_BRANCH: "master" # on which branch should the commits be created
GIT_REPO_URL: "ssh://gitea@gitea.grote.lan:2222/mg/testrepo.git" # repo-url in ssh format
GIT_REPO_DEPLOY_KEY: "/neu" # path to deploy-key for the git-repository
GIT_USERNAME: oxidized-selfmade # username for the commit
GIT_USER_MAIL: michael.grote@posteo.de # mail for the commit
GIT_REPO_REMOTE_NAME: origin # git-name of the remote
INTERVAL: 30 # interval, how often should the config be pulled
```

3
app.sh
View file

@ -83,9 +83,6 @@ while true ; do
done
# test mitvolume
# ohne volume wg git clone
# healtcheck mit letzue exit code
# beschrieben wie keys abgelegt werden müssen
# hadolint

View file

@ -1,7 +0,0 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACAWEUth3wtXBSzUyKxV3XqMQM1wIJAlpua+F/gB11hf9gAAAJAF27/QBdu/
0AAAAAtzc2gtZWQyNTUxOQAAACAWEUth3wtXBSzUyKxV3XqMQM1wIJAlpua+F/gB11hf9g
AAAEDK9dPq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