Skip to content

Commit 75e6f56

Browse files
committed
docs: add "Restoring from Backup" section to README
Clarifies that this tool is backup-only with no inbuilt restore. Documents that git repos can be pushed back, but issues/PRs have GitHub API limitations affecting all backup tools. Closes #246
1 parent b991c36 commit 75e6f56

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,25 @@ Debug an error/block or incomplete backup into a temporary directory. Omit "incr
360360
github-backup -f $FINE_ACCESS_TOKEN -o /tmp/github-backup/ -l debug -P --all-starred --starred --watched --followers --following --issues --issue-comments --issue-events --pulls --pull-comments --pull-commits --labels --milestones --repositories --wikis --releases --assets --pull-details --gists --starred-gists $GH_USER
361361

362362

363+
Restoring from Backup
364+
=====================
365+
366+
This tool creates backups only, there is no inbuilt restore command.
367+
368+
**Git repositories, wikis, and gists** can be restored by pushing them back to GitHub as you would any git repository. For example, to restore a bare repository backup::
369+
370+
cd /tmp/white-house/repositories/petitions/repository
371+
git push --mirror [email protected]:WhiteHouse/petitions.git
372+
373+
**Issues, pull requests, comments, and other metadata** are saved as JSON files for archival purposes. The GitHub API does not support recreating this data faithfully, creating issues via the API has limitations:
374+
375+
- New issue/PR numbers are assigned (original numbers cannot be set)
376+
- Timestamps reflect creation time (original dates cannot be set)
377+
- The API caller becomes the author (original authors cannot be set)
378+
- Cross-references between issues and PRs will break
379+
380+
These are GitHub API limitations that affect all backup and migration tools, not just this one. Recreating issues with these limitations via the GitHub API is an exercise for the reader. The JSON backups remain useful for searching, auditing, or manual reference.
381+
363382

364383
Development
365384
===========

0 commit comments

Comments
 (0)