Skip to content

Commit

Permalink
Bump version to 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
whereisaaron committed Feb 9, 2017
1 parent 824b41a commit 7a11892
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ for an example deployment.

Back up a files using `tar` in a container. It assumes `bash`, `tar`, and `gzip` is available.
```
kubectl run --attach --rm --retart=Never kube-backup --image whereisaaron/kube-backup:0.1.2 -- \
kubectl run --attach --rm --retart=Never kube-backup --image whereisaaron/kube-backup:0.1.3 -- \
--task=backup-files-exec --namespace=default --pod=my-pod --container=website --files-path=/var/www
```

Back up a database using `mysqldump` run in the MySQL container. It assumes the environment variables
based on the [offical MySQL container images](https://hub.docker.com/_/mysql/) and that `gzip` is available.
```
kubectl run --attach --rm --restart=Never kube-backup --image whereisaaron/kube-backup:0.1.2 -- \
kubectl run --attach --rm --restart=Never kube-backup --image whereisaaron/kube-backup:0.1.3 -- \
--task=backup-mysql-exec --namespace=default --pod=my-pod --container=mysql
```

You could also schedule a backup to run daily.
```
kubectl run --schedule='@daily' --retart=Never kube-backup --image whereisaaron/kube-backup:0.1.2 -- \
kubectl run --schedule='@daily' --retart=Never kube-backup --image whereisaaron/kube-backup:0.1.3 -- \
--task=backup-files-exec --namespace=default --pod=my-pod --container=website --files-path=/var/www
```

Expand Down Expand Up @@ -86,7 +86,7 @@ run_name () {
}
#EXTRA_OPTS='--dry-run'
CMD='kubectl run --attach --restart=Never --rm --image=whereisaaron/kube-backup:0.1.2 --namespace=kube-backup'
CMD='kubectl run --attach --restart=Never --rm --image=whereisaaron/kube-backup:0.1.3 --namespace=kube-backup'
$CMD $(run_name) -- $EXTRA_OPTS \
--task=backup-mysql-exec \
Expand Down Expand Up @@ -122,7 +122,7 @@ function Run-Name () {
#$ExtraOpts = '--dry-run'
# The '--attach --rm' allows us to block until completion, you could remove that not wait for completion
$Command = 'kubectl run --attach --rm --quiet --restart=Never --image=whereisaaron/kube-backup:0.1.2 --namespace=kube-backup'
$Command = 'kubectl run --attach --rm --quiet --restart=Never --image=whereisaaron/kube-backup:0.1.3 --namespace=kube-backup'
Invoke-Expression "$Command $(Run-Name) -- $ExtraOpts --task=backup-mysql-exec --timestamp=$Timestamp --namespace=default '--selector=app=myapp,env=dev,component=mysql'"
if ($LASTEXITCODE -ne 0) { Exit $LASTEXITCODE }
Expand Down Expand Up @@ -154,7 +154,7 @@ spec:
- --selector=app=my-app,env=dev,component=website
- --files-path=/var/www/assets
- --backup-name=assets
image: whereisaaron/kube-backup:0.1.2
image: whereisaaron/kube-backup:0.1.3
name: kb-task
restartPolicy: Never
```
4 changes: 2 additions & 2 deletions doc/backup-website-and-mysql.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ function Run-Name () {
#$ExtraOpts = '--dry-run'

# The '--attach --rm' allows us to block until completion, you could remove that not wait for completion
$Command = 'kubectl run --attach --rm --quiet --restart=Never --image=whereisaaron/kube-backup:0.1.2 --namespace=kube-backup'
$Command = 'kubectl run --attach --rm --quiet --restart=Never --image=whereisaaron/kube-backup:0.1.3 --namespace=kube-backup'

Invoke-Expression "$Command $(Run-Name) -- $ExtraOpts --task=backup-mysql-exec --timestamp=$Timestamp --namespace=default '--selector=app=myapp,env=dev,component=mysql'"
if ($LASTEXITCODE -ne 0) { Exit $LASTEXITCODE }

Invoke-Expression "$Command $(Run-Name) -- $ExtraOpts --task=backup-files-exec --timestamp=$Timestamp --namespace=default '--selector=app=myapp,env=dev,component=website' --files-path=/var/www/assets --backup-name=assets"
if ($LASTEXITCODE -ne 0) { Exit $LASTEXITCODE }
if ($LASTEXITCODE -ne 0) { Exit $LASTEXITCODE }
2 changes: 1 addition & 1 deletion doc/backup-website-and-mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ run_name () {
#EXTRA_OPTS='--dry-run'

# The '--attach --rm' allows us to block until completion, you could remove that not wait for completion
CMD='kubectl run --attach --rm --quiet --restart=Never --image=whereisaaron/kube-backup:0.1.2 --namespace=kube-backup'
CMD='kubectl run --attach --rm --quiet --restart=Never --image=whereisaaron/kube-backup:0.1.3 --namespace=kube-backup'

$CMD $(run_name) -- $EXTRA_OPTS \
--task=backup-mysql-exec \
Expand Down
2 changes: 1 addition & 1 deletion doc/backup-website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ spec:
- --selector=app=my-app,env=dev,component=website
- --files-path=/var/www/assets
- --backup-name=assets
image: whereisaaron/kube-backup:0.1.2
image: whereisaaron/kube-backup:0.1.3
name: kb-task
restartPolicy: Never

0 comments on commit 7a11892

Please sign in to comment.