Versions Compared

Key

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

...

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

Cassandra Restore

  1. Download restore script from below url

    Code Block
    https://sunbirdstagingpublic.blob.core.windows.net/dbrestorescripts/restore.py
  2. Download backup from storage account and untar the backup

  3. Copy backup folder to pod at location /bitnami/cassandra

    Code Block
    kubectl cp backupfolder sunbird/cassandra-0:/bitnami/cassandra/ 
  4. Copy restore script also which you have downloaded from the url to the pod and place it to /bitnami/cassandra

    Code Block
    kubectl cp restore.py sunbird/cassandra-0:/bitnami/cassandra/ 
  5. Restore schema got to backupfolder eg. /bitnami/cassandra/cassandrabackup, you will find db_schema.cql. Use below command

    Code Block
    cqlsh -f db_schema.cql
  6. Use below command to restore

    Code Block
    python3 restore.py --snapshotdir /bitnami/cassandra/cassandrabackupfolder --datadirectory /bitnami/cassandra/data/data/
  7. Restart the statefulset once operations is done

    Code Block
    kubectl rollout restart statefulsets cassandra -n sunbird
  8. Validate data by using cqlsh

  9. Delete backup folder which you have copied earlier you can delete restore.py script

Redis Restore

1.

Postgres Restore