{"id":22430865,"url":"https://github.com/zeljkobenovic/gombak","last_synced_at":"2025-08-01T11:32:33.914Z","repository":{"id":226973015,"uuid":"768692454","full_name":"ZeljkoBenovic/gombak","owner":"ZeljkoBenovic","description":"MikroTik router discovery and backup tool","archived":false,"fork":false,"pushed_at":"2024-09-08T22:39:41.000Z","size":24,"stargazers_count":8,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-09T13:35:39.532Z","etag":null,"topics":["backup","backup-tool","go","golang","mikrotik","mikrotik-router","networking","router"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZeljkoBenovic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-07T15:00:08.000Z","updated_at":"2024-09-08T22:34:30.000Z","dependencies_parsed_at":"2024-03-10T22:41:52.860Z","dependency_job_id":"f6305bbc-a061-492d-af51-71bf73dd838b","html_url":"https://github.com/ZeljkoBenovic/gombak","commit_stats":null,"previous_names":["zeljkobenovic/gombak"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeljkoBenovic%2Fgombak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeljkoBenovic%2Fgombak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeljkoBenovic%2Fgombak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeljkoBenovic%2Fgombak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZeljkoBenovic","download_url":"https://codeload.github.com/ZeljkoBenovic/gombak/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228370980,"owners_count":17909389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","backup-tool","go","golang","mikrotik","mikrotik-router","networking","router"],"created_at":"2024-12-05T21:09:49.316Z","updated_at":"2024-12-05T21:09:50.005Z","avatar_url":"https://github.com/ZeljkoBenovic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GOMBAK (GO-Mikrotik-BAcKup)\n\nA program used for creating MirkoTik routers backups.    \nThere are different modes of backup:   \n* `single` - backup of a single router\n* `multi` - backup of multiple routers\n* `l2tp` - discover routers ip addresses using remote ip of the L2TP tunnels\n\n## Prerequisites\n* Mikrotik router with enabled SSH access\n* For `l2tp` discovery, the \"concentrator\" router/s must have Mikrotik API port available\n\n## Usage\nDownload appropriate binary for your OS from the releases page.     \nRun the program in desired mode.\n\n### Single\nSingle router backup can be run in a single line:    \n`gombak --single.host \"\u003crouter_ip\u003e\" --single.user \"\u003cusername\u003e\" --single.pass \"\u003cpassword\u003e\" --backup-dir \"\u003cbackup_directory\u003e\" `    \nThis is the default mode. \n\n### Environment variables\nEnvironment variables can be used instead of `cli` flags.    \nThe prefix is `GOMBAK_` and the rest is the flag name.    \nFor example, to use environment variable instead of `--single.pass` flag, set `GOMBAK_SINGLE_PASS=\u003cpass\u003e`.   \nFor `--single.user`, set `GOMBAK_SINGLE_USER=\u003cuser\u003e` and so on...\n\n### Multi router backup\nFor multiple router backups, a yaml config file is more appropriate.\nHere is a sample of this config file, named `config.yaml`:\n```yaml config.yaml\nmode: multi\nbackup-dir: \"\u003cbackup_dir\u003e\"\nmulti-router:\n  - host: \"\u003crouter_1_ip\u003e\"\n    ssh-port: \"\u003crouter_1_ssh_port\u003e\"\n    username: \"\u003crouter_1_username\u003e\"\n    password: \"\u003crouter_1_password\u003e\"\n  - host: \"\u003crouter_2_ip\u003e\"\n    ssh-port: \"\u003crouter_2_ssh_port\u003e\"\n    username: \"\u003crouter_2_username\u003e\"\n    password: \"\u003crouter_2_password\u003e\"\n  - host: \"\u003crouter_3_ip\u003e\"\n    ssh-port: \"\u003crouter_3_ssh_port\u003e\"\n    username: \"\u003crouter_3_username\u003e\"\n    password: \"\u003crouter_3_password\u003e\"\n  # add as many router you like\n```\nUse the config file with `gombak -c config.yaml`\n\n## Discovery\n\nWhen there are a lot of routers that needs backing up, some kind of discovery mechanism must exist. \n\n### L2TP\nFor now only `l2tp` discovery mechanism is supported. A user should provide an API access to the router, which \nall other routers connected to it via `L2TP` tunnel. This is basically a scenario where there is one or more \"concentrator\" \nrouters, which are being used to manage all others.   \nThe \"concentrator\" router/s must have their API open, as we need to fetch the information about remote `l2tp` tunnel addresses.\n\nThe config file example is as following:\n```yaml\n\nmode: l2tp\nbackup-dir: \"\u003cbackup_folder\u003e\"\ndiscovery:\n  hosts:\n    - \"\u003cconcentrator_1_router_ip\u003e\"\n    - \"\u003cconcentrator_2_router_ip\u003e\"\n  username: \"\u003crouter_username\u003e\"\n  password: \"\u003crouter_password\u003e\"\n```\n\nThis mode presumes that the username/password combination will be the same across all the routers. \nIt is usually done via RADIUS server or similar solution.\n\nUse the config file with `gombak -c config.yaml`\n\n## System service\nGombak can be set to run as a system service using the provided CLI commands.     \nOnce the `gombak` binary and its configuration YAML file is set in place, system service can be interacted with:\n* `gombak install -c \u003cabsolute_path_to_the_config_file\u003e` - install and run the `gombak` system service\n* `gombak uninstall` - uninstall `gombak` system service\n\n## Flags\nCheck which flags are available with `gombak -h`\n```\n-b, --backup-dir string        mikrotik backup export directory (default \"mt-backup\")\n-r, --backup-retention-days    days of backup file retention (default 30)\n    --backup-frequency-days    backup frequency in days (default 5)\n-c, --config string            configuration yaml file\n    --log.file string          write logs to the specified file\n    --log.json                 output logs in json format\n    --log.level string         define log level (default \"info\")\n-m, --mode string              mode of operation (default \"single\")\n    --single.host string       the ip address of the router\n    --single.pass string       the password for the username\n    --single.ssh-port string   the ssh port of the router (default \"22\")\n    --single.user string       the username for the router\n```\n\n## TODO\n* Email report\n* More discovery modes ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeljkobenovic%2Fgombak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeljkobenovic%2Fgombak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeljkobenovic%2Fgombak/lists"}