Friday, November 11, 2011

Creating batch file and scheduling it for backup ssp

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 sites for the farm to C:\backup
    echo ===============================================================
    cd \Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
    @echo off
    stsadm -o backup -directory <\\server name\folder name> -backupmethod full -item <database name> 
    echo completed
    where \\server name\folder name is the UNC path to the backup folder and where SSP name is the name of the SSP that you want to back up, for example: SharedServices1.
  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. ( To open Scheduled Tasks, click Start, click All Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.)
  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 the frequency of this task (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 click Finish. You can then change the program being run on the Task tab, fine-tune the schedule on the Schedule tab, customize settings on the Settings tab, or set user and group permissions on the Security tab.

No comments:

Post a Comment