Share via


How to Backup and Restore Companyweb in Small Business Server 2008

[Today’s post comes to us courtesy of Kunal Ghotge, Gagan Mehra, David Copeland, Justin Crosby, and Shawn Sullivan from Commercial Technical Support]

In this post, we will discuss options to backup and restore your SharePoint (Companyweb) site. A good backup and restore strategy is essential for maintaining business continuity when disaster happens.

Available Tools for backup

Tools

User Interface

Backup Type

Windows SharePoint Services: STSADM.exe

Command Line

Full and Differential

Windows SBS 2008 Backup

Graphical

Full and Incremental

Windows SharePoint Services: Central Administration

Graphical

Full and Differential


STSADM

STSADM is a utility that is installed with SharePoint that allows you to perform administrative tasks on your SharePoint sites. By default, it is located in the following path: %ProgramFiles%\Common Files\Microsoft Shared\Web Server Extensions\12\BIN.

Note: You must run these commands from an elevated command prompt.

Backup Process

STSADM –o backup –url <SharePoint url> –filename <backup target file location> –overwrite

For example:
STSADM –o backup –url https://companyweb –filename “D:\backup\companyweb.bak” –overwrite


Restore Process

STSADM –o restore –url <SharePoint url> –filename <backup source file location> -overwrite

For example:
STSADM –o restore –url https://companyweb –filename “D:\backup\companyweb.bak” –overwrite

For more information on STSADM commands, see:
https://technet.microsoft.com/en-us/library/cc288981.aspx

 

Using STSADM with Task Scheduler

Now that we have shown you how to backup SharePoint (Companyweb) using STADM, here is how to schedule those backups so that you always have an up to date backup.

  1. Create a script with the following content and save it as a .VBS file:

    dim dayweek
    dim strBackup
    dayweek = datepart("w",(date))
    strBackup = """C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm""" + "-o backup -url https://companyweb -filename x:\backups\companyweb" + cstr(dayweek) + ".dat -overwrite"
    Set WshShell = WScript.CreateObject("WScript.Shell")
    Return = WshShell.Run(strBackup, 0, true)

    Set WshShell = Nothing
    Important: Substitute x:\backups\companyweb for your desired backup location. You must create this directory before running the scheduled task or it will fail. 

  2. Launch the Task Scheduler

    1. Start –> Administrative Tools –>Task Scheduler.
    2. Click on Create Task in the Action Pane.
  3. Enter a name for the new task and choose Run whether user is logged on or not.

    clip_image002

  4. Click on Actions tab and click on New.. . then ensure the following settings.
    Action: Start a Program
    Program/Script: CScript
    Arguments: Location of the script file which was saved earlier

    clip_image004

  5. Click on Triggers tab and click New to define your backup schedule.

    clip_image008

  6. Click OK.

  7. When it prompts for the password, provide your Administrator credentials.

Note: Make sure that the Administrator account that will run the task has the “Log on as batch job” user right. This can be done using the Group Policy settings. Additionally, when the password for the Administrator account changes in Active Directory, you must update the task with the new password.


Using Windows SBS 2008 Backup

You can also use Windows Small Business Server 2008 backup to backup and restore SharePoint (Companyweb). For information on how to configure Small Business Server 2008 backup to backup your server and SharePoint on a schedule, see: https://blogs.technet.com/sbs/archive/2008/11/03/introducing-sbs-2008-backup.aspx

Backup Now

Once SBS backup has been configured using the above link you will have the ability to create a backup immediately without having to wait for the schedule. To do this:

  1. Open the SBS Console and choose the Backup and Server Storage pane.

  2. Click on Backup now and click OK on the popup that appears.

    clip_image010

    You will be notified once the backup is complete

    clip_image012

Restoring Companyweb
  1. Open the SBS Console and choose the Backup and Server Storage pane

  2. Click the Restore server data from backup task

  3. Select the option to restore This server (Servername) and click Next.

    clip_image014

  4. Select the date and time of the backup job you wish to restore and click Next.

    clip_image016

  5. Under Select recovery type, choose Applications and click Next.

    clip_image018

  6. Select Windows SharePoint Services. You can confirm the details by clicking on View Details. This will show you the files that will be restored.

    clip_image020

  7. Choose the option to Recover to original location and click Next.

    clip_image022

  8. Confirm the selected options and click Recover.

    clip_image024

Once the restore finishes you will see a summary screen.

clip_image026

You can also use the SharePoint Central Administration site for backup and restore. However, we recommend using the above methods on Small Business Server 2008. For more information on the use of the SharePoint Central Administration site for backup and restore, please visit the following link: https://technet.microsoft.com/en-us/library/cc288396.aspx