Oracle DBA Tips and Techniques

By Arjun Raja

TSM (Tivoli Storage Manager) – Using the dsmc command

Posted by Arjun Raja on July 15, 2009

Many DBA’s have to be familiar with TSM ( Tivoli Storage Manager) commands to backup files to tape or restore backups from tape.

To query backups – for example all compressed files with ‘.Z’ extension.

oracle:/u05/backup/test > dsmc q b -inactive ‘*.Z’

File

/u05/backup/TEST/20090702_0841.test_tables.dmp.Z

To Restore the file above –

dsmc restore -inactive /u05/backup/TEST/20090702_0841.ofsap_tables.dmp.Z

To backup permanently and retain for 2 years.

First query the management classes available –

dsmc q mgmt

Domain Name : XXXUNIX
Activated Policy Set Name : STANDARD
Activation date/time : 05/11/09 13:16:54
Default Mgmt Class Name : STANDARD
Grace Period Backup Retn. : 30 day(s)
Grace Period Archive Retn.: 730 day(s)

dsmc archive -archmc=RETAIN2YEARS -description=”test_remove” “/u05/backup/TEST/test_export.sh” -su=yes > test.log

The log for the output is written to test.log

To query all permanent archived backups under a particular directory –

dsmc query Archive -detail “/u05/backup/TEST/test_export.sh” -su=yes

To retrive the backup above

dsmc retrieve “/u05/backup/TEST/test_export.sh”

Retrieve function invoked.

— User Action is Required —
File /u05/backup/TEST/test_export.sh ‘ exists

Select an appropriate action
1. Replace this object
2. Replace all objects that already exist
3. Skip this object
4. Skip all objects that already exist
A. Abort this operation
Action [1,2,3,4,A] : 1
Action [1,2,3,4,A] : 1
Retrieving 472 /u05/backup/TEST/test_export.sh [Done]

Retrieve processing finished.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s