1. Upgrade, recycle solution, and frequently used feature operations
@setlocal@pushd.@set SiteUrl=http://richsharepoint:86@set FeatureName=ePAN.Proxy@set path=%path%;%programfiles%\common files\microsoft shared\web server extensions\12\bin@cd /d %~dp0rem ** upgrade the solution **stsadm -o upgradesolution -name %FeatureName%.wsp -filename %FeatureName%.wsp -immediate -allowgacdeploymentstsadm -o execadmsvcjobsstsadm -o installfeature -name %FeatureName%\feature.xml
stsadm -o deactivatefeature -filename %FeatureName%\feature.xml -force -url %SiteUrl%stsadm -o activatefeature -filename %FeatureName%\feature.xml -force -url %SiteUrl%
stsadm -o uninstallfeature -name %FeatureName%\feature.xml
rem ** delete solution **stsadm -o retractsolution -name %FeatureName%.wsp -immediateiisresetnet stop SPTimerV3
net start SPTimerV3
@popd@endlocal@pause
2. Back up and restore the website set
To backup a site collection, use the following command line:
stsadm -o backup -url <URL of the site collection> -filename <name of the backup file>
To backup an individual database, web application, or entire farm, use the following command line:
stsadm -o backup -directory <UNC path or local drive> -backupmethod <full or differential>
Now that you backed up your farm, it's time to restore it. Use the following command lines to accomplish this:
To restore a site collection, use the following command line:
stsadm -o restore -url <URL of site collection> -filename <name of backup file>
To restore an entire farm, use the following command line:
stsadm -o restore -directory <UNC path or local drive> -restoremethod <overwrite or new>
So let's say now you want to migrate data from one Sharepoint Server to another. you always have the option of using export and import, which I always like to use. note that this tool will only migrate sites.
To export your sites, use the following command line:
stsadm -o export -url <URL> -filename <FileName>.cmp
To import your site, use the following command line:
stsadm -o import -url <URL> -filename <FileName>.cmp
3. Common Operations for deployment and debugging
Copy DLL to the bin directory:
Xcopy/S/y/C/R "bin \ debug \ *" C: \ Inetpub \ wwwroot \ WSS \ virtualdirectories \ 81 \ bin \"
Change 81 to the actual folder.
Register or update GAC:
"% ProgramFiles % \ Microsoft Visual Studio 8 \ SDK \ V2.0 \ bin \ gacutil.exe"-If bin \ debug \ codeart. Sharepoint. dll
ModifyCodeart. Sharepoint. dll is the actual DLL name
Restarting the IIS--IIS restart operation is too slow, we can use the method to restart the application pool:
Save the preceding commands in a text file and change the name to XXX. CMD: place the CMD file in the directory of the VS solution. Double-click cmd every time you deploy the file to Moss.
Iisapp/a "SharePoint-81"/R
ModifySharePoint-81 is the name of the actual application pool
4. Common Solution operations
A. Open the "command prompt" window and enter:
Cd c: \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 12 \ bin
B. Install Solution
Stsadm-O addsolution-filename C: "meetingtemplate. WSP
C. deploysolution deployment. This may cause problems and has not been tried yet.
Stsadm-O deploysolution-name meetingtemplate. WSP-allowgacdeployment-immediate
If the ASPX page is deployed, the DLL is automatically deployed to the GAC, And the ASPX page is automatically deployed to the layouts.
D. Delete
1. retractsolution
Stsadm.exe-O retractsolution-name meetingtemplate. WSP-immediate
2. deletesolution
Stsadm.exe-O deletesolution-name meetingtemplate. WSP
You can also forcibly Delete [-override]