Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

More backup questions - move option, does it move or just copy?

$
0
0

http://msdn.microsoft.com/en-us/library/ms186858(v=sql.105).aspx

Looking at this example.  So after backing up the database [AdventureWorks2008R2], we then do a restore to a new db [TestDB] using the backup just created.
When the WITH MOVE option is used, does this affect the files for [AdventureWorks2008R2] in any way, or is this simply copying the data and log files to a new location and name?  What would be the result if you didnt use this option?

BACKUP DATABASE AdventureWorks2008R2 
   TO AdventureWorks2008R2Backups ;

RESTORE FILELISTONLY 
   FROM AdventureWorks2008R2Backups ;

RESTORE DATABASE TestDB 
   FROM AdventureWorks2008R2Backups 
   WITH MOVE 'AdventureWorks2008R2_Data' TO 'C:\MySQLServer\testdb.mdf',
   MOVE 'AdventureWorks2008R2_Log' TO 'C:\MySQLServer\testdb.ldf';
GO



Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>