Choose an archive for a source snapshot
Git archive exports files from a named tree, such as a selected commit. That makes it useful for packaging a source snapshot or handing someone the files associated with a release. It does not provide the same history and references as a repository backup.
Label the archive so its purpose and source revision are clear. Inspect the exported contents and document any excluded or separately stored assets. A recipient should know whether the package contains editable source, published output, or another defined subset. The backup and archive guide expands these distinctions.
Preserve history with an appropriate repository copy
Git bundles can package objects and references for offline transfer, including full or incremental repository backups. The selected references and any prerequisites determine what a bundle can restore. Verify its contents and rehearse using it in the environment where recovery would happen.
A synchronized mirror can be useful, but synchronization may also carry unwanted changes into the second copy. Define retention and independence according to the mistakes you need to recover from. Keep a recoverable earlier state when deletion or incorrect history updates are part of the risk you are addressing.
Include the data outside Git history
Inventory large-file objects, submodule repositories, release attachments, issue discussions, automation settings, databases, and user uploads. Determine which items exist in the source repository and which require separate preservation. The large files hub explains why a Git pointer and the asset it identifies are separate recovery concerns.
For a CMS or dynamic application, coordinate the source version with the necessary data and runtime configuration. The CMS and frameworks hub helps you describe those dependencies. A successful clone does not demonstrate that an entire application can be restored.
Make private access deliberate
Identify the people, build workers, deployment systems, and connected tools that can read or change the repository. Grant the access each task requires, review it when responsibilities change, and keep a practical account-recovery process. Protect backup copies with the same attention given to the primary project.
Keep real credentials outside normal source files and document settings with placeholders. If a credential is exposed, address the credential itself and investigate where it was shared. Removing a visible line cannot retract copies already obtained. The private Git server guide examines the operational side of restricted access.
Prove that recovery produces useful work
- Choose a representative saved state and a clean destination.
- Restore the required repository references and separate assets.
- Recreate configuration through the documented process.
- Run a build or another meaningful project check.
- Record what was restored, what was missing, and how the instructions changed.
Assign an owner to address any gap the rehearsal exposes. Repeat recovery checks when storage, access, or deployment changes materially. Evidence that a backup job ran is useful; evidence that the project works afterward answers a different and essential question.