stsadm.exe does not work. Errors out everytime, what am I doing wrong?
SBS2003 running Sharepoint v2
Name of my server box is "MC4"
I am running STSADM.exe from the server console and logged in as administrator.
From the "C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN" folder I issued the following command:
"stsadm.exe -o enumsites -urlhttp://MC4"
which from what I have read should list the sites hosted on this server. Everytime I get the following response:
"<SitesCannot complete this action.
Please try again."
I did a search on the microsoft KB and only come up with I didn't have access with the login, so how can that be when I am the administrator?
I get errors with "-o backup" too!
Any ideas on how to get this to work?
If you open internet explorer and use the url http://MC4 do you see a sharepoint site?
I believe for the command "stsadm.exe -o enumsites -url http://MC4" to work the site has to be sharepoint enabled, it will not work on a basic IIS website.
Being that you are using SBS does the following command work:
stsadm.exe -o enumsites -url http://localhost
or
stsadm.exe -o enumsites -url http://companyweb
Until you can list out your sites I suspect that the backup and retore commands will not work.
Hube
Thanks for the help Hube! C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN>
stsadm.exe -o enumsites -url http://localhost
<SitesCannot complete this action.
Please try again.So that localhost did not find anything different..
C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN>
stsadm.exe -o enumsites -url http://companyweb
<Sites Count="1">
<Site Url="http://companyweb" Owner="MCBRIDE4ORG\administrator" />
</Sites>
Humm... finally a stsadm command without a error? making headway.... C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN>
stsadm.exe -o enumsites -url http://www.sharepoint.oxfordenergy.us<Sites Count="1">
<Site Url="http://www.sharepoint.oxfordenergy.us" Owner="MCBRIDE4ORG\McAdmin" />
</Sites>
Wow, that is the site I am trying to backup too! C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN>
stsadm.exe -o backup -url http://www.sharepoint.oxfordenergy.us -filename c:\temp\backup.dat
Operation completed successfully.
Woo-Hoo Backup Complete! Thanks again, everything I read and found said I had to have the server name in the -url parameter. I guess on SBS that isn't required, and if supplied, makes it error out?
Thanks again.
Awesome, congratulations.
The next thing I would do is restore the site from backup to verify that it's working. I went through this when I first started doing backups (I now use a script to backup the web site three times a week). I used the following steps:
1) backup the web site
2) make a basic change to the website (like adding an announcement)
3) restore the web site from the backup
4) verify that the change made in step (2) is no longer present.
The restore command is:
stsadm.exe -o restore -url http://companyweb-filename C:\backup\backup.dat –overwrite
Good luck,
Hube
I also got past the error phase and now it works for a few minutes, then says:
Cannot complete this action. Please try again. I have done this twice and it seems to stop at a file size of:
1,794,725kb. Any other ideas?