https://github.com/whywaita/grasshopper
hopping file to GitHub
https://github.com/whywaita/grasshopper
Last synced: about 1 year ago
JSON representation
hopping file to GitHub
- Host: GitHub
- URL: https://github.com/whywaita/grasshopper
- Owner: whywaita
- Created: 2019-08-08T04:40:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-02T04:26:28.000Z (over 6 years ago)
- Last Synced: 2024-05-02T01:50:42.905Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GrassHopper
very simply backup solution. GitHub as backend!
## Usage
- Execute binary
```shell script
$ grasshopper you-want-to-backup-file
```
- Automatic `git commit` and `git push`
- You can view backup file on GitHub!
## Configuration
### Embedded binary (Recommend)
- Get GitHub Personal token
- ref: https://github.blog/2013-05-16-personal-api-tokens/
- build binary with embedded value
- Be handle binaries carefully, do not publish!
```shell script
// change me to oneline
$ go build . -o grasshopper -ldflags '-X main.DefaultGitHubRepository=
-X main.DefaultGitHubUser=
-X main.DefaultGitHubToken= '
$ mv grasshopper /your/binary/path/
```
- Execute!
```shell script
$ grasshopper you-want-to-backup-file
# or
$ grasshopper /etc/you-want-to-backup-file
```
### Environment value
You can set to config by Environment value.
- `GH_GITHUB_REPO`
- `GH_GITHUB_USER`
- `GH_GITHUB_TOKEN`