Forum Discussion

nandolester's avatar
11 years ago

Netbackup SQL restore to a different host/path and instance

Hello Everybody,

 

I'm trying to configure the online backup for sql at my company but are facing some problems.

I could create the scrypts to backup and to restore to the same host to different intance as normal.

Now i need to do a restore from one host to another in a differente instance.

Follow all my environment configuration and prints...

**

HostA: SAOS005060015 (backup source)

HostB: SAOS00506006 (destination source)

**

HostA database path: G:\MSSQL.3\MSSQL\Data\ATLAS.mdf

HostB Database path: F:\MSSQL\Data\ATLAS.mdf

**

Both servers are Windows Server 2003 / SQL 2005

**

Restore Script - (Move template selected)

 


#  This is a template for the database MOVE command.

OPERATION RESTORE
OBJECTTYPE DATABASE
RESTORETYPE MOVE

#  Replace the database name in the following line with the name of the database that you
#  want to move to. Also remove the hash mark <#> which precedes the keyword <DATABASE>.

DATABASE "ATLAS"
#
#  Replace the file path <G:\MSSQL.3\MSSQL\Data\ATLAS.mdf>
#  with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>.
#  The target of the MOVE keyword must be "ATLAS_Data".
MOVE  "ATLAS_Data"
TO  "F:\MSSQL\Data\ATLAS.mdf"
#
#
#  Replace the file path <G:\MSSQL.3\MSSQL\Data\ATLAS_log.ldf>
#  with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>.
#  The target of the MOVE keyword must be "ATLAS_Log".
MOVE  "ATLAS_Log"
TO  "F:\MSSQL\DataATLAS_log.ldf"
#
# The following image is type: Full
NBIMAGE "SAOS00506015.MSSQL7.SAOS00506015\INSTANCED.db.ATLAS.~.7.001of001.20140114164322..C"
SQLHOST "SAOS00506015"
SQLINSTANCE "INSTANCEB"
NBSERVER "BNPBKP1"
BROWSECLIENT "SAOS00506006"
MAXTRANSFERSIZE 6
BLOCKSIZE 7
RESTOREOPTION REPLACE
RECOVEREDSTATE NOTRECOVERED
NUMBUFS 2
ENDOPER TRUE

**

NBU user has Admin access on both server and SQLs

**

Created the files No.Restrictions and SAOS00506006 (destination server) in <install path>\Veritas\NetBackup\db\altnames

**

I've followed the Admin Guide for SQL but when i try a restore with those script the NBU return error status 5

1/16/2014 4:38:21 PM - begin Restore
1/16/2014 4:38:24 PM - Info dbclient(pid=3828) INF - Results of executing <C:\scripts\restore atlas.bch>:     
1/16/2014 4:38:24 PM - Info dbclient(pid=3828) <0> operations succeeded. <1> operations failed.      
1/16/2014 4:38:44 PM - Info dbclient(pid=3828) INF - Error removing ODBC data source name DSN=NBMSSQL_3828_4760_2   
1/16/2014 4:38:44 PM - Info dbclient(pid=3828)     CONTINUATION: - Invalid DSN    
1/16/2014 4:38:44 PM - Info dbclient(pid=3828)     CONTINUATION: - Driver's ConfigDSN, ConfigDriver, or ConfigTranslator failed

 

What else should i do to make this working?

  • Log on to the server where you want to restore (SAOS00506006) and run it from there.

     

    BROWSECLIENT   'Restores images from a host other than the local host.'

    so it must point to the original server 

     

    also change

    TO  "F:\MSSQL\DataATLAS_log.ldf"

    to

    TO  "F:\MSSQL\Data\ATLAS_log.ldf"

    (missing backslash)

     

    and make sure the path F:\MSSQL\Data\ exists on SAOS00506006

7 Replies

  • Hi wr,

     

    But where should i put the destination server? If i change the BROWSECLIENT to the same as the source it will do the restore to the same server, doesn't it?

  • Log on to the server where you want to restore (SAOS00506006) and run it from there.

     

    BROWSECLIENT   'Restores images from a host other than the local host.'

    so it must point to the original server 

     

    also change

    TO  "F:\MSSQL\DataATLAS_log.ldf"

    to

    TO  "F:\MSSQL\Data\ATLAS_log.ldf"

    (missing backslash)

     

    and make sure the path F:\MSSQL\Data\ exists on SAOS00506006

  • Hi wr,

     

    After made the changes that you mentioned the restore was completed but when i verify the SQL the database reports ("restoring") and does not finish. I left about 2 hours to verify if it would finish but no.

    Do you know what should be?

    ScreenHunter_076.gif

  • Database in 'restoring' mode means that you chose to restore without Transaction Logs (Not Recovered).

    See http://www.symantec.com/docs/TECH45390 
    ('loading' is same a 'restoring')

    extract:


    If the database is in a loading state and needs to be restarted, log into the Microsoft SQL Query Analyzer and run the following command, entering the name of the database in place of <database_name>: 

    restore database <database_name> with recovery

    This command restarts the SQL database and takes it out of a loading state.