CMS DATABASE BACKUP AND RESTORE
NOTE:
The provided scripts are applicable for the entire MongoDB instance, irrespective of any databases present in it
CONTAINERS
Execute the below commands for CMS DB backup and restore for containers:
-
Log in to the Artifactory site using Virsec-provided credentials from the local machine
-
Navigate to the directory vsp > cmsutils > ReleaseNumber > shellscripts
-
Download the file mongoBackupRestore.zip. Unzip the file
-
Take the backup using the below command:
./k8sbackupscript -p <Backup_File_Path>
-
To view the help menu, execute the below command:
./k8sbackupscript -h
-
-
Stop all the CMS services
-
Start MongoDB service using the below command:
-
kubectl apply -f <CMS_Installation_Directory>/cms_serviceperpod/infra/vsp_mongo.yaml
-
-
Restore the backup using the below command:
./k8sRestoreScript.sh -b <Backup_File_Path/Filename>
-
To view the help menu, execute the below command:
./k8sRestoreScript.sh -h
-
-
Start all the CMS services