use parablu001

db.setProfilingLevel(1, { slowms: 5000 })
db.setProfilingLevel(1)

var m = db.PRIVACY_GATEWAY.find({"gatewayName" : "SERVER_IP_ADDRESS"}).count()
if(m == 0){
db.PRIVACY_GATEWAY.insert({
	"gatewayName" : "SERVER_IP_ADDRESS",
	"type" : "both",
	"productType" : "both",
	"isActive" : true,
	"componentsProperties" : {
		"encryptionEnabled" : "true",
		"ftpHost" : "192.168.7.62",
		"syncUploadPath" : "/parablu/sync",
		"syncFtpEnabled" : "false",
		"localStorageEnabled" : "false",
		"ftpUser" : "paracloud-support",
		"ftpPwd" : "parablu123",
		"odbFrequencyCallValue" : "500",
		"proxyUserName" : "",
		"proxyPort" : "",
		"proxyHost" : "",
		"proxyPassword" : "",
		"chunkUpdateMaxRetry" : "3",
		"noOfJobThreads" : "3",
		"deleteBkpTblWhenChnkNotFound" : "",
		"updateGatewayWhenChunkNotFound" : "",
		"chunkTotalBuckets" : "101",
		"chunkColQueryRequired" : "true",
		"bkpColQueryRequired" : "true",
		"odbRetryFolderVal" : "",
		"odbUserAgentVal" : "",
		"gatewayName" : "gatewayIP",
		"paracloudUrl" : "https://BV_VALUE",
		"queryLimit" : "500",
		"pgOverloadLimit" : "50",
		"pgOverLoadInactivityPeriod" : "300000",
		"resoreQueryLimit" : "100",
		"noOfThreads" : "20",
		"stopJobsEnabled" : "false",
		"countOfContinuous429" : "",
		"countOfODBFiles" : "",
		"delayIn429CaseInSec" : "",
		"delayInUploadInSec" : ""
	},
	"noOfThreadsUsed" : NumberLong(0),
	"_class" : "com.parablu.pcbd.domain.PrivacyGateway"
});
}

var p = db.PRIVACYGATEWAY_PROPERTIES.count();
if(p == 0){
db.PRIVACYGATEWAY_PROPERTIES.insert({"componentsProperties" : {
                "encryptionEnabled" : "true",
                "ftpHost" : "192.168.7.62",
                "syncUploadPath" : "/parablu/sync",
                "syncFtpEnabled" : "false",
                "localStorageEnabled" : "LOCAL_STORAGE",
                "ftpUser" : "paracloud-support",
                "ftpPwd" : "parablu123",
                "odbFrequencyCallValue" : "500",
                "proxyUserName" : "",
                "proxyPort" : "",
                "proxyHost" : "",
		"proxyPassword" : "",
                "chunkUpdateMaxRetry" : "3",
                "noOfJobThreads" : "3",
                "deleteBkpTblWhenChnkNotFound" : "",
                "updateGatewayWhenChunkNotFound" : "",
                "chunkTotalBuckets" : "101",
                "chunkColQueryRequired" : "true",
                "bkpColQueryRequired" : "true",
                "odbRetryFolderVal" : "",
                "odbUserAgentVal" : "",
                "gatewayName" : "gatewayIP",
                "paracloudUrl" : "https://BV_VALUE",
                "queryLimit" : "500",
                "pgOverloadLimit" : "50",
                "pgOverLoadInactivityPeriod" : "300000",
                "resoreQueryLimit" : "100",
                "noOfThreads" : "20",
                "stopJobsEnabled" : "false"
}})
}

use parablu

db.CLOUD_PROPERTIES.update({"solrUrl":{$exists:false}},{$set: {"solrUrl": "https://SERVER_IP_ADDRESS/ParacloudSearch/search/"}})
