Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
andrenarchy committed Feb 1, 2017
1 parent 458cfd5 commit abe4f66
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
# gs-backup
Google Cloud storage encrypted backup
Encrypt a file and upload it to Google Cloud storage.

## Required environment variables

* `BACKUP_FILE`: path to a file that should be uploaded.
* `BACKUP_BUCKET`: bucket url like gs://awesome-backups
* `BACKUP_PGP_KEY`: path to public key, defaults to /pubkey.asc

## Volumes

* `/scratch`: temporary storage
* `/.config`: gcloud config

## Usage

Authenticate with service account (if the `/.config` volume is permanent this only needs to be done once):
```
docker run -i --rm \
-v /PATH/TO/gcloud-config/:/.config \
-v /PATH/TO/:/key.json \
gs-backup \
gcloud auth activate-service-account --key-file=/key.json
```

Run:
```
docker run -i --rm \
-v /PATH/TO/gcloud-config/:/.config \
-v /PATH/TO/paperhive-backups.pub.asc:/pubkey.asc \
-v /PATH/TO/data:/data \
-e BACKUP_FILE=/data/file \
-e BACKUP_BUCKET=gs://awesome-backups \
gs-backup
```

0 comments on commit abe4f66

Please sign in to comment.