Incorrect backup dates are displayed or SQL Server Days Since Last Backup alarm is not working correctly
After upgrading the backup alarm fires incorrectly with backup software that uses the VSS backup service (e.g. Rubrik and Cohesity)
This is an expected result after fixing defect FOG-3502 where the SQL Server cartridge did not support VSS backups, only SQL Server backups.
An setting was added to the SQL Server agent status properties as part of enhancement FOG-4242 to count the vss copies as valid backups. This has been set as TRUE for newly added database agents.
To activate this configuration for agents
Alternatively, run the following groovy script to change the Enable vss copies as valid backup setting for all SQL Server agents from False to True
srvConfig = server["ConfigService"];
srvAgent = server["AgentService"];
namespace = "DB_SQL_Server"
agentType = "DB_SQL_Server"
def updateASP(primaryASP) {
primaryASP.setValueByString("considerVssCopies" , "1");
srvConfig.saveConfig(primaryASP);
}
primaryASP = srvConfig.getAgentTypePrimaryAsp(namespace, agentType);
updateASP(primaryASP);
def allAgents = srvAgent.findByAdapterAndType("FglAM", "DB_SQL_Server");
allAgents.each {agent ->
primaryASP = srvConfig.getAgentInstancePrimaryAsp(namespace, agentType, agent.getId());
updateASP(primaryASP);
}
return true;
The following script checks the Error Log connection type setting for all SQL Server agents
def out = new StringBuilder();
def agentService = server.get("AgentService"); def configService = server.get("ConfigService"); def agents = agentService.findByAdapterAndType("FglAM", "DB_SQL_Server"); for (agent in agents) {
def primaryASP = configService.getAgentInstancePrimaryAsp(agent.getAgentNamespace(), agent.getTypeId(), agent.getId());
if (primaryASP) {
out.append(String.format("%s, %s: considerVssCopies=%s\n", agent.getRemoteClientId(), agent.getName(), primaryASP.getString("considerVssCopies")));
}
}
return out.toString();