Backup and Restore of Entire SQL Server 2005 Instance

  • Is there a way to backup and restore an ENTIRE SQL Server 2005 instance? I mean everything - user databases, system databases, the WHOLE database server (instance) itself.

    My first guess was to simply just copy the entire "Microsoft SQL Server" folder (the one located here - C:\Program Files\Microsoft SQL Server) and use that. But a coworker told me that they heard from someone that that may work but it was not a fool-proof method and may miss things and cause other problems.

    So how should I do this? I just need a simple, fast way of bringing a SQL Server instance back to life using a copy. Thanks in advance to all who reply!

  • One more thing - the restore doesn't have to be right to the split second of failure or anything like that. No concerns over differentials, transaction logs, simple, full, etc. Just imagine that the server was taken off line for awhile, a copy was made, the server was then brought back-online but the SQL Server instance fails and the copy is used to rebuild it to it's pre-off-line state. Thanks again.

  • I hope, I understand your requirement correctly. You need to backup all the databases in an instance (both system and user database).

    You can configure the all database backup using SQL Server Management plan.

    Here is a post on how to configure the same: http://ukganguly.spaces.live.com/blog/cns!3DBBCE0B87F1CF26!178.entry

    The above post says how to backup all user databases using maintenance plan. You need to modify the step ix, choose all databases in place of all user databases.

    Hope this may help.

    Thanks & Regards,
    Sudeepta.
    http://twitter.com/skganguly

  • Hi Sudeepta and thanks very much for your reply. I know about the maintenance plan and agree that it's a very useful tool for generating backups. However, I don't believe the maintenance plan provides the ability to restore all the databases at once - you'd have to individually restore EVERY database. With 20+ databases in our SQL Server instance, we'd like something that would be more automated. Also, we'd like the restore to include the instance itself - meaning that this restore plan would re-build everything from top to bottom.

    That's why I was hoping that the idea of simply using a copy of the "Microsoft SQL Server" folder in the "c:\" drive would suffice. But again, I'd heard that that method wasn't fool-proof and could cause problems.

    Does anyone else have anything to add? Thanks again Sudeepta and thanks in advance to anyone else who replys!

  • A) Shutdown all SQL services

    B) Backup files and/or system

    C) Export/backup associated registry items or the entire registry

    D) Startup all SQL services

    If you shutdown all SQL services and perform a full Windows backup including the system state then you can restore the entire system with the sql installation configuration.

    If you shutdown all SQL services, copy all of the data files, (mdf, ndf and ldf), then you can restore to anywhere. If the instance is the same name then copy the data files to the new location and start the SQL services. If the instance is another name you will have to perform a few more tsql steps to synchronize the system to the data file name(s).

    I have a vbs script that generates an xml document which includes the original path and file names for each database, then performs a sql shutdown. Next the document is used to copy the files including the mssql system database files to a backup location. Finally a sql startup is performed.

    The vbs restore routine performs a sql shutdown, then reads the document and restores the files to their original path. Finally a sql startup is performed.

    [font="Arial"]Clifton G. Collins III[/font]

  • If this is for DR, you might not want to have this automated to that level. A DR server potentially will have a different name, different IP addressing, different drive locations, etc.

    You can restore master/msdb to a new server once you've installed SQL Server. Then you can restore databases. Honestly restoring 20 dbs isn't that hard or time consuming. You connect multiple times with query windows and start each restore. Or you have a script to read the backup files and restore them, fix logins, etc.

    There are companies that sell software to do a bare metal restore, including SQL Server and Windows, but I have not had great luck with them, precisely because of differences in hardware.

    Another alternative is a physical to virtual conversion. That will copy everything and get you a complete duplicate, but remember that IP and Windows naming will be in conflict.

  • Big thanks Clifton! I think this might be what the doctor ordered. Really appreciate it.

  • Hi Steve and thanks for your input! This isn't for DR but I liked your solution for restoring the system DBs and then restoring the individual user DBs after installing the instance. Really appreciate your help - have a great day!

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply