Saturday, May 16, 2009

TSM Device Configuration File

I have seen some questions on the internet about the Tivoli Storage Manager Device Configuration file. This file is generated by the command

BAckup DEVCONFig Filenames=

So why backup the device configuration? Most of the time you will not need it. But what if you need to restore a database that has failed. Where is the device information usually stored? in the database. What is one of the things you need to restore the database? The device configuration so the restore command will know the definition of the device being used to restore it. Without the devconfig file, this becomes a real Catch-22. Can't restore without the devices and can;t get the devices without restoring.

So, what does a devconfig file look like? Here is a simple example:

/* Device Configuration */
DEFINE DEVCLASS BACKUPS DEVTYPE=FILE FORMAT=DRIVE MAXCAPACITY=5242880K MOUNTLIMIT=10 DIRECTORY="F:\TSM_BACKUP_FILES" SHARED=NO

DEFINE DEVCLASS CM_COPY DEVTYPE=FILE FORMAT=DRIVE MAXCAPACITY=102400K MOUNTLIMIT=1
DIRECTORY="F:\TSM_BACKUP_FILES\CM_COPY" SHARED=NO

DEFINE DEVCLASS FILENET DEVTYPE=SERVER MAXCAPACITY=2097152K MOUNTLIMIT=256 MOUNTRETENTION=0 PREFIX=ADSM SERVERNAME=FILENET RETRYPERIOD=10 RETRYINTERVAL=30

DEFINE SERVER FILENET COMMMETHOD=TCPIP HLADDRESS=filenet LLADDRESS=1500 NODENAME=GROUCHO PASSWORD=215f15799f38d12750109df0c1fb5e81f6
SERVERPASSWORD=215f15799f36d12750107df0c1fb5e81f6

SET SERVERNAME GROUCHO

DEFINE LIBRARY DBBACKUP LIBTYPE=FILE

DEFINE DRIVE DBBACKUP DBBACKUP1 ONLINE=Yes

I broke this up with carriage returns to make it a little more readable. The main line (and possibly the only line) that would be a necessity for a restore of the database is the first one. This line defines the sequential access file device class that is used for creating database backups and where to access the files for restores.

So what does an administrator do if the database fails and this file is not available? It can be created manually and used to do the restore. Just look at the first line in this example and create a file with that type of information, based on your system. Very doable, but I would still prefer creating one at backup time. Just use the script that was laid out in the last post and you are all set.