NetBackup for Microsoft SQL Server: Performing a database move to the same or alternate SQLHOST

Article: 100016695
Last Published: 2022-07-11
Ratings: 23 3
Product(s): NetBackup & Alta Data Protection

Description

How to perform a database move to the same SQLHOST or to an alternate SQLHOST in NetBackup for Microsoft SQL Server

Overview

Performing a "database move" allows the use of a full set of backup images to copy an existing database to a new database having a different name. This can be accomplished by creating and modifying a move template.

Note: A move template is optional when moving databases from one host to another if it is going to the same identical server configuration where the database name and data files are in the same path as the source. In this case, a simple restore script is sufficient.

Note: When restoring over an existing database, the online database must be taken offline prior to initiating the restore.

The administrator can allow a redirected restore by completing the following steps on the master server:

  • Create this directory: install_path\NetBackup\db\altnames\
  • Inside the altnames directory, create a zero byte "touch file" called: No.Restrictions

It is also possible to restrict clients to restore only from certain other clients by creating a zero byte "touch file" called <client_name> in the directory install_path\NetBackup\db\altnames\<client_name>; where <client_name> is the name of the client allowed to do the redirected restore.

To perform a Database Move to the same SQLHOST (i.e., the original backup client)

On the Source Client:

  1. Click Start | Programs | Veritas NetBackup | NetBackup Agents | NetBackup MS SQL Client (Figure 1)

    • Figure 1
      Image

  2. Ensure that the SQL Server connection properties are set up correctly. From the NetBackup Database Extension GUI, click File | Set SQL Server connection properties (Figure 2)

    • Figure 2
      Image

  3. From the NetBackup Database Extension GUI, click File | Restore SQL Server objects (Figure 3)

    • Figure 3
      Image

  4. In the Backup History Options dialog, select the desired time filter settings. Set SQL Host to the name of the backup source client (e.g. "LAB"). Set Source Client to "<same as SQL Host>".
     
    Note: The source and destination client are the same when the restore is run from a standalone SQL server that is the source SQL Host.
     
    However, when browsing backup images from a clustered SQL server, set the SQL Host to the Active cluster node, and set the and Source Client to the SQL virtual cluster server name or the client name specified in the backup policy to the BROWSECLIENT name specified in the backup script. Make sure the correct upper/lower case is specified in these fields. It is case sensitive when browsing images from a UNIX/LINUX master server.

    • Figure 4
      Image

  5. Click OK

  6. From the Restore Microsoft SQL Server Objects screen, select the database to restore (Figure 5)

    • Figure 5
      Image

  7. Set Restore options:

    • Scripting: Create a move template
    • Recovery: Recovered (if logs or differential backups need to be restored, the Recovery option should be set to Not recovered until the last backup set is restored)
    • Restore Script: Save
  8. Click Restore and save the file. When prompted, click Yes to open the file in Notepad and make the necessary modifications (Figure 6).

    • Figure 6
      Image

  9. Save the modified script and cancel the "Restore Microsoft SQL Server object" dialog

  10. From the NetBackup Database Extension, select File | Manage script files, then select the move template from the list and click Start to begin the restore operation

To perform a Database Move to an alternate SQLHOST (redirected restore):

On the alternate SQLHOST:

  1. Click Start | Programs | Veritas NetBackup | NetBackup Agents | NetBackup MS SQL Client (Figure 7)

    • Figure 7
      Image

  2. Ensure that DBMS login is set up correctly. From the NetBackup Database Extension GUI, click File | Set SQL Server connection properties (Figure 8).

    • Figure 8
      Image

  3. From the NetBackup Database Extension GUI, click Actions | Restore (Figure 9)

    • Figure 9
      Image

  4. In the Backup History Options dialog, select the desired time filter settings. Set SQL Host to the name of <local> restore destination client name (e.g. "LAB1"). Set Source Client to the backup source client name (e.g. "LAB").
     
    Note: When configuring a MS-SQL re-directed restore to an alternate standalone SQL Host, the SQL Host is the <local> destination client (where you are logged on to run the restore), and the Source Client is the original SQL backup source client.
     
    However, when browsing backup images from a clustered SQL server, set the SQL Host to the Active cluster node, and set the Source Client to the SQL virtual cluster server name or the client name specified in the backup policy to the BROWSECLIENT name specified in the backup script. Make sure the correct upper/lower case is specified in these fields. It is case sensitive when browsing images from a UNIX/LINUX master server.

    • Figure 10
      Image

  5. Click OK

  6. From the Restore Microsoft SQL Server Objects screen, select the database to restore (Figure 11)

    • Figure 11
      Image

  7. Set Restore options:

    • Scripting: Create a move template
    • Recovery: Recovered (if logs or differential backups need to be restored, the Recovery option should be set to
    • Not recovered until the last backup set is restored)
    • Restore Script: Save
  8. Click Restore and save the file. When prompted, click Yes to open the file in Notepad and make the necessary modifications (Figure 12).

    • Figure 12
      Image

  9. Save the modified script and cancel the "Restore Microsoft SQL Server object" dialog

  10. From the NetBackup Database Extension, select File | Manage script files, then select the move template from the list and click Start to begin the restore operation

Note: If you're unable to browse successfully backed up SQL Server Availability Group databases, please see the Related article below (100046841).

Was this content helpful?