Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Recover in same volume #600

Closed
hossainemruz opened this issue Oct 16, 2018 · 2 comments
Closed

Proposal: Recover in same volume #600

hossainemruz opened this issue Oct 16, 2018 · 2 comments
Labels

Comments

@hossainemruz
Copy link
Contributor

User want to recover data in the same volume he backed up.

Use case: User may accidentally delete data from current volume and want to recover them from backed up volume without creating a new volume and re-deploying workload.

Idea: We can use init container to recover(just like offline backup). Workload will restart and init container will recover data in the same volume.

@emedina
Copy link

emedina commented Oct 18, 2018

Notice that as a workaround, this can be already achieved by using the same PersistentVolume claim name that was used in the Deployment to create the backup from, as long as no running Pod is using it:

apiVersion: extensions/v1beta1
kind: Deployment
...
        volumeMounts:
        - mountPath: /var/www/html/config
          name: html-dir
...
      volumes:
      - name: html-dir
        persistentVolumeClaim:
          claimName: matomo-html-dir
...
apiVersion: stash.appscode.com/v1alpha1
kind: Restic
...
  volumeMounts:
  - mountPath: /var/www/html/config
    name: html-dir
apiVersion: stash.appscode.com/v1alpha1
kind: Recovery
...
    recoveredVolumes:
    - mountPath: /var/www/html/config
      persistentVolumeClaim:
        claimName: matomo-html-dir
...

@hossainemruz
Copy link
Contributor Author

Supported by v1beta1 design: #648

Done in #675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants