Restoring an analytics database backup

Restore an analytics database backup.

Procedure

  1. Retrieve a list of available backups that have the CR TYPE of record:
    apicup subsys list-backups <analytics subsystem> | grep record
    NAME                     STATUS   ID                                         CR TYPE   CLUSTER       AGE   COMMENT
    analytics-record-b5w74   Ready    analytics-all-2024-06-14t21:12:25.136z     record    analytics     43m   
    The response includes the ID of each backup. Note the ID of the backup that you want to restore.
  2. Restore the backup that you identified in step 1:
    apicup subsys restore <analytics_subsystem> --id "<backup ID>"  --type=[repair|replace]

    In a disaster recovery situation, set --type=replace to recover all the analytics data in the backup.

    If it is not a disaster recovery situation (you did not redeploy your analytics subsystem), then set --type=repair to recover missing or corrupted data from your backup. Repair is the default of you omit --type.

    Note: Recovery of API event data is possible only if the backup was taken with backup scope set to all. For more information about backup scope, see analytics-backup-scope.
  3. To monitor the progress of your restore:
    apicup subsys list-restores <analytics subsystem>
    NAME                STATUS    ID                                        AGE
    a7s-restore-9bwfv   Running   defanalytics-all-2023-06-29t09:29:53utc   9s
    When the restore is successfully started, STATUS shows Running. The status that is shown for completed restorations depends on your deployment profile:
    • On a three replica deployment, STATUS shows Complete.
    • On a one replica deployment, STATUS shows Warning. SSH into your analytics VM and review the Kubernetes platform restore steps to confirm restore status.