Rolling back the custom reports

Last Updated : Jul 08, 2022 |
Prolog information
Use this procedure to roll back the custom reports if an Avaya Analytics™ upgrade fails. The custom reports are exported before an upgrade to a secured location.
Before you begin
Roll back the Avaya Analytics™ software.
  1. Find the analyticsdb-node pods that has the master role.
    ADDITIONAL INFORMATION:
    kubectl get pods --selector=postgres-operator.crunchydata.com/role=master | grep analyticsdb-node- | head -n1 | awk '{print $1;}'
  2. Connect to the analyticsdb-node pods using the following command:
    ADDITIONAL INFORMATION:
    kubectl exec -it <analyticsdb-node-Id> -- /bin/bash
  3. List local backup folders to confirm saved backups:
    ADDITIONAL INFORMATION:
    ls -l pgdata/md_full_backup/
  4. If backup folder does not exists create a new folder to store backup:
    ADDITIONAL INFORMATION:
    mkdir -p /pgdata/md_full_backup
  5. To exit the pod, type exit.
  6. On Cluster Control Manager, change the directory to where the backup was exported by using the following command:
    ADDITIONAL INFORMATION:
    cd /var/avaya/artifactCache/historical_md_backups/
  7. Copy the Historical Reporting backup file on to the analyticsdb-node pods by using the following command:
    ADDITIONAL INFORMATION:
    kubectl cp <analyticsdb-node-Id>:/pgdata/md_full_backup/<backup-name>
  8. Connect to the analytics database pod using the following command:
    ADDITIONAL INFORMATION:
    kubectl exec -it <analyticsdb-node-Id> -- /bin/bash
  9. To restore the full backup, run the following command:
    ADDITIONAL INFORMATION:
    psql -U postgres -f /pgdata/md_full_backup/<backup-name> -d avaya_analytics_md
    Note:
    The CCM console might display errors related to the postgres user. Ignore the error messages.
  10. Connect to the PostgreSQL database using the following command:
    ADDITIONAL INFORMATION:
    psql
  11. To view the list of available databases, run the following command:
    ADDITIONAL INFORMATION:
    postgres=> \l
  12. Confirm the avaya_analytics_md database is available.
  13. To quit the database, run the following command:
    ADDITIONAL INFORMATION:
    postgres=> \q
  14. To exit the pod, type exit.
  15. Verify that the custom reports are restored.