Monday, July 27, 2009

Schedule backups in MOSS(SharePoint 2007)

It is not possible to schedule backups from the SharePoint Central Administration Web site. There is no operation that enables you to automate backups by using the Stsadm command-line tool. You can, however, automate the process by creating a batch file and then using Task Scheduler in Microsoft Windows Server 2003 to run the batch file at a specific time. Because performance can be affected when doing backups with the Office SharePoint Server 2007 for Search built-in tools, you might want to schedule your backups for off-peak times such as at night or on weekends.

Use this procedure to create a batch file that will run a full backup of your Office SharePoint Server 2007 for Search server farm. This procedure assumes that you have already created a shared folder for your backups. For more information about how to create a shared folder, see Prepare to back up and restore a farm (Search Server 2008).

utomate or delay backup of your farm

Tip Tip:

To run the Stsadm command-line tool, you must be a member of the Administrators group on the local computer. When using Task Scheduler, ensure that the system date and time on your computer are accurate. To verify or change this information, double-click the time indicator on the taskbar.

Create a batch file

  1. Click Start, and then click Run.

  2. Type notepad, and then click OK.

  3. In Notepad, type the following text:

    @echo off echo =============================================================== echo Back up the farm to C:\backup echo =============================================================== cd %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\BIN @echo off stsadm.exe -o backup -directory "\backup" -backupmethod full  echo completed
    Note Note:

    Change "C:\backup" and "\backup" to the name of your backup shared folder.

  4. In Notepad, on the File menu, click Save As.

  5. In the Save As box, select the folder where you want to keep your batch file.

  6. Using the ".bat" file name extension, type the name of the file in the File name box, for example,backup_batch.bat.

  7. In the Save as type box, click All files.

  8. Click Save.

Schedule a backup

  1. Start the Scheduled Task Wizard, and then click Next.

  2. Click Browse, navigate to the batch file that you just created, and then click Open.

  3. Type a name for your task, for example, backup_batch.

  4. Select how often you want this task performed (for example, weekly), and then click Next.

  5. To automatically perform this backup periodically, select an interval such as Weekly or Monthly. To perform this backup one time, or to delay a single backup, select One time only.

  6. Choose a time and start date for your backup.

  7. Type a name and password for a user, and then click Next. This task will run as if it were started by that user.

  8. Click Finish.

    To configure advanced settings for the task, select the Open advanced properties for this task when I click Finish check box in the final page of the wizard. This opens the properties dialog box for the task when you clickFinish. You can then change the program being run on the Task tab, fine-tune the schedule on the Scheduletab, customize settings on the Settings tab, or set user and group permissions on the Security tab.

No comments: