// removed jquery ui css and js

Backup and Recovery in Non-HA Mode

Recommendations

To effectively manage your CloudCenter deployment, backup your deployment on a daily basis – you can setup a cronjob to automatically perform this backup.

If you are upgrading the CloudCenter deployment, the process differs. See Upgrade for additional context.

The backup and recover procedure is performed on a per component basis and the procedure for backup is the same for all components. Instead of repeating this procedure for each role, the procedure identifies the applicable roles for each component in the HA and standalone modes. For the HA mode, see Backup and Recovery in HA Mode.

Standalone Database

Use this procedure for the MGMTPOSTGRES roles (see Component Modes and Roles for additional context).

Backup the PostgreSQL Database

This procedure applies to the MGMTPOSTGRES server.

  1. SSH into the MGMTPOSTGRES server.

  2. Back up the existing CCM database: 
    1. mkdir /root/backup_date
    2. cd backup_date
    3. pg_dump -U cliqr  -d cliqrdb   > pg_dump.sql

      Enter the PostgreSQL (cliqrdb) username and password at the prompt.

      • Username = cliqr – cannot be changed
      • Password = cliqr – to change this password, see PostgreSQL Password.

Recover the PostgreSQL Database

To Recover the PostgeSQL database, follow this process.

  1. SSH into the PostgeSQL server.

  2. Use the PostgreSQL account to login into the database server and perform the following procedure:

    psql -U postgres -d postgres <password>

    Contact the CloudCenter Support team to obtain this password.


    1. Drop the cliqrdb database.

      DROP database cliqrdb;
    2. Create a new cliqrdb database.

      CREATE database cliqrdb;
    3. Exit the PostgreSQL prompt.

      \q 
  3. Use the PostgreSQL account to Recover the backed up cliqrdb database: 

    psql -U cliqr -d  cliqrdb < pg_dump.sql

    1. Enter the PostgreSQL username and password at the prompt.

      This Recover procedure assumes that you are restoring the database on a new server. If you Recover the database on an existing server which already has the database installed and working, then the above procedure might result in errors  – especially if the cliqrdb and user do not exist,

      In this case, run the following commands after logging into PostgreSQL VM as the root user.

      1. createdb -U postgres -E UNICODE cliqrdb 
        (enter the PostgreSQL user password at the prompt)

      2. Login to cliqrdb using the following command:
        psql -U postgres cliqrdb

      3. Execute the following commands:

        cliqrdb=# CREATE USER cliqr WITH PASSWORD 'cliqr' NOCREATEDB NOCREATEUSER;
        cliqrdb=# CREATE schema cliqr authorization cliqr;
        cliqrdb=# GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN schema cliqr to cliqr;
        cliqrdb=# ALTER ROLE cliqr set search_path to cliqr;
        cliqrdb=# \q
      4. psql -U cliqr -d cliqrdb < pg_dump.sql
        (enter the PostgreSQL user password at the prompt)

CCM

In these procedures:

  • user = the username
  • server_ip = the server where you want to copy the required files

Backup the CCM

To backup the CCM, follow this procedure.

  1. Copy the following CCM related conf files from the /etc/sysconfig/ folder to your desired location using the following commands.

    sudo -i
    cd /opt/cloudcenter/custom/assets/img/
    zip -r appLogo.zip appLogo/
    zip -r appTiers.zip appTiers/
    scp appLogo.zip <user>@<server_ip>:/tmp
    scp appTiers.zip <user>@<server_ip>:/tmp

    Verify that the files are available in the desired location.

  2. Copy of the appLogo and appTiers folders placed in the /opt/cloudcenter/custom/assets/img/ directory to your desired location using the following commands.

    sudo -i
    cd /etc/sysconfig
    scp mgmtserver.conf <user>@<server_ip>:/tmp
    scp capacity-manager.conf <user>@<server_ip>:/tmp
    scp filebeat <user>@<server_ip>:/tmp

You have now backed up the CCM server

Recover the CCM

These procedures assumes that the CCM instance is terminated in Non-HA mode and that you are configuring the CCM IP in the database configuration wizard (db_config_wizard).

Installer Process


To configure database access from the MGMTPOSTGRES server in the CCM_SA mode using the installer method, follow this procedure.

  1. Launch the DB wizard.


    1. SSH into the MGMTPOSTGRES instance.

    2. Invoke the db_config_wizard and configure the CCM IP to enable database access to CCM_SA.

    3. In the CCM IP field, enter the CCM_SA_IP to configure PostgreSQL database access.

    4. Verify your changes and exit the database configuration wizard.

  1. Install and setup a new CCM instance.

    1. SSH into new CCM instance

    2. Download the CCM installer files to /tmp folder.

      • core_installer.bin

      • ccm-installer.jar

      • ccm-response.xml

    3. Run the core installer to setup core system components using the following command.

      ./core_installer.bin <ostype> <cloudtype> ccm_sa
    4. Log off and log back into the CCM instance as the root user to ensure that JAVA Home is set.

    5. Edit the ccm-response.xml file.

      Response File Entry

      Value

      Notes

      <entry key="db_host" value=""/> 

      Replace localhost with IP of the PostgreSQL database. (MGMTPOSTGRES_IP)

      Required for the standalone CCM (CCM_SA) to connect to the remote database

    6. Run the appliance installer to setup the CCM and DB as separate instance.

      java -jar ccm-installer.jar ccm-response.xml
    7. Reboot the CCM VM.

    8. Copy the backup conf files to the new CCM instance from your desired location using SCP.

      sudo -i
      cd /etc/sysconfig
      scp <user>@<server_ip>:/tmp/mgmtserver.conf .
      scp <user>@<server_ip>:/tmp/capacity-manager.conf .
      scp <user>@<server_ip>:/tmp/filebeat .
      cd /opt/cloudcenter/custom/assets/img
      scp <user>@<server_ip>:/tmp/appLogo.zip .
      scp <user>@<server_ip>:/tmp/appTiers.zip .
    9. Unzip the appLogo.zip and appTiers.zip in the /opt/cloudcenter/custom/assets/img/ directory.

      cd /opt/cloudcenter/custom/assets/img/
      unzip appLogo.zip
      unzip appTiers.zip
    10. Change the ownership of the extracted file in the /opt/cloudcenter/custom/assets/img/ directory to cliqruser.

      cd /opt/cloudcenter/custom/assets/img/
      chown -R cliqruser:cliqruser appLogo
      chown -R cliqruser:cliqruser appTiers
    11. Restart the CCM service.

      service ccm stop
      service ccm start

Virtual Appliance Process

To configure database access from the MGMTPOSTGRES server in the CCM_SA mode using the virtual appliance method, follow this procedure.

  1. Setup the new CCM instance using appliance.
  2. Copy the backup conf files to the new CCM instance from your desired location using SCP.

    sudo -i
    cd /etc/sysconfig
    scp <user>@<server_ip>:/tmp/mgmtserver.conf .
    scp <user>@<server_ip>:/tmp/capacity-manager.conf .
    scp <user>@<server_ip>:/tmp/filebeat .
    cd /opt/cloudcenter/custom/assets/img
    scp <user>@<server_ip>:/tmp/appLogo.zip .
    scp <user>@<server_ip>:/tmp/appTiers.zip .
  3. Unzip the appLogo.zip and appTiers.zip in the /opt/cloudcenter/custom/assets/img/ directory.

    cd /opt/cloudcenter/custom/assets/img/
    unzip appLogo.zip
    unzip appTiers.zip
  4. Change the ownership of the extracted file in the /opt/cloudcenter/custom/assets/img/ directory to cliqruser.

    cd /opt/cloudcenter/custom/assets/img/
    chown -R cliqruser:cliqruser appLogo
    chown -R cliqruser:cliqruser appTiers
  5. Restart the CCM service.

    service ccm stop
    service ccm start

Edit the CCM IP in the CCM Wizard's Server Info Field

On the new CCM instance, launch the CCM wizard using the following commands and update the Server Info details with the new CCM IP. After verifying the changes exit the CCM wizard with restart of the server.

sudo -i
/usr/local/cliqr/bin/ccm_config_wizard

Edit the CCM IP in GUA Wizard of AMQP instance

On the AMQP instance launch the GUA wizard using the following commands and update the CCM Info with the new CCM IP.  After verifying the changes exit the GUA wizard with restart of the server.

sudo -i
/usr/local/cliqr/bin/gua_config_wizard

CCO

In these procedures:

  • user = the username
  • server_ip = the server where you want to copy the required files

Backup the CCO

To backup the CCO, follow this procedure.

  1. Copy the following CCO related conf files from the /etc/sysconfig/ folder to your desired location using the following commands.

    sudo -i
    cd  /etc/sysconfig/ 
    scp gateway.conf <user>@<server_ip>:/tmp
    scp cliqr-cisc.conf <user>@<server_ip>:/tmp
    scp filebeat <user>@<server_ip>:/tmp

    Verify that the files are available in the desired location.

  2. Create a mongodump and copy the dump to your desired server location using the following command.

    sudo -i
    mkdir /root/backup_date
    cd /backup_date
    mongodump
    zip -r backup_date.zip /root/backup_date
    scp backup_date.zip <user>@<server_ip>:/tmp

You have now backed up the CCO server

Recover the CCO

These procedures assumes that the CCO instance is terminated in Non-HA mode and that you are configuring the new CCO instance

Installer Process

To configure the CCO using the installer method, follow this procedure.

  1. Install and setup a new CCO instance.

    1. SSH into new CCO instance

    2. Download the CCO installer files to /tmp folder.

      • core_installer.bin

      • cco-installer.jar

      • cco-response.xml

    3. Run the core installer to setup core system components using the following commands.

      sudo -i
      cd /tmp
      chmod 775 core_installer.bin 
      
      #Issue the following command if a local package store is set up
      export CUSTOM_REPO=<http://local+package_store_ip>
      
      .core_installer.bin <ostype> <cloud> cco
    4. Log off and log back into the CCO instance as the root user to ensure that JAVA Home is set.

    5. Run the appliance installer to setup the CCO instance.

      java -jar cco-installer.jar cco-response.xml
    6. Reboot the CCO VM.

    7. SSH into the CCO instance again and copy the backup conf files to the new CCO instance from your desired location using SCP.

      sudo -i
      cd /etc/sysconfig
      scp <user>@<server_ip>:/tmp/gateway.conf .
      scp <user>@<server_ip>:/tmp/cliqr-cis.conf .
      scp <user>@<server_ip>:/tmp/filebeat .
    8. Recover the mongodump file to the new CCO instance using the following commands.

      sudo -i
      cd /tmp
      scp <user>@<server_ip>:/tmp/backup_date.zip .
      unzip backup_date.zip
      cd /var/lib/mongo
      mongorestore  --drop –d cliqr /tmp/backup_date/dump/cliqr
    9. SSH into the AMQP instance.

    10. Launch the gua_config_wizard and edit the CCO IP with the new CCO IP.

      sudo -i
      /usr/local/cliqr/bin/gua_config_wizard
    11. Verify your changes and exit the wizard.

    12. SSH into the new COO instance and restart the CCO service.

      service cco stop
      service cco start

Virtual Appliance Process

To configure database access from the CCO using the virtual appliance method, follow this procedure.

  1. Setup the new CCO instance using appliance.

  2. SSH into the CCO instance again and copy the backup conf files to the new CCO instance from your desired location using SCP.

    sudo -i
    cd /etc/sysconfig
    scp <user>@<server_ip>:/tmp/gateway.conf .
    scp <user>@<server_ip>:/tmp/cliqr-cis.conf .
    scp <user>@<server_ip>:/tmp/filebeat .
  3. Recover the mongodump file to the new CCO instance using the following commands.

    sudo -i
    cd /tmp
    scp <user>@<server_ip>:/tmp/backup_date.zip .
    unzip backup_date.zip
    cd /var/lib/mongo
    mongorestore  --drop –d cliqr /tmp/backup_date/dump/cliqr
  4. SSH into the AMQP instance.

  5. Launch the gua_config_wizard and edit the CCO IP with the new CCO IP.

    sudo -i
    /usr/local/cliqr/bin/gua_config_wizard
  6. Verify your changes and exit the wizard.

  7. SSH into the new COO instance and restart the CCO service.

    service cco stop
    service cco start

Register the New CCO IP with the CCM

See Register the CCO with the CCM.

AMQP

The back up scenario is not applicable in the non-HA mode as there is no known data that can be persisted.

To recover, simply launch a new VM and reconfigure the VM.

  • No labels
© 2017-2018 Cisco Systems, Inc. All rights reserved