Tuesday, May 12, 2009

Let's Talk about .. MOSS2007-Back up SharePoint FULL with Scheduled Tasks

Yesterday, I was assigned to perform a back up schedule for MOSS.

The concept is full backing up for SharePoint and Site Collection backing up for each site collection.

P’Pop Wantit Tangrugsasut, senior system analyst from CS division, teached me about a concept and how to do it.


The instruction to back up Site Collection as Scheduled Task
-Create a shared folder name “ERP_MOSS_Backup”. It must be shared and added permission to write the files to the Admin account.
-Write a script at the Database server for creating folder.

[Batch file]

@ECHO OFF

FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET mydate=%%J%%K%%L

cd \

F:

cd "Moss_Backup"

mkdir "Moss_Backup_%mydate%"

-Save it at that Folder
-Set the Scheduled Task for the script by this instruction http://natttech.blogspot.com/2009/05/lets-talk-about-windows-server-2003.html
-Write a script to Back up MOSS (FULL)

[Batch file]

@ECHO OFF

FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET mydate=%%J%%K%%L

cd \

c:

cd "c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\"


STSADM.exe -o backup -directory \\[SERVER_NAME]\[FOLDER_NAME]\Moss_Backup_%mydate% -backupmethod full

Where [SERVER_NAME] is your server name to put the backup files there
And [FOLDER_NAME] is your folder you wanna put the backup files

-Or Write a script to Back up Site Collection MOSS
[Batch file]

@ECHO OFF

FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET mydate=%%J%%K%%L

cd \

c:


cd "c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\"


stsadm.exe -o backup -url http://[MOSSWebApp]/Sites/[SiteCollection_NAME] -filename "\\[SERVER_NAME]\[FOLDER_NAME]\Moss_Backup_%mydate%\[FILE_NAME].dat" –overwrite

Where [SERVER_NAME] is your server name to put the backup files there
And [FOLDER_NAME] is your folder you wanna put the backup files
And [FILE_NAME] is your backup file name



No comments: