Back up databases (Office SharePoint Server)
Applies To: Office SharePoint Server 2007
This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.
Topic Last Modified: 2016-11-14
This document guides you through the process of using Microsoft SQL Server 2005 tools or SharePoint Products and Technologies built-in tools to restore a database.
Back up databases by using Office SharePoint Server 2007 built-in tools
Use this procedure to back up a database by using the SharePoint Central Administration Web site.
To back up your farm using SharePoint Products and Technologies built-in tools, you must use the following accounts and permissions:
You must be logged on to the server that runs the SharePoint Central Administration Web site.
You must have a shared folder that you will use to store the backup files. For more information about preparing for backup, see Prepare to back up and restore a farm (Office SharePoint Server 2007).
You must be a member of the Farm Administrators SharePoint group to complete the following procedure.
Back up a database by using the user interface
On the SharePoint Central Administration Web site, on the Operations page, in the Backup and Restore section, click Perform a backup.
On the Select Component to Backup page, select the check boxes for the databases you want to back up. Click Continue to Backup Options.
On the Select Backup Options page, a differential backup backs up data created or changed since the last backup. If you are performing a combination of full and differential backups, restoring will require you to have the last full backup, the last differential backup, and intervening differential backups.
In the Backup Content section, verify that the database you selected is displayed.
In the Type of Backup section, select Full.
In the Backup File Location section, type the UNC path of the backup folder.
You can view the backup job status on the backup status page by clicking Refresh. The page also refreshes every 30 seconds automatically. Backup and recovery is a Timer service job, so it may take few seconds for the backup to start.
If you receive any errors, you can find more information by looking in the spbackup.log at the UNC path you specified above.
Use this procedure to back up a Web application by using the Stsadm command-line tool.
Membership in the Administrators group on the local computer is the minimum required to complete this procedure.
You must be a member of the Administrators group on the local computer to complete the following procedure.
Back up a database by using the command line
On the drive on which SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin.
If you do not already know what node you want to back up, type the following command:
stsadm –o backup –showtree
Items enclosed by square brackets ([ ]) cannot be directly selected for backup, but are backed up when their parent item is selected.
To back up a database, type the following command:
stsadm -o backup -directory <\\server name\folder name> -backupmethod full -item <database name>
where \\server name\folder name is the UNC path to the backup folder and where database name is the name and node of the database that you want to back up, for example: WSS_Content_407f26d96bbf4158b2802a599ecfb718.
If the backup completes successfully, the command window displays the following text:
Completed with 0 warnings.
Completed with 0 errors.
Backup completed successfully.
Operation completed successfully.
If there are errors or warnings, or if the backup does not complete successfully, review the spbackup.log file in the folder that you specified in step 3.
Back up a server farm by using SQL Server
You must be a member of the db_backupoperator fixed database role to complete the following procedures.
Back up a server farm by using SQL Server
Start SQL Server Management Studio and connect to the database server.
In Object Explorer, expand Databases.
Right-click the configuration database (usually named SharePoint_Config), point to Tasks, and then click Back Up.
In the Back Up Database dialog box, select the type of backup that you want to perform from the Backup type list. For more information about which backup type to use, see Overview of Recovery Models in the SQL Server 2005 Books Online.
Under Backup component, select the Database option.
In the Name text box, type a name or use the default.
In the Description text box, type a description of the backup.
Under Backup set will expire, specify how long the backup should be kept, or use the default. When the backup set expires, the backup set can be overwritten by any subsequent backups with the same name. The backup set is set to never expire (0 days) by default.
In the Destination section, specify a location to store the backup set, or use the default.
Click OK to back up the database.
Repeat steps 3 through 10 for each of the databases you want to back up.
Schedule a delayed or recurring backup
In the Backup Database dialog box, after you have entered the database backup information (see the “Back up a server farm by using SQL Server” procedure above), click the arrow to show the Script menu, and then click Script Action to Job.
In the New Job dialog box, in the Select a page pane, click Schedules, and then click New.
In the New Job Schedule page, specify a name, type, frequency, and duration that you want for the scheduled backup, and then click OK.
Click OK to accept the scheduled job changes.
Click OK to save the job changes and start the database backup.
For more information about how to schedule a database backup, see How to schedule a database backup operation by using SQL Server Management Studio in SQL Server 2005 (http://go.microsoft.com/fwlink/?LinkId=109568&clcid=0x409).