A cli tool that allows you to backup all your GitHub or GitLab repos onto your local machine, and even upload them to a different repo manager!
A quick guide on how to install the tool.
brew tap tempor1s/gobackup
brew install gobackup
Before you get started, you are going to need either a GitHub personal access token, or a GitLab personal access token. For example, if you want to clone your GitHub public repos and upload them to GitLab, you are going to need a GitLab personal access token. if you want to clone ALL your repos on GitHub and upload them to gitlab, you are going to need a personal access token for both of them.
- GitHub Personal Access Token You can create a GitHub token here.
- GitLab Personal Access Token You can create a GitLab token here.
# clone all the repos to your local machine. --token is optional, but you need it to clone private repositories - token is not required
gobackup download <platform> <username> --token=123abc
# once you have your repos cloned to your local machine, you can either upload them to GitHub or GitLab - in this case a token is required
gobackup upload <platform> <directory> --token=123abc
Thats it! All your repos should now be backed to your chosen platform, and you can delete the local copy if you want to :)
- Clone a single repository to your computer through CLI.
- Clone multiple repositories to local computer
- Clone multiple reposiories using concurrency
- Add support for cloning GitLab repos
- Upload cloned repositories to GitLab
- Do the above concurrently
- Do the reverse, upload cloned repositories to GitHub
- Do the above concurrently
- Deployment!
- Add backup command that will download the repo to memory (or disk I guess) and then instant upload it to new platform of choice (combining upload/download)
- Respect the privacy status of a cloned repo when we upload it again
- Set up Cron Job to periodically backup new repos / changes to old repos to local / other service like GitLab