GitHub Backup to S3
Tags: devops, github, backup, cybersecurity
Published: 2022-12-14 14:16:56

“_Cloud computing is a better way to run your business_” These words were said by Marc Benioff (founder and CEO of Salesforce) in 2009. Many years have passed, and nowadays the world of IT services looks completely different than in those days, but this quote still hasn’t lost its relevance. Every day, each of us uses cloud services for private and business purposes. It just pays off and saves us time, as well as money.

The topic of the cloud itself, and, in particular, the cloud storage, is twice more interesting when it comes to keeping our data, e.g. backups. They usually take up a lot of space, and we should have access to them anytime, anywhere. Using cloud services in this aspect seems very beneficial.

## How is a backup done?

There is no need to explain what a backup is, everybody knows that for sure. But do we really know how it should be implemented and maintained? A backup itself is a copy of data taken and stored elsewhere, so that it may be used to restore the original data.  Here are the features a good backup should have:

- automation;
- encryption;
- versioning;
- data retention;
- recovery process;
- scalability.

Are we sure our backup includes all of that? Is every procedure up to date? Some companies write, use, and maintain their own solutions, and others rely on third-party backup tools. Each of the methods has its advantages and disadvantages. And there is no doubt, that it is important to be aware of what a good backup should be. Not only from a technical perspective but according to its compliance, as well.

The use of ready-made solutions certainly has one very important benefit – they are created by experts in their field. We focus on the development of our business, while the backup is just one type of security measure deployed in-house. In the case of third-party vendors, providing outstanding and comprehensive backup products lies at the heart of their business. So they know what and how it should be done.

## Types of storage

Apart from the topic of what a good backup is and how to do it, there is another important issue to be discussed – a storage type, because we have to store our copy somewhere. Storage should have both licensing and financial significance. There may be a situation when a location, where our data is going to be stored, is of great importance to us and, for example, we cannot (or do not want to) keep the data in country X or Y. By default GitProtect storage data will be stored within two regions for GitProtect Cloud Storage. Data can be stored in Amsterdam – the Netherlands or Washington DC – the United States.

We can, of course, use our own servers or cloud-based external services, for example, Amazon or Google.

## AWS S3

S3, or Simple Storage Service, is one of the most popular services from Amazon. It offers industry-leading scalability, data availability, security, and performance. Both individual users and large corporations use this service. One of the main advantages it provides is unlimited access to the service. We pay only for what we use, and the possibility of scaling is huge here, so we do not have to worry about limits or additional licenses.

## How to manage a backup plan in GitProtect?

Creating a backup plan is an incredibly simple task, just link our GitHub account and authorize it. Then we can easily create a new plan for selected repositories, choose items to be saved and a storage type, then define a scheduler. Of course, we can use predefined backup plans, as well. Setting up a simple, basic plan will take only a few minutes.

GitProtect is a multi-storage system that enables us to add as many storage instances as we want (according to our license type).

It allows us to store our data – locally (SMB network shares, local disk resources) – in the cloud (GitProtect Cloud, AWS S3, any public cloud compatible with S3 – Google Cloud Storage, Wasabi, Alibaba Cloud, and more).

For a start we always get GitProtect Cloud Storage for free, so we can start protecting our repositories instantly. But if we prefer to store our copies locally or in our own cloud storage – we can simply assign them.

You can do it just with a few clicks. Once we decide to create a new plan, we need to choose where to store our backup copies. It looks like this:

![Adding backup storage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ibcgzeua6aa0ta9qqwe8.png)

Then we have to choose the storage type we are interested in from the given list and provide some configuration details:


![Add S3 storage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6243mh89vh41bu08om0a.png)

And basically, that’s it. We can, of course, choose any predefined storage type for the selected plan. It all depends on our needs.

When creating or editing a backup plan, we can change or check the selected storage with two clicks.


![Create a GitHub backup on S3 plan](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ytpxnj18hbg4u42h9o4y.png)

## Conclusion

Cloud services are the current standard in IT. GitHub backup, as an integral part of our business, should also go to the cloud. And the GitProtect [GitHub backup](https://gitprotect.io/github.html) tool makes it possible for us. Easily, in just a few minutes, we can define the appropriate plan and the storage type to create a GitHub backup to S3 for all our repositories.

If you want to know more about GitHub backup, read [GitHub backup best practices](https://gitprotect.io/blog/github-backup-best-practices/).