{"id":16519824,"url":"https://github.com/zonca/git-cron-backup-ansible","last_synced_at":"2026-05-13T19:32:41.653Z","repository":{"id":138271260,"uuid":"108533933","full_name":"zonca/git-cron-backup-ansible","owner":"zonca","description":null,"archived":false,"fork":false,"pushed_at":"2017-10-27T16:19:20.000Z","size":6,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-28T11:37:35.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zonca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-10-27T10:42:12.000Z","updated_at":"2017-10-27T12:03:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b8b5e49-6cb4-435b-be89-6a1ed3e15ffe","html_url":"https://github.com/zonca/git-cron-backup-ansible","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zonca/git-cron-backup-ansible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonca%2Fgit-cron-backup-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonca%2Fgit-cron-backup-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonca%2Fgit-cron-backup-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonca%2Fgit-cron-backup-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zonca","download_url":"https://codeload.github.com/zonca/git-cron-backup-ansible/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonca%2Fgit-cron-backup-ansible/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32997602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-11T16:48:34.827Z","updated_at":"2026-05-13T19:32:41.636Z","avatar_url":"https://github.com/zonca.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"git based cron backup\n=============\n\nGit is very convenient for backing up folders of text files, for example `/var/log`,\non many servers is just a few tens of MB.\n\nGit offers a easy way to setup a offsite incremental backup for free, accessible\nvia browser and with good search functionality.\n\nThis Ansible playbook sets up a remote Ubuntu/Debian server with a hourly cron job\nto run the backup operation and push to a remote repository.\n\n## Configure the remote server\n\n* Make sure it runs Ubuntu or Debian\n* Make sure it has Python 3 (or 2) preinstalled\n* Copy your SSH keys so that you can ssh with no need to type a password\n* Configure `sudo` to run without a password so `ansible` can become `root`\n\n## Configure your local machine\n\nInstall `ansible`, at least 2.4.0, but it might work with older versions\n\n## Configure the repository\n\nCreate a private repository for example on Github or Bitbucket. For example \u003chttps://github.com/yourusername/logbackup\u003e\nCreate a new ssh keypair with `ssh-keygen` on your local machine and add the public key as a **deploy key** in the settings,\nmake sure to grant write privileges.\n\n## Configure the playbook\n\n* Clone the repository on your local machine\n* Rename the `hosts.example` file to `hosts`\n* Configure the paramters of the server you would like to configure:\n    * `SERVERURL`\n    * `private_deploy_key=./id_rsa`, path to the **private** key you created above, it will be copied in `/root/.ssh` on the remote server\n    * `git_repository=git@github.com:GITHUBUSERNAME/logbackup`, use the SSH path\n    * `ansible_user=SSHUSERNAME`, if you remove this, it will use `ubuntu` as username\n    * `folder_to_backup=/var/log`\n\n## Run the playbook\n\nOn your local machine, from the repository root folder, run:\n\n    ansible-playbook site.yml\n\nThis will install the deploy key on root, initialize the repo in the remote folder and prepare the remote.\n\nIt will install a script in `/etc/cron.hourly` so that the backup will run regularly.\n\nFinally it will launch the first backup via `run-parts` so that we can check that it is picking up\nthe script correctly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzonca%2Fgit-cron-backup-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzonca%2Fgit-cron-backup-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzonca%2Fgit-cron-backup-ansible/lists"}