Skip to content

Commit

Permalink
fixed wipeOut + fixed doc (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
Md. Emruz Hossain authored and tamalsaha committed Apr 23, 2018
1 parent 6565cb3 commit 5afb9c7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 149 deletions.
29 changes: 10 additions & 19 deletions docs/guides/backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,17 @@ $ kubectl get repository -l workload-name=stash-demo
NAME AGE
deployment.stash-demo 3m
```
`Restic` will take backup of the volume periodically with a 1-minute interval. You can verify that backup is taking successfully by,

Now, wait a few minutes so that restic can take a backup of the `/source/data` folder. To confirm, check the `status.backupCount` of `deployment.stash-demo` Repository CRD.
```console
$ kubectl get snapshots -l repository=deployment.stash-demo
NAME AGE
deployment.stash-demo-c1014ca6 10s
```

Here, `deployment.stash-demo-c1014ca6` represents the name of the successful backup [Snapshot](/docs/concepts/crds/snapshot.md) taken by Stash in `deployment.stash-demo` repository.

You can also check the `status.backupCount` of `deployment.stash-demo` Repository CRD to see number of successful backup taken in this repository.

```console
$ kubectl get repository deployment.stash-demo -o yaml
Expand Down Expand Up @@ -324,24 +333,6 @@ status:
lastBackupTime: 2018-03-29T08:29:10Z
```

You can also exec into the `busybox` Deployment to check list of snapshots.

```console
$ kubectl get pods -l app=stash-demo
NAME READY STATUS RESTARTS AGE
stash-demo-79554ff97b-wsdx2 2/2 Running 0 3m
$ kubectl exec -it stash-demo-79554ff97b-wsdx2 -c stash sh
/ # export RESTIC_REPOSITORY=/safe/data/Deployment/stash-demo
/ # export RESTIC_PASSWORD=changeit
/ # restic snapshots
password is correct
ID Date Host Tags Directory
----------------------------------------------------------------------
139fa21e 2018-03-29 08:29:42 stash-demo /source/data
----------------------------------------------------------------------
```

## Disable Backup
To stop Restic from taking backup, you can do following things:

Expand Down
37 changes: 5 additions & 32 deletions docs/guides/gke.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,40 +164,13 @@ deployment.stash-demo 1m

`Restic` will take backup of the volume periodically with a 1-minute interval. You can verify that backup is taking successfully by,

```console
$ kubectl get repository deployment.stash-demo -o yaml
```

```yaml
apiVersion: stash.appscode.com/v1alpha1
kind: Repository
metadata:
clusterName: ""
creationTimestamp: 2018-04-12T04:40:02Z
generation: 0
labels:
restic: gcs-restic
workload-kind: Deployment
workload-name: stash-demo
name: deployment.stash-demo
namespace: default
resourceVersion: "5163"
selfLink: /apis/stash.appscode.com/v1alpha1/namespaces/default/repositories/deployment.stash-demo
uid: 90482512-3e0b-11e8-951b-42010a80002e
spec:
backend:
gcs:
bucket: stash-backup-repo
prefix: demo/deployment/stash-demo
storageSecretName: gcs-secret
status:
backupCount: 2
firstBackupTime: 2018-04-12T04:41:03Z
lastBackupDuration: 4.245593432s
lastBackupTime: 2018-04-12T04:42:03Z
```console
$ kubectl get snapshots -l repository=deployment.stash-demo
NAME AGE
deployment.stash-demo-c1014ca6 10s
```

Look at the `status` field. `backupCount` show number of successful backup taken in this `Repository`.
Here, `deployment.stash-demo-c1014ca6` represents the name of the successful backup [Snapshot](/docs/concepts/crds/snapshot.md) taken by Stash in `deployment.stash-demo` repository.

## Recover to GCE Persistent Disk
Now, we will recover the backed up data into GCE persistent disk. First create a GCE disk named `stash-recovered` from [Google cloud console](https://console.cloud.google.com/compute/disks). Then create `Recovery` crd,
Expand Down
36 changes: 4 additions & 32 deletions docs/guides/minio_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,40 +411,12 @@ deployment.stash-demo 1m
`Restic` will take backup of the volume periodically with a 1-minute interval. You can verify that backup is taking successfully by,

```console
$ kubectl get repository deployment.stash-demo -o yaml
$ kubectl get snapshots -l repository=deployment.stash-demo
NAME AGE
deployment.stash-demo-c1014ca6 10s
```

```yaml
apiVersion: stash.appscode.com/v1alpha1
kind: Repository
metadata:
clusterName: ""
creationTimestamp: 2018-04-12T04:40:02Z
generation: 0
labels:
restic: minio-restic
workload-kind: Deployment
workload-name: stash-demo
name: deployment.stash-demo
namespace: default
resourceVersion: "5163"
selfLink: /apis/stash.appscode.com/v1alpha1/namespaces/default/repositories/deployment.stash-demo
uid: 90482512-3e0b-11e8-951b-42010a80002e
spec:
backend:
s3:
bucket: stash-qa
endpoint: https://minio-service.default.svc
prefix: demo
storageSecretName: minio-restic-secret
status:
backupCount: 2
firstBackupTime: 2018-04-12T04:41:03Z
lastBackupDuration: 4.245593432s
lastBackupTime: 2018-04-12T04:42:03Z
```

Look at the `status` field. `backupCount` show number of successful backup taken in this `Repository`.
Here, `deployment.stash-demo-c1014ca6` represents the name of the successful backup [Snapshot](/docs/concepts/crds/snapshot.md) taken by Stash in `deployment.stash-demo` repository.

## Recovery

Expand Down
37 changes: 4 additions & 33 deletions docs/guides/offline_backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,41 +284,12 @@ deployment.stash-demo 1m
`Restic` will take backup of the volume periodically with a 1-minute interval. You can verify that backup is taking successfully by,

```console
$ kubectl get repository deployment.stash-demo -o yaml
$ kubectl get snapshots -l repository=deployment.stash-demo
NAME AGE
deployment.stash-demo-c1014ca6 10s
```

```yaml
apiVersion: stash.appscode.com/v1alpha1
kind: Repository
metadata:
clusterName: ""
creationTimestamp: 2017-12-04T10:06:18Z
generation: 0
labels:
restic: stash-demo
workload-kind: Deployment
workload-name: stash-demo
name: deployment.stash-demo
namespace: default
resourceVersion: "5163"
selfLink: /apis/stash.appscode.com/v1alpha1/namespaces/default/repositories/deployment.stash-demo
uid: 90482512-3e0b-11e8-951b-42010a80002e
spec:
backend:
local:
mountPath: /safe/data
volumeSource:
hostPath:
path: /data/stash-test/restic-repo
storageSecretName: stash-demo
status:
backupCount: 2
firstBackupTime: 2017-12-04T10:06:23Z
lastBackupDuration: 4.245593432s
lastBackupTime: 2017-12-04T10:06:23Z
```

Look at the `status` field. `backupCount` show number of successful backup taken in this `Repository`.
Here, `deployment.stash-demo-c1014ca6` represents the name of the successful backup [Snapshot](/docs/concepts/crds/snapshot.md) taken by Stash in `deployment.stash-demo` repository.

Stash operator also creates a cron job to periodically delete workload pods according to `spec.schedule`. Please note that Kubernetes cron jobs [do not support timezone](https://github.com/kubernetes/kubernetes/issues/47202).

Expand Down
38 changes: 5 additions & 33 deletions docs/guides/rook.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,41 +165,13 @@ deployment.stash-demo 1m

`Restic` will take backup of the volume periodically with a 1-minute interval. You can verify that backup is taking successfully by,

```console
$ kubectl get repository deployment.stash-demo -o yaml
```

```yaml
apiVersion: stash.appscode.com/v1alpha1
kind: Repository
metadata:
clusterName: ""
creationTimestamp: 2018-04-12T10:44:38Z
generation: 0
labels:
restic: rook-restic
workload-kind: Deployment
workload-name: stash-demo
name: deployment.stash-demo
namespace: default
resourceVersion: "3436"
selfLink: /apis/stash.appscode.com/v1alpha1/namespaces/default/repositories/deployment.stash-demo
uid: 7fec8b2d-3e3e-11e8-a7b6-080027672508
spec:
backend:
s3:
bucket: stash-backup
endpoint: http://rook-ceph-rgw-my-store.rook
prefix: stash-backup/demo/deployment/stash-demo
storageSecretName: rook-restic-secret
status:
backupCount: 2
firstBackupTime: 2018-04-12T10:45:44Z
lastBackupDuration: 7.766740386s
lastBackupTime: 2018-04-12T10:46:41Z
```console
$ kubectl get snapshots -l repository=deployment.stash-demo
NAME AGE
deployment.stash-demo-c1014ca6 10s
```

Look at the `status` field. `backupCount` show number of successful backup taken in this `Repository`.
Here, `deployment.stash-demo-c1014ca6` represents the name of the successful backup [Snapshot](/docs/concepts/crds/snapshot.md) taken by Stash in `deployment.stash-demo` repository.

## Recover to `PersistentVolumeClaim`

Expand Down

0 comments on commit 5afb9c7

Please sign in to comment.