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?

[885 byte] By [tr6scott] at [2008-1-9]
# 1

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

Hube at 2007-10-3 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Setup, Upgrade, Administration and Operation...
# 2
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>
stsa
dm.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>
stsa
dm.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.

tr6scott at 2007-10-3 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Setup, Upgrade, Administration and Operation...
# 3

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

Hube at 2007-10-3 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Setup, Upgrade, Administration and Operation...
# 4
Thanks again,

Just did that with the site, and it worked just fine.

tr6Scott

tr6scott at 2007-10-3 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Setup, Upgrade, Administration and Operation...
# 5

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?

Pete-manheim at 2007-10-3 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Setup, Upgrade, Administration and Operation...
# 6

Hi Pete,

You probably want to take a look at the backup/restore log file. It should be located in the same place as the backup.

In addition, there may be additional data in the Sharepoint logs or the eventlog.

JP

JukkaPaajanen-MSFT at 2007-10-3 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Setup, Upgrade, Administration and Operation...
# 7
Pete,

I am a newbie, but that size looks pretty close to the 2GB file limit in FAT... I am wondering if you are backing up to NTFS drive with enough room?

Scott.

tr6scott at 2007-10-3 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Setup, Upgrade, Administration and Operation...

SharePoint Products and Technologies

Site Classified