IMPORTANT ANNOUNCEMENT: On May 6, 2024, Carbon Black User eXchange (UeX) and Case Management will move to a new platform!
The Community will be in read-only mode starting April 19th, 7:00 AM PDT. Check out the blog post!
You will still be able to use the case portal to create and interact with your support cases until the transition, view more information here!

Procedure to backup and restore Unified View Server

Procedure to backup and restore Unified View Server

Version
This applies to 6.1.3 version of Unified View Server

Topic
This document describes how to backup and restore configurations for a Unified View Server

Backup Steps

1)  Create a backup directory (using /data/backup here, but can be any directory):

mkdir /data/backup

then change to that directory:

cd /data/backup

2. Backup the configuration files by running these commands:

     a. Host file:

tar -P --selinux -cvf cbhosts.tar /etc/hosts

     b. Yum files:

tar -P --selinux -cvf cbyum.tar /etc/yum.repos.d

     c. IP tables:

tar -P --selinux -cvf cbiptables.tar /etc/sysconfig/iptables

     d. Cb Unified View configuration:

tar -P --selinux -cvf cbconfig.tar /etc/cb/

     e. Rsyslog configuration:

tar -P --selinux -cvf cbrsyslog.tar /etc/rsyslog.conf

     f. Rsyslog.d configuration:

tar -P --selinux -cvf cbrsyslogd.tar /etc/rsyslog.d/

     g. Logrotate configuration:

tar -P --selinux -cvf cblogrotate.tar /etc/logrotate.d/cb-logrotate.conf

3. Perform a backup of the Postgres Database:

     a. Backup configuration:

  pg_dump -C -Fp -f psqldump_config.sql cb -p 5002

     b.  Backup users and groups:

pg_dumpall -p 5002 --roles-only -f psqlroles.sql

4. Copy the backup location off to a remote location

Restore Steps

1. Stop Cb Unified View:

service cb-unifiedview stop

2. Change directories to the backup location:

cd /data/backup

3. Restore configuration files as follows:

     a. Hosts file:

tar -P -xvf cbhosts.tar

     b. Yum files:

tar -P -xvf cbyum.tar

     c. IP table files:

tar -P -xvf cbiptables.tar

     d. Cb Unified View configuration:

tar -P -xvf cbconfig.tar

     e. Configure Rsyslog:

tar -P -xvf cbrsyslog.tar

     f. Configure Rsyslog.d:

tar -P -xvf cbrsyslogd.tar

     g. Configure Logrotate:

tar -P -xvf cblogrotate.tar

4. Restore Postgres database:

     a. Start the Postgres database:

service cb-pgsql start

     b. Drop the old database:

dropdb cb -p 5002

     c. Restore roles (Note You will receive an error indicating that the account is already created, that is normal/expected):

psql template1 -p 5002 -f psqlroles.sql

     d. Restore the data dump:

psql template1 -p 5002 -f psqldump_config.sql

     e. Stop the Postgres database:

service cb-pgsql stop

5. Start the Cb Unified View services:

service cb-unifiedview start
Labels (1)
Was this article helpful? Yes No
100% helpful (1/1)
Article Information
Author:
Creation Date:
‎03-05-2018
Views:
1244
Contributors