Tuesday, June 30, 2009

Backup Restore in Server Farm (Recover disaster in MOSS)

This post will help you when your SharePoint Central administrator site has got disappeared suddenly from IIS / not opening or corrupted yet all rest of the sites are working well.
Following solution will also let you know, how to take farm backup in SharePoint Server farm?
Ok guys then you need to follow the following steps to get it back.
First take full backup of your farm.
To take a backup of your farm when you have suppose two SharePoint Servers and One database server
1. Server A at 192.168.1.1 IP
2. Server B at 192.168.1.2 IP
3. Database Server C at 192.168.1.3 IP
So create one folder at Server B (192.168.1.2) C:\Backup name it “Backup” right click it and Share this folder and give rights to “Every one user”.
stsadm –o backup –directory -backupmethod
Fire command stsadm –o backup –directory file://192.168.1.2/c$/backup -backupmethod “full”
Here, we are taking backup for our safety so that we can recover if any thing wrong happen.
Ok, good after taking backup take a backup of your all virtual directories because next step is to run SharePoint configuration wizard so it may replace your web.config in virtual directories so it is safe to take backup of virtual directories.
Now run SharePoint configuration wizard on any server. Select use existing server farm and select the same configuration database let wizard finish all steps.
Cheers, hope it will work for you.
Let us know your feedback through comments or mail us if this solution works for you it will encourage us to write more articles.

Backup and Restore Site Collection in MOSS 2007

Here are the stsadm commands that will be useful to backup and restore site collections in MOSS.
Backup Site Collection
First go to command prompt and set the following path:

c:\program files\common files\microsoft shared\web server extensions\12\bin

This is the folder in which the stsadm.exe is present.
After setting this path write the following command:

stsadm -o backup -url http://servername:portnumber/sitecollectionName -filename
pathofDestinationFolder/NameofBackupFile

You will need proper rights on the content db to take backup
Restore Site Collection
Set the path as shown in the above example.
After setting the path the process is:

I am taking an example of restoring collaboration portal. Before executing the restore command create a web application and create a site collection with collaboration portal as site template. Here is the command:

stsadm -o restore -url http://servername:portnumber/sitecollectionName -filename pathOfBackupFile -overwrite
writing -overwrite is mandatory else it will give error.
Again you will need proper rights on the content db to execute restore command.

How to publish a sites in SharePoint Designer 2007

• Start SharePoint Designer 2007, Expression Web, or FrontPage 2003, and then open your Web site.
• On the File menu, click Publish Site.
• In the Remote Web Site Properties dialog box, click File System under Remote Web server type.
• In the Remote Web site location box, use one of the following procedures:
• Type the location of the remote Web site that you want to publish folders and files to.

For example, type C:\My_Website, or type \\MyNetworkShare\My_Website if the location is on a file server.
• Click Browse to locate a folder on your hard disk or on a file server.
• To configure the properties of the Web site, use either of the following methods:
• To remove specific types of code from Web site pages as they are being published, click the Optimize HTML tab, and then select the options that you want.
• To change the default options for publishing, click the Publishing tab, and then select the options that you want.
• Click OK.