Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

As we are using kubernetes to host databases, so approch approach is different to restore database

Refer the following link to take backup of the databases:

Neo4j Restore

  1. copy backup folder from the azure storage account to the pod which you will create with the below manifest, this pod will mount same pv where date data is present of neo4j.

Code Block
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ubuntu-deployment
  labels:
    app: ubuntu
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ubuntu
  template:
    metadata:
      labels:
        app: ubuntu
    spec:
      containers:
      - name: ubuntu
        image: ubuntu
        command: ["sleep", "123456"]
        volumeMounts:
        - mountPath: /data
          name: neo4j-data
      volumes:
      - name: neo4j-data
        persistentVolumeClaim:
          claimName: neo4j-claim
  1. scale neo4j deployement deployment to 0 go

    Code Block
    kubectl command
  2. Go inside the pod which you created with the manifest, navigate to /data/databases, rename graph.db to graph.db.backup and paste the graph.db folder at same location. Exit from the pod

    Code Block
    kubectl command to login
    cd /data/databases
    mv 
    cp
  3. Scale again neo4j pod to 1 which will load the data from the backup data remove deployment which you have created.

    Code Block
    kubectl command to setup replicas to 1
  4. Remove deployment which was created to restore neo4j backup

Elasticsearch Restore

As we took elasticsearch backup with help of azure plugin

Code Block
Commands to login to the pod

create repository with following command

...

curl -s "http://localhost:9200/_snapshot/azurebackup/snapshot_1/_status?pretty"

Cassandra Restore