use parablu001

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

var k = db.JOB_CONFIG.find({"jobServerName" : "SERVER_IP_ADDRESS"}).count()
if(k == 0){
db.JOB_CONFIG.insert({
"jobServerName" : "SERVER_IP_ADDRESS",
"job" : {
       "auditCleanerTimerTrigger" : false,
       "deleteTimerTrigger" : false,
       "licenseCheckTrigger" : false,
       "backupDeleteTimerTrigger" : false,
       "diskSpaceNotifierTrigger" : false,
       "fileSharingCleanerTrigger" : true,
       "cronTrigger" : false,
       "sendUserStorageLimitReachedTrigger" : false,
       "externalStorageFileImageUpdateTrigger" : false,
       "autoUserSyncFromADTimerTrigger" : false,
       "sendAuditHistoryReport" : true,
       "authorizationTokenCleanerTimerTrigger" : true,
       "sendCloudOverviewTrigger" : true,
       "deleteBackupDataTrigger" : true,
       "deletedUserCleanerTrigger" : true,
       "deleteSyncOverviewTrigger" : true,
       "tokenExpiryTrigger" : true,
       "agentLastConnectionReportTrigger" : false,
       "backupActivityNotifierTrigger" : false,
       "backupOverviewExcelTrigger" : false,
       "noBackupReportTrigger" : false,
       "sendBackupHistory" : false,
       "sendRestoreHistoryReport" : false,
       "sendStorageUtilizationReport" : false,
       "sendFailedBackupHistory" : false,
       "sendBakcupOverviewReport" : false,
       "checkLicenceExpiry" : true,
       "backupBatchCleanerTrigger" : true,
       "sendAuditHistoryReport" : true,
       "supportLogsCleaner" : true,
       "deleteduserDataCleanerTrigger" : true,
       "autoUserSyncFromADDTimerTrigger" : true,
       "aadTokenExpiryTrigger" : true,
       "backupUploadLatestJobTrigger" : true,
        "restoreFailedLatestJobTrigger" : true,
        "syncUploadJobTrigger" : true,
        "blukryptDeleteExpiredSyncFilesTrigger" : true,
        "dailyUserBackupOverviewTrigger" : false,
        "failedFilesRetryJobTrigger" : true,
        "backupFilesDeletionTrigger" : true,
        "pgInfoCleanJobTrigger" : false,
       "chunkDeletionJobTrigger" : false,
       "deleteExternalStorageDataTimer" : true,
       "deleteExternalFileImageTimer" : false,
	"job.o365tokenExpiryTrigger": false
}
 });

db.JOB_CONFIG.update({},{$set:{"job.auditCleanerTimerTrigger":true,"job.sendBakcupOverviewReport":true,"job.sendAuditHistoryReport":true,"job.autoUserSyncFromADTimerTrigger":true,"job.sendFailedBackupHistory":true,"job.noBackupReportTrigger":true}});

db.JOB_CONFIG.update({},{$set:{"job.fileSharingCleanerTrigger":true,"job.fileSharingCleanerTrigger":true,"job.authorizationTokenCleanerTimerTrigger":true,"job.deletedUserCleanerTrigger":true,"job.tokenExpiryTrigger":true,"job.checkLicenceExpiry":true,"job.supportLogsCleaner":true,"job.deleteduserDataCleanerTrigger":true,"job.deleteExternalStorageDataTimer":true,"job.blackListUserCleanerJobTrigger":true,"job.backupUploadLatestJobTrigger":true,"job.restoreFailedLatestJobTrigger":true,"job.failedFilesRetryJobTrigger":true,"job.backupFilesDeletionTrigger":true,"job.syncUploadJobTrigger":false,"job.diskSpaceNotifierTrigger":false,"job.deleteSyncOverviewTrigger":false,"job.blukryptDeleteExpiredSyncFilesTrigger":false,"job.autoUserSyncFromADTimerTrigger":true}},{multi:true});

db.JOB_CONFIG.update({},{$unset:{"job.deleteTimerTrigger":0,"job.licenseCheckTrigger":0,"job.backupDeleteTimerTrigger":0,"job.cronTrigger":0,"job.externalStorageFileImageUpdateTrigger":0,"job.deleteBackupDataTrigger":0,"job.backupOverviewExcelTrigger":0,"job.backupActivityNotifierTrigger":0,"job.pgInfoCleanJobTrigger":0,"job.chunkDeletionJobTrigger":0,"job.dailyUserBackupOverviewTrigger":0,"job.deleteExternalFileImageTimer":0,"job.sendUserStorageLimitReachedTrigger":0,"job.blackListUserCleanerJob":0,"job.serverUpgradeCheck":0}},{multi:true});

db.JOB_CONFIG.update({},{$set:{"job.syncFailedFilesRetryJobTrigger" : false, "job.restoreSyncFailedLatestJobTrigger" : false}},{multi:true});

db.JOB_CONFIG.update({},{$set:{"job.userDriveRegistryJobTrigger" : false}},{multi:true});

db.JOB_CONFIG.updateMany({},{$set:{"job.checkODBFoldersCountJobTrigger":true}})

}
