back-cli
v0.1.2
Published
Back up remote services from the command line.
Downloads
36
Readme
back
Back up remote services from the command line.
Install
npm i -g back-cli@latestGitHub Backups
Back up one repository:
back github ./backups --repo owner/repo --token github_pat_your_tokenBack up several repositories:
back github ./backups --repo owner/repo --repo another-owner/another-repoBack up every repository your token can access:
back github ./backups --repo "*"Back up every repository for one owner or organization:
back github ./backups --repo "owner/*"By default, repositories are cloned with git clone --mirror, zipped, and the
temporary mirror directory is removed.
GitHub Options
back github [destination] [options]| Option | Description |
| ------------------- | ----------------------------------------------------------------------------- |
| --repo owner/repo | Repository to back up. Can be repeated. Supports * and owner/* wildcards. |
| --token token | GitHub token. Required for private repositories and wildcards. |
| --dry | Check repository access without cloning. |
| --overwrite | Replace an existing backup directory or zip file. |
| --no-zip | Keep the mirror directory instead of creating a zip file. |
| --timeout seconds | Stop a clone if it runs longer than the given number of seconds. |
Config
Store a GitHub token:
back config github token github_pat_your_tokenRead whether a token is configured:
back config github tokenDevelopment
pnpm install
pnpm build
node dist/src/index.js