Backing up a site collection from the command line
In addition to backing up my SharePoint site collection with Symantec BackupExec, I will occasionally use the command line tools to backup to file. This is quite easy to do in just a few steps:
- Logon to the SharePoint server as an administrator
- Open an elevated command prompt
- Change directory to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\bin
- Run the following command:
stsadm -o backup -url http://intranet -filename c:\intranetbackup
Depending on the size of the database, and server configuration this process can take several minutes. The exported file can be stored somewhere off site.
Tip: if the database is quite large make sure you have enough space on the disk that will hold the backup file.