Tag «stsadm -o restore»

SharePoint Site Backup and Restore using STSADM

stsadm-backup

Scenario: Backup a site collection and restore it on a different server or on the same server. Preface: Let’s build some a simple batch file here. First declare the constants. Notice the BACKUPFILENAME variable. This lets you build the file name as YYYY_MM_DD_BACKUP.BAK Code: @SET STSADM=”c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm” @SET MAINSITEURL=”http://servername” @SET BACKUPFILENAME=”C:\SiteBackUp\%date:~10,4%_%date:~4,2%_%date:~7,2%_backup.bak” …