Q: How to back up a GitHub repository
When backing up the data in a GitHub repository, there are a few different options. You can either manually download and store your data, you can build custom scripts to backup your data, or you can use a BaaS (backup-as-a-service) provider. These apps manage your data’s security for you by automatically running backups nightly. Data backed up with BackHub can be restored directly to your GitHub repository.
The BackHub restore app must be installed before you can restore a backup.
For restoring a backup, write permission to at least one repository is necessary. The BackHub restore app is installed separately so that you can remove the app and its permissions after the restore has been completed.
The restore app automatically creates a new repository in your GitHub account with the name given in the restore dialog and restores the full repository and it’s metadata into this repository.
Install BackHub Restore app
- Go to the GitHub App directory and start the installation.
- During the installation process, limit access to “Select repositories” and pick a random repository. (It’s not possible to choose none, unfortunately. The restore app creates a new repository, so the selected repository here isn’t affected in any way.)
- In BackHub, search for the repository to restore
- Click the panel to open the details
- In the panel footer, choose the snapshot to restore from
- Click “Restore”
5. Open your GitHub account and check the restored repository. It may take a couple of minutes up to an hour for the restore to complete, depending on the size of your repository.
Note: Do not change anything in the repository while the restore is in progress (for example, don’t create an issue or try to commit).
Click here to learn more about GitHub Backups.