{"id":20838010,"url":"https://github.com/fusonic/git-backup","last_synced_at":"2025-07-21T17:31:49.830Z","repository":{"id":66295117,"uuid":"100040127","full_name":"fusonic/git-backup","owner":"fusonic","description":"Fusonic-Git-Backup is a dotnet core based tool to backup your github, gitlab and bitbucket  repositories in one run.","archived":false,"fork":false,"pushed_at":"2021-11-29T15:00:32.000Z","size":44,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-18T06:54:49.358Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/fusonic.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,"zenodo":null}},"created_at":"2017-08-11T14:27:57.000Z","updated_at":"2024-11-23T19:24:39.000Z","dependencies_parsed_at":"2023-02-25T23:00:12.491Z","dependency_job_id":null,"html_url":"https://github.com/fusonic/git-backup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fusonic/git-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusonic%2Fgit-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusonic%2Fgit-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusonic%2Fgit-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusonic%2Fgit-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fusonic","download_url":"https://codeload.github.com/fusonic/git-backup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusonic%2Fgit-backup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266342809,"owners_count":23914262,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-18T01:09:10.101Z","updated_at":"2025-07-21T17:31:49.803Z","avatar_url":"https://github.com/fusonic.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fusonic-Git-Backup\n\n## What is Fusonic-Git-Backup?\nFusonic-Git-Backup is a dotnet core based tool to backup your github, gitlab and bitbucket \nrepositories in one run.\n\n## Features\n* Full Docker support\n* Email notification in error case\n* Configure the tool individually in the app-settings.json\n* Backup your repos with \"git clone --mirror\" to ensure the full backup of the repos with all branches\n* Rebuild a fully functional repository from your backup with a simple \"git clone\"\n* Automaticaly builds a clear backup folder structure for you. (date/org/repopath/files)\n\n## Setup\n### Config File\nIf you want to run the tool inside the docker container, set the \"Destination\" to \"/app/GitBackup\". \nIn the projects root folder you can find the app-settings.json to setup the tool for your needs. \nEnter the following user specific information and replace the placeholders to execute the tool properly:\n\n    {\n      \"Git\": [\n        {\n          \"Type\": \"Bitbucket\",\n          \"Username\": \"Bituser123\",\n          \"PersonalAccessToken\": \"YourPrivateAccessToken\"\n        },\n        {\n          \"Type\": \"Github\",\n          \"Username\": \"Bituser123\",\n          \"PersonalAccessToken\": \"YourPrivateAccessToken\"\n        },\n        {\n          \"Type\": \"Gitlab\",\n          \"Username\": \"YourUser1\",\n          \"PersonalAccessToken\": \"YourPrivateAccessToken\"\n        },\n        {\n          \"Type\": \"Gitlab\",\n          \"Username\": \"YourUser2\",\n          \"PersonalAccessToken\": \"YourPrivateAccessToken\"\n        }\n      ],\n      \"Backup\": {\n        \"Local\": {\n          \"DeleteAfterDays\": \"1\",\n          \"Destination\": \"/my/absoulte/path/to/backup/directory\"\n        }\n      },\n      \"Mail\": {\n        \"Host\": \"mailhoster.net\",\n        \"Port\": \"25\",\n        \"Username\": \"your.email@mail.com\",\n        \"Password\": \"yourpassword\",\n        \"UseSsl\": \"false\",\n        \"Sender\": {\n          \"Address\": \"your.email@mail.com\",\n          \"Name\": \"Max Musterman\"\n        },\n        \"Receiver\": {\n          \"Address\": \"Receiver.email@mail.com\",\n          \"Name\": \"Manuel Musterman\"\n        }\n      },\n      \"DeadmanssnitchUrl\": \"You can delete this if you dont use a dead man snitch\"\n    }\n\n* Git: In this section you can configure your Gitlab, Github and Bitbucket account. If you dont \nneed one or two of the connections, simply remove them from the config. You can configure as many\nusers as you want.\n    * Type: Enter the type of your Account here. It should be either \"Bitbucket\", \"Github\" or \n    \"Gitlab\".\n    * Username: Enter the username of your account here. You can find your username in your user \n    settings on each platform.\n    * PersonalAccessToken: On each platform the \"PersonalAccessToken\" is named differently. \n    You need the generate a \"PersonalAccessToken\" for each platform to establish a connection \n    with the Git-Api and to grant the right permissions to your backup account. Generate your \n    passwords on their websites. Read permissions for repos should be enough.\n        * Bitbucket: Go to \"user settings -\u003e App password\" to generate your password.\n        * Gitlab: Go to \"user settings -\u003e Access Tokens\" to generate a token. Watch out for \n        the expire date. Gitlab is the only platform that lets the token expire after a given \n        time. Renew your token when your token expires. You can select the date by your own.\n        * Github: Go to \"user settings -\u003e Personal access tokens\" to generate a token.\n    * Backup: Here you can configure you backup settings.\n        * Local: Configure to store your backups directly on your machine.\n            * DeleteAfterDays: Tells after how many days an old backup should be deleted \n            automaticaly.\n            * Destination: The path to the folder where the backups should be stored. If you use Docker, \n            this sould be set to /app/GitBackup\n    * Mail: Setup the Mailserver to send messages in error case. Get all the informations about \n    your mail settings from your mail server provider. For example see the gmail settings: \n    https://support.google.com/a/answer/176600?hl=en\n        * Host: The address, IP or Url, to you mail server host.\n        * Port: The prefered port.\n        * Username: On gmail for example, its your email address\n        * Password: The password of your email account\n        * UseSsl: Tells if you want to use a ssh connection (needed if you use port 465)\n        * Sender: Information about the sender of the emails:\n            * Address: Address of the sender\n            * Name: Name of the sender\n        * Receiver: Information about the Receiver of the emails:\n            * Address: Address of the Receiver\n            * Name: Name of the Receiver\n* DeadmanssnitchUrl: Paste your uri to your deadmansnitch here to call it whenever the backup succeeds.\n\n## Run GitBackup locally\nTo run your tool localy you need to follow three steps:\n\n### Install dotnet and git\nInstall dotnet and git on your machine to run your tool.\n\n### Execute the tool\nNow after configuring ssh, the app-settings.json and a dotnet environment you are all done and \ncan try out the tool by running the following command in the commandline in your tools directory\n\n    \u003e cd /path/to/tool\n    \u003e dotnet run\n    \nYou can either use the run command to run it or create a release folder to directly execute your\ncompiled dll file. This will store your dll's in the out folder.\n\n    \u003e cd /path/to/tool\n    \u003e dotnet publish git-backup.sln -c Release -o out\n\n### Local Cron-Job\nTo run your backup tool as often as you want, install a cronjob, that executes dotnet run or your\ncompiled dll file. With your dll file it will look something like this:\n\n    @midnight dotnet /path/to/tool/out/fusonic-git-backup.dll\n    \n## Run GitBackup with Docker\nYou can build the docker image on you own but the fastest way to run your tool with docker is to \ndownload the already built image from the Git repository and execute the downloaded docker image \nas follows:\n\n\tdocker run --rm -v /ABSOLUTE/PATH/TO/BACKUP/DEST:/backup -v /ABSOLUTE/PATH/TO/YOUR/CUSTOMCONFIG/config.json:/app/app-settings.json fusonic/git-backup:latest\n\n* /ABSOLUTEPATH/TO/BACKUP/DEST =\u003e Set your absolute path to the destination path on your real machine here. This path \nwill be mounted to the /app/GitBackup witch is the working path of the tool inside the docker container.\n* /ABSOLUTE/PATH/TO/YOUR/CUSTOMCONFIG =\u003e You need to mount your app-settings.json to tell the file what it has\nto do.\n\n### Docker cron job\nTo execute the tool and create backups after regular time spans, implement a cron job with the docker run comand from above.\n\n## Restore a Backup\nTo restore a backup in a new repo simply clone the git repo from the backup location.\n\n## Deadman Snitch\nConfigure a Deaman Snitch to ensure your backup program is running as expected. The Deadman Snitch will wait for a life signal in a configurable period of time.\nThe tool will send a request to satisfy the Snitch whenever it gets executed successfully. If the tool fails it can not send a request to satisfy the Snitch in the configured \ntime period and the snitch will send you an email with an error alert. For example this can be useful if the full server shuts down and you wont get any other error messages, \nsince the tool will not even execute.\n\n## FAQ\n### How often does the projects create backups?\nRun the tool every day to get a daily backup, or as often as you want. For example with a cron-job.\nThe program will create a full backup, each time it gets executed.\n\n### How do I know if a buckup failed?\nIf a backup fails, an email will be sent to the address configured in the app-settings.json file.\nThe email includes the full exception message of the error to serve you all the information you need\nto debug the tool.\n\n--------------- Happy backuping! ---------------","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusonic%2Fgit-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffusonic%2Fgit-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusonic%2Fgit-backup/lists"}