Monday, April 7, 2008

Useful STSADM commands

path to STSADM is
cd C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN

addcontentdb
stsadm -o addcontentdb -url URL [-databaseserver servername] –databasename databasename [-DatabaseUser username -DatabasePassword password] [-SiteWarning number] [-SiteMaximum number] [-SearchServer servername]

stsadm -o addcontentdb -url http://srv007:42464 -databasename Sharepoi1_SITE

stsadm.exe -o restore -url http://srv007:24003 -filename c:\backup\migrera-SRV005-ComSolut1_SITE.SPB

create a new site using a template in another language (in this case... surprise, Swedish!!)
stsadm.exe -o createweb -url http://server:port/sitename
-lcid 1053

export a site with version history and security remained
stsadm.exe -o export -url http://url/site -filename c:\backupsite\ds.bak -includeusersecurity -haltonfatalerror -versions 4

import a site with version history and security remained
stsadm.exe -o import -url http://url/site -filename c:\backupsite\ds.bak -includeusersecurity -haltonfatalerror -updateversions 1

No comments: