Human Connection
docs-354-kubernetes_cron_job_for_backups
docs-354-kubernetes_cron_job_for_backups
  • Introduction
  • Edit this Documentation
  • Installation
  • Backend
    • GraphQL
  • Webapp
    • COMPONENTS
    • PLUGINS
    • STORE
    • PAGES
    • ASSETS
    • LAYOUTS
    • Styleguide
    • STATIC
    • MIDDLEWARE
  • Testing Guide
    • End-to-end tests
    • Frontend tests
    • Backend tests
  • Contributing
  • Kubernetes Deployment
    • Minikube
    • Digital Ocean
      • Kubernetes Dashboard
      • HTTPS
    • Human Connection
    • Volumes
      • Neo4J Offline-Backups
      • Volume Snapshots
      • Reclaim Policy
      • Velero
    • Legacy Migration
  • Feature Specification
  • Code of conduct
  • License
Powered by GitBook
On this page

Was this helpful?

  1. Kubernetes Deployment
  2. Volumes

Reclaim Policy

PreviousVolume SnapshotsNextVelero

Last updated 5 years ago

Was this helpful?

We recommend to change the ReclaimPolicy, so if you delete the persistent volume claims, the associated volumes will be released, not deleted.

This procedure is optional and an additional security measure. It might prevent you from loosing data if you accidently delete the namespace and the persistent volumes along with it.

$ kubectl --namespace=human-connection get pv

NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                               STORAGECLASS       REASON   AGE
pvc-bd02a715-66d0-11e9-be52-ba9c337f4551   1Gi        RWO            Delete           Bound    human-connection/neo4j-data-claim   do-block-storage            4m24s
pvc-bd208086-66d0-11e9-be52-ba9c337f4551   2Gi        RWO            Delete           Bound    human-connection/uploads-claim      do-block-storage            4m12s

Get the volume id from above, then change ReclaimPolicy with:

kubectl patch pv <VOLUME-ID> -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'

# in the above example
kubectl patch pv pvc-bd02a715-66d0-11e9-be52-ba9c337f4551 -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
kubectl patch pv pvc-bd208086-66d0-11e9-be52-ba9c337f4551 -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'

Given that you changed the reclaim policy as described above, you should be able to create a persistent volume claim based on a volume snapshot content. See the general kubernetes documentation and our specific documentation for snapshots .

here
here