Back up and Restore the EFA Database

You can back up and restore the EFA database and services, such as goFabric-service and goAuth-service.

You can restore a backed-up database for various reasons, such as if the database becomes corrupted or you want to revert to a previous configuration. The backup process creates a backup tar file, which you specify for the restore process.
  1. To back up the database, run the following command as a root user with administrative privileges.
    When prompted, provide the directory path for the backup tar file.
    # efa_backup
    
    Provide your backup absolute directory path: /root/backup/bk_v1
    backing "dcapp_asset" database to /root/backup directory
    backing "dcapp_fabric" database to /root/backup directory
    backing "dcapp_tenant" database to /root/backup directory
    backing "dcapp_vcenter" database to /root/backup directory
    backing "dcapp_hyperv" database to /root/backup directory
    backing "efa_openstack" database to /root/backup directory
    root@administrator-00:~#
    
  2. To restore the database, run the following command as a root user with administrative privileges.
    When prompted, provide the directory path for EFA and for the backup tar file.
    # efa_restore
    EFA installed on single-node
    Provide your EFA directory path: /root/efa
    Provide database backup tar file: /root/backup/bk_v1
    Provided backup directory...
    stopping service gofabric-service
    deployment.apps "gofabric-service" deleted
    stopping service goauth-service
    deployment.apps "goauth-service" deleted
    stopping service gorbac-service
    deployment.aps/filebeat-service created
    …
    ...
    ...
    configmap/kibana-config unchanged
    service/kibana-service unchanged
    deployment.apps/kibana-service created
    configmap/logstash-service unchanged
    configmap/logstash-config unchanged
    configmap/logstash-pipeline unchanged
    service/logstash-service unchanged
    deployment.apps/logstash-service created
    configmap/metricbeat-config unchanged
    deployment.apps/metricbeat-service created
    Completed deploying elk stack
    ~/backup/bk_v1
    Successfully restored application database
    After the database is successfully restored, a list of all PODs is displayed, showing their status, number of restarts, and age.