Back up and Restore the XCO System

You can back up and restore the XCO system, including the database and certificates.

About this task

Follow this procedure to back up and restore the XCO system.

Procedure

  1. To back the system, complete the following steps:
    1. (If remote option is not specified) To back up the system, run the following command:
      $ efa system backup
      Generating backup of EFA...
      Backup Location: /apps/efa_logs/backup/EFA-2023-09-10T13-21-46.413.tar
      --- Time Elapsed: 10.401999384s ---
    2. (If remote option is specified) To backup the system and copy to remote server after configuring remote server settings, run the following command:.
      $ efa system backup --remote
      
      Generating backup of EFA... 
      
      Backup Location on local server: /var/log/efa/backup/EFA-3.4.0-1102-2023-08-11T17-56-46.940.tar
      Backup Location on Remote Server: user@10.37.34.151:/home/user/EFA-3.4.0-1102-2023-08-11T17-56-46.940.tar
      
      --- Time Elapsed: 18.462460717s ---
  2. To restore the system, complete the following steps:
    1. Run the efa system restore command.
      $ efa system restore
      
      EFA-2023.01.12-11.19.52.tar (Version:2.3.2-GA, Generated by: User)
      EFA-2023-01-12T04.59.09.tar (Version:2.4.0-7171, Generated by: User)
      EFA-2023-01-12T13.50.00.tar (Version:2.4.0-121, Generated by: User)
      EFA-2023-01-12T13.50.51.tar (Version:2.4.0-121, Generated by: System)
      EFA-2023-01-12T16.11.47.tar (Version:2.4.0-1211, Generated by: System)
      EFA-Upgrade-2.3.2-GA.tar (Version:2.3.2-GA, Generated by: System)
      
      The command output displays a list of available backup tar files.
    2. Select the backup tar file that you want to restore.
      Choose backup option:1
      Selected: EFA-2023.01.12-11.19.52.tar
      Performing EFA restore using EFA-2023.01.12-11.19.52.tar
      Generating backup before initiating restore
      BACKUP_TAR: /apps/efa_logs/backup/EFA-2023.01.12-11.19.52.tar
      Stopping all EFA services
      All pods are terminated
      Migrating database
      Completed database migration
      Checking if all PODS are in ready state...
      Restore operation is successful
      --- Time Elapsed: 9m3.079104969s ---
    3. When the restore is complete, run source /etc/profile.
      You can now log in to XCO.
    4. To enable secure connections, install the certificates on devices.
      efa certificate device install --ip 10.20.61.92 --cert-type https
      The command installs the HTTPS or OAuth2 certificate on one or more devices.
    5. To get the current state of the devices, run the efa inventory device update command after you run the restore command.
    6. Check the status of the services to ensure that they are in-sync.