Friday, February 16, 2007

Site Restoration with stsadm - WSS 3.0 RTM

Ok,
I had the urge to restore the complete data on the server where WSS 3.0 Beta 2 TR was installed. The reason being that the upgrade to WSS 3.0 RTM was messed. If you have come to this post of mine, then i hope you might have seen my previous post about Fresh installation of WSS 3 RTM. I also mentioned there how to backup an existing site and all its data with "stsadm.exe".

In this post i will tell you how to restore a backed up site onto a new server or an existing site using "stsadm.exe". Restoration is pretty simple as the whole work is taken care by stsadm utility. But, issuing the command with correct details is critical. There are 3 scenarios that i will be explaining.

Scenario - 1:
You want to restore the site backed up on to a TOTALLY NEW SERVER WITH NEW SITE but uses the same configuration database as the existing ones.

Restore using:

"stsadm.exe -o restore -url http://my_new_server_name/site -filename mysitename.dat"
-url = The new site name that you want to have. (generally the computer name)
-filename = the previously backed up site data file.

This simple command will restore the backed up site on to the new server with the url specified. Remember, that the restoration will be successful if the structure of the site is the same as the old ones. If not, this operation fails.

Secondly, if you want to have all the content of the old site on the new site. Meaning, you dont want to have a seperate site configured (just the replica) on the new server then use the "overwrite" switch with the above command.

"stsadm.exe -o restore -url http://my_new_server_name/site -filename mysitename.dat -overwrite"

Scenario - 2 and 3:
You want to restore the site backed up on to the same SERVER WITH or WITHOUT A NEW SITE

This restoration is no different from the above scenario. The only thing to take care is that the correct parameters are provided to stsadm.exe.


Remember that using the "-overwrite" switch will totally ERASE the existing content on the new site or server where restoration is done.

I hope you liked this article. Any suggestions or feedback is most welcome.

thanks,
-Kiran Mantrala

Fresh Installation of WSS 3.0 RTM

Legend:
WSS = Windows Sharepoint Services

Folks,
In the recent times i have seen that Sharepoint Technology is picking up immensely. Mainly because of its ease of Setup and Use. If you need to have a personalized home page which has all the information about you, your interests, your hobbies and all about you, then just install the sharepoint service and follow couple of steps and booom .. you are ready with the content. You can use pre-defined templates which are really funky too. Interesting right !! You can even publish this content onto INTERNET too and this has been a phenomenal change compared to the previous releases of sharepoint.

So, focussing on the main point of installing WSS 3.0 RTM on a fresh server was a cake-walk for me. But, on the contrary I tried and failed miserably to upgrade a WSS 3.0 Beta 2 TR to WSS 3.0 RTM. The process was so buggy and i could never figure out the reason why it failed. Neither the log gives good debug info nor there are any articles around which could solve the peculiar error i got.

Error was something related to Timer the first time i ran the Configuration wizard. I gave it a try once again after modifying some settings in the wizard, but then as the retrials went by i got different errors each time. I know how it feels and pains to see that something important at your work place doesnt work !!!

So, like the king Ghajini i dint lose hope and tried to re-install the RTM on a fresh box. I had to take utmost care to preserve the previous data and templates used in WSS 3.0 B2TR version. The best way is to use the EXCELLENT command line utility "stsadm.exe". This is generally present in: "%programfiles%\Common Files\Microsoft Shared\Web Server Extensions\12\Bin" folder. The command is:

"stsadm.exe -o backup -url http://myserver_name/site -filename mysitename.dat"

-url = The site which is configured on the WSS 3.0 B2TR installed box.
-filename = Any name which is convenient for you. (e.g) mysitename.dat
You can even backup the site onto a remote share with the above command.

Now after taking the backup of the whole site, i moved on to the fresh box where i wanted to install WSS 3 RTM. Before installing WSS 3.0 RTM on the box, make sure that the OS is WINDOWS 2003 Server with all the Windows Updates properly applied. Also, IIS, .NET 2.0 and .NET 3.0 should be installed. All the required binaries for the Workflow module to properly work are installed along with .NET 3.0. In previous WSS releases the user had to explicity install the Worflow Management Foundation binaries.

If you will be configuring your service installation to accept Incoming and Outgoing emails, then have the SMTP service also installed. You can do this by Adding the service from windows components module. [sysocmgr /i:%windir%\sysoc.inf]. Any other services which can work with WSS can also be installed.

Download the WSS 3.0 exe from Microsoft and double click it to start the installation. Accept the EULA and click Next. Choose the type of installation you want to. Basic or Advanced. I chose Advanced because i will be installing couple of other servers later to join the WSS wagon. More info about the installation can be obtained from: https://www.microsoft.com/resources/virtuallabs/midconsole.aspx?SiteId=t&LabId=be61e32d-10d2-416d-98d3-de86b8e1c89c&CID=&Token=&ABCCID=&ABCToken=&BToken=&RequestId=6ffa906a-55e8-4ee4-9ef1-567b770f7e58. This is a virtual lab tutorial and you need to register to know about the installation. Choose the type of installation.

I followed the above steps and was successful in installing on a fresh box. Still, i feel bad that the upgrade from B2TR to RTM dint work for me. These are the simple steps that i followed to install Fresh WSS 3.0.

You might be wondering why i have backed up site and when i have not indicated the reason. You can get to know more information about this in my other blog, which talks about restoration of sites in WSS.

I welcome your valuable feedback and suggestions who ever has read this blog.

thanks and happy WSS installation.

-Kiran Mantrala