This discussion is archived
10 Replies Latest reply: Mar 3, 2013 10:45 PM by safazaurs RSS

Resotring backup from TSM to another server

safazaurs Newbie
Currently Being Moderated
Hello, everybody.
I'm a newbie DBA, but today I got my first assignment. I have to restore database from backup which is on TAPE (TSM). I don't have any clue where to start, I read matterials but everything wasn't aimed for newbies, so is there any guildlines to do that or maybe someone can help me to make a guide for this task.
So the problem is:
What kind of commands I have to execute to perform this activity --> Take backup from TSM send it to another server and make it available.

It woulde be nice to get any kind of docs

Already Thanks
Tom
  • 1. Re: Resotring backup from TSM to another server
    Richard Harrison . Expert
    Currently Being Moderated
    HI,
    Basic steps are:

    1) install tsm on the 'other' server
    2) create tsm config which matches the 'live' one - this has to be the same to enable the calls to to TSM api to find the files that were backed up from the other server - google tsm.opt/dsm.opt
    3) create pfile/spfile on other server
    4) startup nomount the new db
    5) fire up rman and connect to 'new' db and recovery catalog
    6) create restore command allocating a tape channel based on the tsm.opt file you have from point 2

    That's a high level view - you should be able to google to find out examples of each step.......

    Cheers,
    Harry
  • 2. Re: Resotring backup from TSM to another server
    safazaurs Newbie
    Currently Being Moderated
    Thanks, now I have an idea where to start.
  • 3. Re: Resotring backup from TSM to another server
    safazaurs Newbie
    Currently Being Moderated
    Sorry for troubling you.

    So, I have two servers where TSM is installed and configuration is the same on both of them (it must be). But then I have another question, I don't have tsm.opt, is it the same as dsm.opt? And also I have four opt files:
    /usr/tivoli/tsm/client/api/bin/dsm.opt
    /usr/tivoli/tsm/client/api/bin64/dsm.opt
    /usr/tivoli/tsm/client/ba/bin64/dsm.opt
    /usr/tivoli/tsm/client/oracle/bin64/dsm.opt
    Which one is correct?

    UPDATED

    I have more questions about this task:
    On that other server (lets call it B) I have to make fresh DB with nothing in there, what about schemas, tablespaces and etc.? And what about pfile/spfile, I have to create them from fresh DB? or I have to copy them from server A db?
    I'm little bit confused.

    Edited by: safazaurs on 2013.28.2 02:08
  • 4. Re: Resotring backup from TSM to another server
    Richard Harrison . Expert
    Currently Being Moderated
    Hi,
    Sorry i didn't mean tsm.opt i meant tdpo.opt. the tdpo.opt is the file you tell rman to use - this then refers to a dsm.opt which in turn is referencing dsm.sys.....

    All you need to create for the 'new' db is a pfile (most of the content of which you can just copy from the other server).

    This can be used to startup nomount the system (all that does is allocate memory and spawn processes - 'creating an instance')

    You can then connect to this with rman and restore the files from the other backup which will create the 'database' including all schemas/tablespaces etc

    Regards,
    Harry
  • 5. Re: Resotring backup from TSM to another server
    safazaurs Newbie
    Currently Being Moderated
    Sorry for millions of silly questions.
    So, Server A TSM (tdpo.opt) should be the same to Server B TSM (tdpo.opt), right? I found that TDPO_NODE is one which differs on both servers, so, on host B I have to make the same TDPO_NODE, right?
    Now it's getting clearer for me
  • 6. Re: Resotring backup from TSM to another server
    Richard Harrison . Expert
    Currently Being Moderated
    Hi,
    Yes - they have to be the same - the files are stored in the tsm catalog relative to this name - if the name is not the same it can;t find the files.

    We generally have a directory on the live server for each db with all the tsm config in - if we need to duplicate to test we copy over the entire directory and use that.

    Cheers,
    Harry
  • 7. Re: Resotring backup from TSM to another server
    safazaurs Newbie
    Currently Being Moderated
    Thanks a lot, need to check everything again and then I'll start to restore :)
  • 8. Re: Resotring backup from TSM to another server
    safazaurs Newbie
    Currently Being Moderated
    Hei.
    All night I had nightmares, because some things aren't clear for me.
    So, for example:

    I have two servers A (for example 10.10.10.1) and B (10.10.10.2), on server A are 7 databases up and running but on server B - 3.
    So, what's my execution plan:
    1) Same TSM configuration on both servers --> tdpo.opt, dsm.pot everything should be the same
    2) I have to create new DB and have to creat spfile/pfile for this new instace with setting which are attached to it, right?
    3) Then I have to startup this new DB in nomount state
    4) run RMAN with command:
    export ORACLE_SID=new_db_sid
    rman targat /
    and now I have question, connect to rman catalog, so how can i do that? rman target / catalog ?
    5) and this part "create restore command allocating a tape channel based on the tsm.opt file you have from point 2", how?

    This doesn't tie up in my head. Maybe you can clear this.
  • 9. Re: Resotring backup from TSM to another server
    Richard Harrison . Expert
    Currently Being Moderated
    Hi,
    You don;t actually have to have a recovery catalog but it makes things easier if you have one - can you find out from someone else if a recovery catalog is in use - most places will use one.

    After the command you already typed

    you'd type connect catalog user/pas@catalog

    the catalog then has all the information about the backups and can identify which files it needs to get from the tapes

    the actual restore command would be something like

    run {
    allocate channel ch1 type 'SBT_TAPE' parms'ENV=(TDPO_OPTFILE=/home/oracle/admin/tdp/tdpo.opt)';
    restore database;
    recover database;
    }

    just make sure you are running this on the right database....

    but this way you end up with a database the same name as the original and you have to rename afterwards

    you are probably better using the duplicate function of rman which will auto rename the database also.

    I give a very brief demo here of that syntax:

    http://dbaharrison.blogspot.de/2011/06/rman-duplicate-of-database-using.html


    Cheers,
    Harry
  • 10. Re: Resotring backup from TSM to another server
    safazaurs Newbie
    Currently Being Moderated
    Sorry for so many silley questions, but I have another one.

    In my case rman catalog database stores 8 or 9 database backup information, so, how can I take that partically one what I need? This confuses me.

    Tom

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points