Video Screencast Help
Search Video Help Close Back
to help

need to restore sql with some specific location

Created: 11 Oct 2012 | 4 comments
WikiDonor's picture
0 0 Votes
Login to vote

 

hi 
 
We are using BE2010R3 and backing up a win2008 r2 sql 2008 R2 server.
 
I want to test a backup of a DB1 with this setup
 
DB1 [mdf file is on D:\mdf folder]
DB1 [LDF file is on e:\ldf folder]
DB1 [Ndf file is on f:\ndf folder]
 
 
The backup is succesfull. Now can I restore this DB1 database as DB2 on same instance
 
DB2 mdf [file should go to d:\mdf1 folder]
DB2 ldf [file should go to e:\ldf1 folder]
DB2 ndf [file should go to f:\ndf1 folder]
 
 
 
Thanks
Prashant Mehta
 

Comments 4 CommentsJump to latest comment

pkh's picture

If you are using the SQL agent to backup the database, then you can use the SQL file re-direction to restore it to another location.

If you just do a flat-file backup, then restoring the files to another location would be of no use because the master database is not updated.

0
Login to vote
  • Actions
WikiDonor's picture

hello PKh

I am backing up DB1 using Sql agent but in the background it is configured this way.

 

DB1 [mdf file is on D:\mdf folder]
DB1 [LDF file is on e:\ldf folder]
DB1 [Ndf file is on f:\ndf folder]
 
But when I redirect i dont get option to specify drives for each data/file. THe restrore will go to same folder what I specify and all 3 files will be restored to same folder with the new db name. Can I get those 3 files go to different partitoin the way I want.
 
 
DB2 mdf [file should go to d:\mdf1 folder]
DB2 ldf [file should go to e:\ldf1 folder]
DB2 ndf [file should go to f:\ndf1 folder]
 
 
Thanks

 

If you find my comment informative and helpful please mark the post as resolved.

0
Login to vote
  • Actions
ZeRoC00L's picture

Just restore them to one location, and move the after the restore is completed.

If this response answers your concern, please mark it as a "solution"

0
Login to vote
  • Actions
nilesh.dhakras's picture

I think that is not supported. Backup of a database is done as a single set and it can be redirected to a single place in its entirety.

0
Login to vote
  • Actions