question

bfsteel avatar image
bfsteel asked

copying default db and system files as a one time thing

I am required to make copies of the default db files and logs and copies of the system databases their respective log files for a backup company. Is it safe to just take the system off line and copy the files? This is a one time thing and never be done again. Thanks Backups will not work for them.
copy-database
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image ThomasRushton ♦♦ commented ·
Why will backups not work for them? What are they planning to do that they won't be able to run a basic restore process?
4 Likes 4 ·
WilliamD avatar image WilliamD commented ·
For a bare metal restore, wouldn't it be better to have the "naked" server installation (maybe with the system dbs on it) and to take an image of that drive? That way, you have a real copy of the system in its start position. You then restore the user dbs and you're done. The important thing to remember is to keep this image up to date after SPs and the like.
1 Like 1 ·
bfsteel avatar image bfsteel commented ·
Thank all for the responses. They have just requested these files as I understand it to make a bare metal restore. The description I got was they will restore the server, rename boot.ini file with the backup company supplied name, reboot, copy the default db's and start sql server. Then they can restore the db from backup.
0 Likes 0 ·
WilliamD avatar image
WilliamD answered
You can stop SQL Server and copy the files, yes. However, it makes little sense as a backup will be of more help in the case of disaster recovery, as you can restore a db with more control using a backup file than a straight file server copy replace. If by default db you mean system dbs, please don't forget that they receive updates/changes when you patch an instance of SQL Server, so if you were to take these 'backups' and restore them to an instance that had an SP installed you may experience problems. If that is the case, I think even MS support would not be able to help you. A backup like this is basically worthless (in my opinion), because it cannot be restored.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image
ThomasRushton answered
If the version of the server is 2005 or later, then you'll need to make sure that you **don't** also ship the resource database (files: mssqlsystemresource.mdf/ldf), as this contains information that is server-specific, such as the master key and information relating to the version of SQL Server currently installed.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Magnus Ahlkvist avatar image
Magnus Ahlkvist answered
If you really have the demand to send them the actual database files (which makes absolutely no sense ever) you should detach the user databases, copy them to the location where you want them and then reattach them to your instance again. Same thing with Model, and MSDB. With Master database you obviously can't detach, so then you should stop your instance and copy the file. Just stopping SQL Server and copying user database files isn't supported if I understand correctly. What @WilliamD says about Service Pack levels applies regardless. See this KB article for more information about detaching user databases and system databases. It's about moving location of databases but applies just the same if you want to copy the files. **[ http://support.microsoft.com/kb/224071][1]** [1]: http://support.microsoft.com/kb/224071
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.