•  


Backing up a repository - GitHub Docs
Skip to main content

Backing up a repository

You can use Git, a third-party tool, or the API to back up your repository.

You may want to take backups of repositories for archiving or disaster recovery purposes.

Depending on the GitHub features you use and your requirements (for example whether you need to be able to restore the backup), there are different backup options which include different data.

You may want to store your backups on an external hard drive and/or upload them to a cloud-based backup or storage service such as Azure Blob Storage , Google Drive , or Dropbox .

Backing up a Git repository with the Git CLI

A Git repository includes all of the files and folders associated with a project, along with each file's revision history. For more information, see " About Git ."

You can take a backup of a Git repository, including the revision history, by performing a mirror clone with the Git CLI.

To perform a mirror clone, use the git clone command with the --mirror option.

git 
clone
 --mirror https://github.com/EXAMPLE-USER/REPOSITORY.git

If the repository includes Git Large File Storage objects, pull in the objects. For more details on Git Large File Storage and how to install it, see " About Git Large File Storage ."

git lfs fetch --all

Once you have cloned the Git repository, you can compress it into an archive (for example a .zip or .tar.gz file) and move it to a location for safe-keeping.

You can restore your backup by decompressing the archive and then pushing the Git repository to a Git remote.

Backing up a wiki with the Git CLI

Wikis in GitHub are stored as Git repositories. This means that you can back up a wiki by cloning it. For more details on how to clone a wiki using Git, see " Adding or editing wiki pages ."

Once you have cloned the wiki, you can compress it into an archive (for example a .zip or .tar.gz file) and move it to a location for safe-keeping.

You can restore your backup by decompressing the archive and then pushing the wiki repository to a Git remote.

Backing up a Git repository and selected metadata with migration archives

You can use the REST API to generate a migration archive for a repository. For more information, see " REST API endpoints for organization migrations ."

These archives are designed for moving data between GitHub products, but they can also be used to back up a repository for archiving purposes

Warning: Migration archives do not include all data related to a repository. For example, Git Large File Storage objects, discussions, or packages are not included. For more information on what is included in migration archives, see " About migrations between GitHub products ."

Once you have generated an archive, you can move it to a location of your choice for safe-keeping.

There is no supported, documented way to restore migration archives on GitHub.com, so these backups are only suitable for archiving purposes.

Third-party backup tools

A number of self-service tools exist that automate backups of repositories. Backup tools will download data from specific repositories and organize it within a new branch or directory.

For more information about self-service backup tools, see the Backup Utilities category on GitHub Marketplace .

- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본