Perform a SQL Server database move (NetBackup MS SQL Client)
Note:
NetBackup only supports a database move of a backup with FileStream enabled if the backup is stream-based.
A database move lets you use a full set of backup images to copy an existing database to a location under a different name. Database move operations can only be carried out when your selection includes a database image. This move can occur either when you directly select the database backup image, or when NetBackup finds a recovery set that contains a database backup image.
To perform a database move
- Open the NetBackup MS SQL Client.
- Browse for the backup images you want to restore.
- Expand the database instance.
- Select the database backup image that you want to restore.
- From the Scripting list, select Create a move template.
When you create a move script, the capability to perform an immediate launch is disabled. You must edit the script to specify certain destination parameters.
- Click Restore.
- Indicate a file name and click Save > Yes.
- Change the database name in the template to the name of the database to restore to.
For example, replace:
# 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 "DatabaseA"
with:
# 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 "DatabaseB"
- Change the path for the database files that you want to restore.
You must uncomment at least one file. For example, replace:
# Replace the file path <C:\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DBA_FG1_File1.ndf> # with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>. # The target of the MOVE keyword must be "DBA_FG1_File1". MOVE "DBA_FG1_File1" #TO "C:\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DBA_FG1_File1.ndf"
with:
# Replace the file path <C:\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DBA_FG1_File1.ndf> # with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>. # The target of the MOVE keyword must be "DBA_FG1_File1". MOVE "DBA_FG1_File1" TO "C:\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DBB_FG1_File1.ndf"
- Change the database file path.
For example, replace:
# Replace the file path <C:\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DatabaseA.mdf> # with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>. # The target of the MOVE keyword must be "DatabaseA". MOVE "DatabaseA" #TO "C:\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DatabaseA.mdf"
with:
# Replace the file path <C:\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DatabaseA.mdf> # with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>. # The target of the MOVE keyword must be "DatabaseA". MOVE "DatabaseA" TO "C:\Microsoft SQL Server\MSSQL.3\MSSQL\DATA\DatabaseB.mdf"
- Make similar changes to the template for any differential backups or transaction log backups you want to move.
- When you finish modifying the template, save it.
- To run the restore, select File > Manage script files.
- Select the script that you created and click Start > Yes.
More Information
Browsing for SQL Server backup images (NetBackup MS SQL Client)