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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Williams225System AdministatorAuthor Commented:
Thank You
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Storage Software

From novice to tech pro — start learning today.