robinrai3 (1/5/2012)
Hi Guys,When you take a backup, i assume it backs up all the data from all the files
into a single bak file and internally it must in some header logically store
the file group information and which data lies on which file.
If you wish to restore this database to another server
Would have to re-create the database first with the exact structure before attempting
the restore ? Or is it smart enough to work it all out and as long you have the same
directory structure it will it do the business
the backup stores all the information about the file structure. You do not need to create an empty database before restoring a database. As long as the space is available and a matching directory structure is set up, the restore will succeed.
So the following simple command is enough to restore a database no matter how complicated the file structure
restore database yourname from disk = 'path to backup'
In other words having multiple files does not have to make your backup\restores complicated.
If you don't have a matching directory structure you would need to add a 'move' clause to the restore command for each file which did not have a matching drive\directory.
note : its best to start new questions in a different thread.
---------------------------------------------------------------------