views:

299

answers:

1

Hi,

I am using SharePoint to build a website and I am looking into the backup / restore solution. The website is hosted on a set of virtual machines (one VM for the web front-end, one VM for SQL Server).

I have a backup of these VMs in a base state (fresh install of WSS and SQL, no web application created, etc.)

What I would like to have is a backup that I can restore on the base state VMs.

I have tried restoring different ways (from SQL, SharePoint UI, stsadm.exe). This doesn't seem to work because we have a number of custom solutions (wsp) deployed on the server and these are not restored. This technet article says that of all the tools offered, not a single one supports restoring the central administration configuration database.

I need an option that I can rely on if the I lose the VMs completely (I would rather not backing up the whole VM though).

Restoring the databases in SQL doesn't do it because I lose my custom solutions, restoring either from the central administration or from stsadm doesn't work because it doesn't resotre the solutions and the central administration database...

How do other people backup their SharePoint systems?

Thanks!

+2  A: 

Most probably you cannot find backup/restore tools that allow restoring configuration database because it is considered a bad practice. When you migrate or restore a farm, you fist create a new configuration database, then reattach the content databases which are configuration independent.

So, a good option is to prepare everything else and then attach the content databases. Several good scripts for scripted installs of SharePoint can be found on the web, I've used an adopted version of this one: http://josephfluckiger.blogspot.com/2009/01/scripted-sharepoint-install.html

In fact, you can script nearly everything, just you have to define the "everything" for your case. What I can think of:

  • IIS metabase configuration, which can be obtained by using iisback.vbs
  • web.config files from wwwroot
  • custom feature files from c:\program files\common files\microsoft shared\web server extensions\12\template\features (but you can restore them by calling "stsadm -o upgradesolution" to any of your .wsp files)
  • custom templates, also from \12\template\controltemplates
  • images from \12\template\images (and actually, everything you have ever put under \12\ direcctory)
  • assemblies required in GAC (but these can also be restored when you call "upgradesolution)
naivists
So whenever you deploy solutions, you save them with your backup so that you can re-deploy them before restoring your backup? This sounds acceptable but the script would need to be updated when we add a solution, etc. Thanks for your answer though, helped me a lot. And awesome blog post about the scripting!
Hugo Migneron
In my deployment, we always build .wsp files from a compilation script (using wspbuilder, http://www.codeplex.com/wspbuilder). So, when you install something new, just grab the code from SourceSafe and build new WSPs. Then, call "upgradesolution" and sharepoint copies all files where appropriate (assemblies to GAC, features to features etc)
naivists
I am a bit disappointed with the options offered by sharepoint. Usually when you have to restore it's because there isn't a whole lot going well, I would of liked a solution that doesn't involve a script (a one-click restore button) but as it's not offered, this is what I have to use (either that or backup the whole VM). Thanks!
Hugo Migneron