Scripts to backup and restore SharePoint 2007
I can add this to my arsenal of SharePoint Scripts. Just perfect.
FULL_BACKUP.BAT – Use Control Panel – Scheduler to run once a week. Don’t forget the ‘Run As’ account also needs write access to the backup location, in addition to the Central Admin app pool identity, and the SQL Server Machine account. This command will backup the entire farm to the following file share. Don’t use drive:\directory format.
–Start–
“c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm.exe” -o backup -directory \\servername\backupshare -backupmethod full
–end–
DIFF_BACKUP.BAT – Use Control Panel -Scheduler to run when you want differential backups. Remember the same security as above, but also it will fail if you add a content DB or Web App since the last FULL backup.
–start–
“c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm.exe” -o backup -directory \\servername\sharename -backupmethod differential
–end–
IIS_MetaBase_Backup.BAT – This is used to backup your IIS Configs to each IIS server, in their respective ‘metaback’ directories. Just add an additional line for each server you want to backup. It will create a backup of the metabase called ‘WeeklyBackup’ with a version appended. The password doesn’t matter, it just makes the backup portable.
–start–
cscript.exe %systemroot%\system32\iisback.vbs /s servername /u domain\username /p userpassword /backup /b WeeklyBackup /v NEXT_VERSION /e password
cscript.exe %systemroot%\system32\iisback.vbs /s servername2 /u domain\username /p userpassword /backup /b WeeklyBackup /v NEXT_VERSION /e password
cscript.exe %systemroot%\system32\iisback.vbs /s servername3 /u domain\username /p userpassword /backup /b WeeklyBackup /v NEXT_VERSION /e password
–end–
As Ben says, use at your own risk.
Stay tuned, subscribe via email
Enjoyed this article?
Subscribe to our Free Newsletter and never miss a byte!
- I WANT OPEN WIDOWS LIVE HOTMAIL PLUS PLEASE HELP ME ....
- Unable to uninstall WINDOWS LIVE on my Mac Powerbook. The "...
- You are welcome....
- I could not agree any less. Today I have used Bing for most ...
- I've been using Bing for 2 weeks now and must admit I've lov...
- Brilliant!!! Thanks for the help to create HTML file as sogn...
- Text on a gradient? Where's my code view? Brown?!? I guess I...
- I could not get it to work. I am on a SMB 2003 r2 in portugu...
- Thanks Sebastin for detailed update...
- In Vista, the files are located in 2 locations c:\users\u...




Scripts to backup and restore SharePoint 2007 - SHAREPOINTBlogs.com Mirror said,
Wrote on March 7, 2008 @ 4:09 am
[...] account also needs write access to the backup location, in addition to the Central Read More……(read more) Del.icio.us | Digg [...]
raghu said,
Wrote on March 7, 2008 @ 8:16 pm
good. keep it up
Schedule Moss 2007 Backups | keyongtech said,
Wrote on January 19, 2009 @ 2:51 am
[...] Schedule Moss 2007 Backups http://alpesh.nakars.com/blog/script…arepoint-2007/ — Alpesh Nakar blog: http://alpesh.nakars.com "TheWall" wrote: > SQL Maint [...]