Versions Compared

Key

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

...

  1. Download required backup from azure storage account and uncompress datafile

  2. Copy backup to redis pod at location /data

    Code Block
    kubectl cp dump.rdb sunbird/redis-master-0:/data
  3. go to /data/appendonlydir you will see one rdb file eg. appendonly.aof.1.base.rdb , take copy of that file or rename same by appending backup to file name

  4. rename downloded rdb file with the same name eg if the file name inside appendonlydir is appendonly.aof.1.base.rdb then rename your dump.rdb to the same name

  5. Past that rdb to the /data/appendonlydir

  6. restart statefulset

    Code Block
    kubectl rollout restart statefulsets redis -n sunbird

Postgres Restore

  1. Download required backup from azure storage account and uncompress backup file

  2. Copy backup to /bitnami/postgresql directory inside file or you can connect database remotely and do a restore

    Code Block
    kubectl cp backup.sql sunbird/postgres-0:/bitnami/postgresql
  3. Use below command to restore inside the postgres pod

    Code Block
    psql -U username --file=backupfile.sql
  4. Validate databases