Hacker News new | ask | show | jobs
Show HN: I made a simple script to backup GitHub repos (github.com)
1 points by ivanalejandro0 967 days ago
I've made a simple python script to keep a local copy (mirror) of github repositories, on the first run it will clone repos and on subsequent runs fetch the latest updates.

This only backs up git repositories, it does nothing with other GitHub data like issues/wiki/projects/etc. Only backing up the repo is good enough for my use case, at least for now. Hopefully this can be useful to someone else.

It uses the github cli tool to download your list of repos and store it locally to a json file, but you could manually write that file yourself and use the tool to sync repositories from anywhere.

I wanted to keep a backup of my repositories just in case, but I didn't really like the other tools I found out there, so I wrote a simple script to clone/fetch all my repos, and it grew a little bit from there. Now I have a little more peace of mind having my repos backed up, and even though there's more github data that this doesn't back up I thought it was worth sharing.