Backing up DAG cluster with TSM

There is a problem with DAG cluster backup in TSM. When you create script with /PREFERDAGPASSIVE key, your script return error 464 – nothing to backup. So I’ve created script to analyze Exchange’s databases if there is healthy passive copy of database to backup, so you run backup for the only healthy copy of database and for passive healthy copies of database. If there is nothing to backup than script returns 0.

$exc_dir=”C:\Program Files\Tivoli\TSM\TDPExchange”
cd $exc_dir
Get-Date -UFormat %Y-%m-%d’ ‘%T | Out-File -Encoding utf8 -FilePath excfull.log -Append
add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010
foreach ($maildatabase in Get-MailboxDatabase -Server $env:COMPUTERNAME)
{
$copies=0;
$needtobackup=$False;
foreach($dbcopy in Get-MailboxDatabaseCopyStatus $maildatabase)
{
if(($dbcopy.Status -eq “Mounted”) -or ($dbcopy.Status -eq “Healthy”))
{
$copies+=1
}
if((!$dbcopy.ActiveCopy) -and ($dbcopy.MailboxServer -eq $env:COMPUTERNAME))
{
$needtobackup=$True
}
}
if($copies -lt 2)
{
$needtobackup=$True
}
}

if($needtobackup)
{
.\tdpexcc.exe backup * full /PREFERDAGPASSIVE /tsmoptfile=dsm.opt /CONFIGfile=tdpexc.cfg /logfile=excsch.log | Out-File -Encoding utf8 -FilePath excfull.log -Append
$backupresult = $LASTEXITCODE
“Return code was $backupresult” | Out-File -Encoding utf8 -FilePath excfull.log -Append
}else{
“Nothing to backup” | Out-File -Encoding utf8 -FilePath excfull.log -Append
$backupresult=0
“Return code was $backupresult” | Out-File -Encoding utf8 -FilePath excfull.log -Append
}
exit $backupresult

 

Troubleshooting Pending schedules in TSM

Today we’ve found that one of out servers can make backups manually and works fine with polling mode, but when it is switched to prompting mode then schedule never run. After some investigation we’ve found http://www.tsmblog.org/tag/tcpclientport/ because we thought we have a problem with port of CAD. We’ve found that TSM scheduler does not operate with data from NODES table, which contain correct names and IP addresses, but instead it uses SCHEDULE_NODE_ADDRESSES table, which only contains host names and ports. Problem server was in different AD forest and TSM sever did not have correct DNS search suffixes. After fixing DNS issues all Pending schedules disappeared.

TSM ANS0106E error on backup or dsmc run

Recently we’ve found that one of our TSM servers stopped to back up all virtual machines. After examination of dsmerror.log files we’ve found strange messages:

03/20/2015 09:48:42 ANS0106E Message index not found for message 2252.
03/20/2015 09:49:01 ANS0106E Message index not found for message 14320.
03/20/2015 09:49:01 ANS0106E Message index not found for message 14180.

And so on.

After quick search we’ve found official IBM article about this error.

This article suggests you to update or re-install your Backup Archive Client, installed on the TSM server. We’ve tried that with different versions of client with no result. All clients give the same error: ANS0106E.

After that we’ve started to analyze dsmc.exe process wint ProcessExplorer and found strange thing, that this process have open handles to

C:\Program Files\Tivoli\TSM\server\tsmdiag

not

C:\Program Files\Tivoli\TSM\baclient

where we’ve actually installed our BA Client.

So the problem was, that tsmdiag.exe utility set environment variables DSM_CONFIG and DSM_DIR, which affect Backup Archive Client behavior. So to resolve this problem you need to change mentioned environment variables or copy dscenu.txt file from your BAClient folder to tsmdiag folder.

TSM Active Data pool file number

One of the strange features of TSM AD pool is that, when you do first incremental backup (for example 10 files), then change some data (for example 5 files) you’ll get incorrect number of files with query occupancy stg=adpool command. It will show you number of files equal to 15, the same as in your primary storage pool. But if you compare sizes of pool you’ll see a difference.  So do not rely only on file number in your AD storage pool