best-github-backup
v2.0.2
Published
the best GitHub backup program (trust me bro)
Downloads
90
Readme
Best GitHub Backup
this is the best GitHub backup program. it does not suck, and here is why:
- robust and resilient implementation
- network failed in the middle of the operation? computer went to sleep? no problem. it will pick up where it left off when you run it again
- no more worrying about having to start the entire process over again 🙊
- network failed in the middle of the operation? computer went to sleep? no problem. it will pick up where it left off when you run it again
- flat file database
- all records are MessagePack files
- if you're feeling adventurous you can
JSON.stringify()
the entire database 🙈- go on. do it.
- efficient use of the GitHub API
- makes as few requests as possible
- only fetches new data since the last successful run
- it won't miss anything if there was a failure at any point. checkpoints get updated on a per-repo, per-type basis and only after all records were successfully saved
- only fetches the important stuff
- if it's not included, you don't need it. probably. 🙉
Install
npm i -g best-github-backup
Use
you'll need a GitHub API token with at least repo
and read:org
scopes 🔭
BEST-GITHUB-BACKUP(1) General Commands Manual BEST-GITHUB-BACKUP(1)
NAME
best-github-backup - the best GitHub backup program (trust me bro)
SYNOPSIS
best-github-backup -t token -o organization [-afgv] [-d daysThreshold]
[-e repo1,repo2,...]
best-github-backup --help
best-github-backup --version
(See the OPTIONS section for alternate option syntax with long option
names.)
DESCRIPTION
Takes a backup for a given GitHub organization of all repositories that
the provided token can access.
It will run in one of two modes:
1. Backup mode (default), where information is pulled from GitHub, or
2. Archive mode (option -a), where compressed files are created for
backups that have been taken already with backup mode.
OPTIONS
-a, --archive
Create compressed files for archiving.
-d daysThreshold, --days daysThreshold
Skip backup for repos that have been successfully backed up within
the last daysThreshold days.
-e repo1,repo2,..., --exclude repo1,repo2,...
Exclude specified repos from backup.
Note: this option is ignored in archive mode (option -a).
Archive mode will process whatever exists from the previously taken
backup(s). If you want to exclude anything from the archive, it
must have been excluded from all backups. If you are uncertain, you
should delete the data folder (data/orgName) and take a new backup
with the exclude option.
-f, --force
Force update GitHub content. (By default, we only query for new
content since the last successful backup was taken.)
-g, --git
Clone (or update existing clone of) git repos.
-h, --help
🆘 HELP!
-o org, --org org
GitHub organization to backup.
-t token, --token token
GitHub token to use for authentication.
-v, --verbose
Verbose logging.
--version
Show version.
EXAMPLES
best-github-backup -t token -o organization
Backup an organization.
best-github-backup -t token -o organization -a
Create compressed files for archiving.
best-github-backup -t token -o organization -g
Backup an organization, including git repositories.
best-github-backup -t token -o organization -ag
Create compressed files for archiving, including git repositories.
best-github-backup -t token -o organization -g -e repo1,repo2,...
Backup an organization, including git repositories, but excluding
some repositories.