{"id":19147170,"url":"https://github.com/janst123/nomad-backupper","last_synced_at":"2026-04-09T16:10:23.316Z","repository":{"id":189780606,"uuid":"681257260","full_name":"JanST123/nomad-backupper","owner":"JanST123","description":"backup job backing up mariadb and optional github","archived":false,"fork":false,"pushed_at":"2023-10-31T06:48:14.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-03T16:53:17.573Z","etag":null,"topics":["backup","docker","ftp","github","mail","mariadb","nomad","smtp"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/JanST123.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,"publiccode":null,"codemeta":null}},"created_at":"2023-08-21T16:01:26.000Z","updated_at":"2023-08-22T13:20:27.000Z","dependencies_parsed_at":"2023-08-21T18:54:03.455Z","dependency_job_id":"157494c5-ff74-4fb4-96cc-d9d9255eab51","html_url":"https://github.com/JanST123/nomad-backupper","commit_stats":null,"previous_names":["janst123/nomad-backupper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanST123%2Fnomad-backupper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanST123%2Fnomad-backupper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanST123%2Fnomad-backupper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanST123%2Fnomad-backupper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JanST123","download_url":"https://codeload.github.com/JanST123/nomad-backupper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240229976,"owners_count":19768597,"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","docker","ftp","github","mail","mariadb","nomad","smtp"],"created_at":"2024-11-09T07:49:11.442Z","updated_at":"2026-04-09T16:10:23.273Z","avatar_url":"https://github.com/JanST123.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nomad backupper\n\nThis can be installed as a periodic nomad job and will backup your MariaDB Databases and optionally your GitHub repositories to an FTP Server. It's mainly for my personal use case but can of course be adapted to yours.\nIt corresponds perfectly with my [gridscale nomad single-cluser setup](https://github.com/JanST123/nomad-gridscale).\n\n## Features\n🚀 perdiodically dumps all your **MariaDB databases** and backups them to an FTP\n\n🚀 optionally also dumps all your **GitHub repos** and backups them to the FTP within the same run (using [ghbackup](https://github.com/qvl/ghbackup))\n\n🚀 optionally sends you a **status mail** after the backup is done, telling you if everything was okay or something went wrong\n\n🚀 rotates the backups on a 2-day basis (so you backups from 2 days)\n\n🚀 configurable with nomad variables\n\n\n## MariaDB Backup\n\nThe MariaDB backup is not optional. It uses nomad *service discovery* and assumes the MariaDB database service in your nomad cluster is named `mariadb-server`. If you want to customize that edit the `job.hcl` file.\nIt will dump all databases (using `mariadb-dump --all-databases`)\n\n## GitHub backup\nIf you set the `github_token` variable the container will also run [ghbackup](https://github.com/qvl/ghbackup)) on your GitHub Account, cloning and packing all your repos and also adds them to the FTP backup. If you also provide `github_account` variable it will only backup the repos from this account (otherwise it will backup **all repos** you have access to).\n\nThe token can be generated in the [Developer Settings](https://github.com/settings/tokens) in your github account.\n\n## Monitoring status mail\nSet the `monitoring_email` email variable and the `smtp_*` variables and you will receive a status mail after each backup run. It will tell if the backup run was fine or not.\n\nIt will warn if\n* The size of the new backup differs more than 5% to the last backup (remember we backup 2 days)\n* No two backup files were found on the FTP (fine for the first run of course)\n* The backup is too old (e.g. no new backup was uploaded)\n\n## Install on nomad\n\nRun the following command with the environment variables\n```sh\nnomad job run \n  -var mariadb_root_pw=\u003cMARIADB ROOT PASSWORD\u003e \n  -var ftp_host=\"\u003cHOST OF YOUR BACKUP FTP\u003e\" \n  -var ftp_user=\"\u003cUSER FOR THE BACKUP FTP\u003e\" \n  -var ftp_pass=\"\u003cPASSWORD FOR THE BACKUP FTP\u003e\"\n  -var ftp_dir=\"\u003cPATH ON THE FTP SERVER\u003e\"\n  -var github_token=\u003cOPTIONAL YOUR GITHUB TOKEN IF GITHUB SHOULD BE BACKED UP TOO\u003e\n  -var github_account=\u003cOPTIONAL YOUR GITHUB ACCOUNT NAME IF ONLY THIS REPOS SHOULD BE BACKED UP\u003e\n  -var monitoring_email=\u003cOPTIONAL YOUR EMAIL ADDRESS TO RECEIVE BACKUP STATUS MAILS\u003e\n  -var smtp_host=\u003cHOSTNAME OF SMTP SERVER YOU OWN OR RENTED TO SEND BACKUP STATUS MAIL FROM\u003e\n  -var smtp_user=\u003cUSER OF SMTP SERVER YOU OWN OR RENTED TO SEND BACKUP STATUS MAIL FROM\u003e\n  -var smtp_pass=\u003cPASSWORD OF SMTP SERVER YOU OWN OR RENTED TO SEND BACKUP STATUS MAIL FROM\u003e\n  job.hcl\n```\n\n**If you want to edit when the periodic job is run** edit the `perdiodic.cron` in the `job.hcl` file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanst123%2Fnomad-backupper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanst123%2Fnomad-backupper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanst123%2Fnomad-backupper/lists"}