Back Up CEE and cnSGW-C Ops Center Configuration
To back up the CEE and Ops Center configuration from the master node, use the following configuration:
-
Log in to the master node as an Ubuntu user.
-
Create a directory to backup the configuration files, using the following configuration:
mkdir backups_$(date +'%m%d%Y_T%H%M') && cd "$_"
-
Back up the cnSGW-C Ops Center configuration and verify the line count of the backup files, using the following configuration:
ssh -p <port_number> admin@$(kubectl get svc -n $(kubectl get namespaces | grep -oP 'cnSGW-(\d+|\w+)') | grep <port_number> | awk '{ print $3 }') "show run | nomore" > cnSGWops.backup_$(date +'%m%d%Y_T%H%M') && wc -l cnSGWops.backup_$(date +'%m%d%Y_T%H%M')
Example:ubuntu@pocnSGW-mas01:~/backups_09182019_T2141$ ssh -p 2024 admin@$(kubectl get svc -n $(kubectl get namespaces | grep -oP 'cnSGW-(\d+|\w+)') | grep <port_number> | awk '{ print $3 }') "show run | nomore" > cnSGWops.backup_$(date +'%m%d%Y_T%H%M') && wc -l cnSGWops.backup_$(date +'%m%d%Y_T%H%M') admin@<ipv4address>'s password: cnSGW-OPS-PASSWORD 334 cnSGWops.backup
-
Back up the CEE Ops Center configuration and verify the line count of the backup files, using the following configuration:
ssh -p <port_number> admin@$(kubectl get svc -n $(kubectl get namespaces | grep -oP 'cee-(\d+|\w+)') | grep <port_number> | awk '{ print $3 }') "show run | nomore" > ceeops.backup_$(date +'%m%d%Y_T%H%M') && wc -l ceeops.backup_$(date +'%m%d%Y_T%H%M')
Example:ubuntu@pocnSGW-mas01:~/backups_09182019_T2141$ ssh -p <port_number> admin@$(kubectl get svc -n $(kubectl get namespaces | grep -oP 'cee-(\d+|\w+)') | grep <port_number> | awk '{ print $3 }') "show run | nomore" > ceeops.backup_$(date +'%m%d%Y_T%H%M') && wc -l ceeops.backup_$(date +'%m%d%Y_T%H%M') admin@<ipv4address>'s password: CEE-OPS-PASSWORD 233 ceeops.backup
-
Move the SMI Ops Center backup file (from the SMI Cluster Manager) to the backup directory, using the following configuration:
scp $(grep cm01 /etc/hosts | awk '{ print $1 }'):/home/ubuntu/smiops.backup_$(date +'%m%d%Y_T%H%M') .
Example:
ubuntu@pocnSGW-mas01:~/backups_09182019_T2141$ scp $(grep cm01 /etc/hosts | awk '{ print $1 }'):/home/ubuntu/smiops.backup_$(date +'%m%d%Y_T%H%M') . ubuntu@<ipv4address>'s password: SMI-CM-PASSWORD smiops.backup 100% 9346 22.3MB/s 00:00
-
Verify the line count of the backup files.
Example:
ubuntu@pocnSGW-mas01:~/backups_09182019_T2141$ wc -l * 233 ceeops.backup 334 cnSGWops.backup 361 smiops.backup 928 total