IBM TIVOLI : how to automate tsm database backup and delete old ones

Hello Experts,


I have a tsm server which is connected to a tape drive via a scsi cable.

I used to do automatic tsm db backup with the tape drive, but my scsi card is not working anymore.

So, I have created a temporary device class (TEMP_DB_BACKUP) on a disk and I do manual tsm database backup using the command  BACKUP DB TYPE=FULL DEVC=TEMP_DB_BACKUP

Now, I want to create a schedule to automate this backup, but I want to delete the old backups everytime I do a new backup, can you please help me??
Williams225System AdministatorAsked:
Who is Participating?
 
woolmilkporcCommented:
Use the command "DELETE VOLHISTORY TYPE=DBBACKUP" to get rid of old database backups.

Entities to be deleted are selected by date/time. Below I'll use "TOD=-3", which means "Delete everything older than the current date minus 3 days". Change as required, but please be aware that the latest database full and incremental backup series will never be deleted, so you should have space for at least two full backups (or backup/incremental series).

Consider backing up the volume history and the device configuration along with the database. They might be needed for database recovery.

First, you should create a script (example name "MANAGE_DB") containing all the required commands:

DEF SCR MANAGE_DB DESC="Clean up VOLH, Backup DB, DEVCONF and VOLH"
UPD SCR MANAGE_DB "DEL VOLH TOD=-3 T=DBB" line=100
UPD SCR MANAGE_DB "BACKUP DB TYPE=FULL DEVC=TEMP_DB_BACKUP WAIT=YES" line=200
UPD SCR MANAGE_DB "BACKUP VOLHIST F=/var/adm/ras/volumehistory1" line=300
UPD SCR MANAGE_DB "BACKUP DEVCONF F=/var/adm/ras/devconfig1" line=400

Paths and filenames in the last two commands are just examples. Use your own values!

Next, create an admin schedule (example name "MANAGE_DB") to run the new script at (e.g.) daily 6:00 A.M.:

DEF SCHED MANAGE_DB T=A CMD="RUN MANAGE_DB" ACTIVE=YES STARTTIME=06:00 PERIOD=1 PERUNITS=DAYS DAY=ANY

Your new script will be started by this new schedule the next time it becomes  6:00 A.M. and then every day at that time.
0
 
Williams225System AdministatorAuthor Commented:
Thank You
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.