{"id":22477595,"url":"https://github.com/canardconfit/backup-git","last_synced_at":"2026-04-13T23:32:02.406Z","repository":{"id":225410134,"uuid":"765634612","full_name":"CanardConfit/backup-git","owner":"CanardConfit","description":"Automated Git repository backup solution with Alpine Linux and Docker.","archived":false,"fork":false,"pushed_at":"2024-03-10T00:25:40.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T17:49:34.197Z","etag":null,"topics":["backup","backup-script","docker","docker-compose","git"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/repository/docker/canardconfit/backup-git/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CanardConfit.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":"2024-03-01T10:09:21.000Z","updated_at":"2024-03-01T22:55:28.000Z","dependencies_parsed_at":"2024-03-01T23:29:44.843Z","dependency_job_id":"3cbf04bb-4978-4217-8f4b-67651fab4413","html_url":"https://github.com/CanardConfit/backup-git","commit_stats":null,"previous_names":["canardconfit/backup-git"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/CanardConfit/backup-git","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CanardConfit%2Fbackup-git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CanardConfit%2Fbackup-git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CanardConfit%2Fbackup-git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CanardConfit%2Fbackup-git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CanardConfit","download_url":"https://codeload.github.com/CanardConfit/backup-git/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CanardConfit%2Fbackup-git/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31775745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"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":["backup","backup-script","docker","docker-compose","git"],"created_at":"2024-12-06T14:11:37.297Z","updated_at":"2026-04-13T23:32:02.382Z","avatar_url":"https://github.com/CanardConfit.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Repository Backup Solution\n\n![Docker Pulls](https://img.shields.io/docker/pulls/canardconfit/backup-git)\n![GitHub Release](https://img.shields.io/github/v/release/CanardConfit/backup-git)\n![GitHub Repo stars](https://img.shields.io/github/stars/CanardConfit/backup-git)\n\nThis solution provides an automated way to back up a Git repository hosted on an Alpine Linux container. The setup involves a Docker container configured with cron jobs to perform daily backups of the specified Git repository. This README outlines the setup process, how to configure your environment, and how to use the backup solution.\n\n## Features\n\n- **Scheduled Backups**: Leverages `dcron` to schedule daily backups at midnight by default (ENV variable `CRON_SCHEDULE`).\n- **Environment Customization**: Allows configuration of source directory, commit message template, Git remote URL, and SSH private key through environment variables.\n- **SSH Key Management**: Incorporates SSH setup for Git operations to securely connect to the remote repository.\n- **Timezone Management**: Timezone configuration within the container.\n\n## Prerequisites\n\n- Docker and Docker Compose installed on your host machine.\n- Base64 encoded SSH private key for secure Git operations.\n- Access to the Git remote repository configured with the provided SSH key.\n\n## Docker Compose Configuration\n\nThe `docker-compose.yml` file facilitates the deployment of the backup solution and, for my personal use, the https://github.com/CanardConfit/livesync-bridge service. Here's an example configuration:\n\n```yaml\nservices:\n  livesync-bridge:\n    image: canardconfit/livesync-bridge\n    environment:\n      TZ: Europe/Zurich\n    volumes:\n      - /your/local/path:/livesync-bridge/dat/\n      - obsidian-volume:/livesync-bridge/obsidian/\n\n  git:\n    image: canardconfit/backup-git\n    depends_on:\n      - livesync-bridge\n    volumes:\n      - obsidian-volume:/obsidian/\n      - git-volume:/git-repo/\n    environment:\n      TZ: Europe/Zurich\n      CRON_SCHEDULE: \"0 0 * * *\"\n      SOURCE_FOLDER_PATH: \"/obsidian/\"\n      COMMIT_MESSAGE_TEMPLATE: \"Backup on CURRENT_DATE\" # CURRENT_DATE is a placeholder\n      GIT_REMOTE_URL: \"\u003cYour_remote_ssh_git_repo\u003e\"\n      SSH_PRIVATE_KEY: \"\u003cYour_Base64_Encoded_SSH_Private_Key\u003e\"\n\nvolumes:\n  obsidian-volume:\n  git-volume:\n```\n\n## Running the Backup Solution\n\nTo run the backup solution, execute:\n\n```bash\ndocker compose up -d\n```\n\nThis command starts the containers defined in `docker-compose.yml`, running the backup operations as configured.\n\n## Monitoring and Logs\n\nTo monitor backup operations, you can check the cron logs within the container:\n\n```bash\ndocker logs \u003ccontainer_name\u003e\n```\n\n## Contributions\n\nWe warmly welcome contributions to this project!\n\n## License\n\nThis project is released under MPL-2.0.\n\nThe MPL-2.0 license allows the mixing of the covered code with other code under different licenses, provided that the MPL-2.0-covered code remains governed by the MPL-2.0 terms.\n\nFor more information about the license, please refer to the [LICENSE](LICENSE) file in the root of this project or visit [Mozilla's official MPL 2.0 page](http://mozilla.org/MPL/2.0/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanardconfit%2Fbackup-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanardconfit%2Fbackup-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanardconfit%2Fbackup-git/lists"}