A healthy GitHub repository feels like a backup because the code is not only on your laptop. That feeling is partly right. Git stores history, and a second clone is a second copy of that history. It is also incomplete. Issues, secrets, packages, a database, and the thing you deployed are not files in that clone.

GitHub’s own backup documentation starts from the same point: the right backup depends on which GitHub features you use, and on whether you need to be able to restore it.

A mirror clone copies the Git repository

GitHub documents this command as a backup of a Git repository, including its revision history:

git clone --mirror https://github.com/example/repository.git

You can archive that clone and put it on a disk or in storage you control. Restoring it, in GitHub’s description, means decompressing the archive and pushing the repository to a Git remote.

A normal working clone also contains history, but a mirror clone is the form GitHub documents for this job because it copies the remote’s refs rather than only the branch you checked out. Either way, you have Git objects. You do not have the rest of the product.

Take the mirror on a machine that is not the only laptop that can push to the repository. A clone that lives next to the only working copy fails with that laptop.

The wiki is a second repository

GitHub stores wikis as Git repositories. The backup guide says to clone the wiki separately, archive it, and push it back when you need it. If the project knowledge is in the wiki, a mirror of the code repository does not include it.

A migration archive is not a rehearsed restore

GitHub’s REST API can generate a migration archive that includes the Git repository and selected metadata. The same page is explicit about the limit: migration archives do not include all repository data. Git Large File Storage objects, discussions, and packages are examples GitHub names. GitHub also says there is no supported, documented way to restore those archives on GitHub, so they are suitable for archiving rather than for a restore you can practice.

An archive you cannot restore on purpose is not a recovery plan. It may still be worth keeping. It is not the drill.

Even a GitHub-to-GitHub migration leaves pieces behind

GitHub Enterprise Importer moves data between GitHub products. It is a migration, not a copy you keep outside GitHub. For a repository, GitHub’s migration document says the data that moves includes the Git source and commit history, pull requests, issues, milestones, wikis excluding attachments, Actions workflow files, releases up to 10 GiB, and a defined set of repository settings.

The same document lists data that does not move. The list includes Actions secrets, variables, environments, self-hosted runners, workflow artifacts, and workflow run history. It includes Git LFS objects, packages in GitHub Packages, rulesets, discussions, audit logs, secret-scanning state, user access, and users’ signing keys. Commit signatures do not automatically stay verified, because signing keys are not migrated. Webhooks that do move have to be turned on again.

Read the current list before a migration. It is long, and it changes. The point for backups is narrower: a successful import into another GitHub account is still not a backup of the systems GitHub does not host.

The product around the repository

A software project usually also has a database, object storage, DNS, a deployment target, and environment variables. None of those are in git clone --mirror. If the database is Supabase, the independent backup guide covers what that platform includes and what you have to dump yourself.

Write an inventory with one line per system: where it runs, where a copy is stored, and the last date someone restored that copy into a separate target. The disaster recovery template is a blank form for that inventory. The recovery guide explains why the last column matters.

GitHub remains the right place for the repository. It is the wrong place to assume the whole business is safe.