user3013325
user3013325

Reputation: 221

Is there a way to use AWS S3 to backup all GIT repositories?

I am currently working on a project where I need to backup all our Git projects/repos. We are working with AWS, so I am wondering if S3 could be used. Can this be done? Google searches only provide half and answer and technique as to how to.

Upvotes: 4

Views: 7333

Answers (4)

kraken
kraken

Reputation: 31

There is a very simple to use python tool that automatically backs up organisations' repositories in .zip format by saving public and private repositories and all their branches. It works with the Github API, if you have python on your AWS instance, the tool will be very useful : https://github.com/BuyWithCrypto/OneGitBackup

Upvotes: 1

cbilliau
cbilliau

Reputation: 1136

I found this tool specifically for git to s3 backups.

github-backup-to-s3 A tool to backup all your github repos to a aws s3 bucket. It can optionally backup just an organisation's repositories.

https://github.com/madsleejensen/github-backup-aws-s3#github-backup-to-s3

Upvotes: 1

Rodrigo Murillo
Rodrigo Murillo

Reputation: 13640

You can script a backup solution in any language, and then schedule the task on an EC2 instance.

The task would:

  1. Clone the repo locally
  2. Tar/zip the repo
  3. Copy to an S3 bucket.

Here is an example: https://gist.github.com/philippb/1988919

Upvotes: 1

mostafazh
mostafazh

Reputation: 4215

I'd suggest you checkout AWS CodeCommit (a new-ish service by AWS to host your Git repositories). It's not as full-fledged as say Github or GitLab but they keep adding new features over time.

Upvotes: 1

Related Questions