locked
Trying to resolve an stsadm -o restore problem RRS feed

  • Question

  • I am attempting a database restore to SharePoint site.

    When I ran the restore I got this:

     

    D:\temp>stsadm -o restore -url http://mydev/sites/marketing -filename Z:\marketing-2011-12-06-00-10-00.dat -overwrite

     

    Cannot complete this action.

     

    Please try again.

     

    So, I go to the 12hive logs and I see this.

    12/12/2011 07:37:53.38  STSADM.EXE (0x082C)                                   0x1258  Windows SharePoint Services    General                                       72ju       Medium               stsadm: Running restore             

    12/12/2011 07:37:54.19  STSADM.EXE (0x082C)                                   0x1258  ULS Logging                        Unified Logging Service                       8wsv      High       ULS Init Completed (STSADM.EXE, Microsoft.Office.Server.Native.dll)   

    12/12/2011 07:37:54.76  STSADM.EXE (0x082C)                                   0x1258  Windows SharePoint Services    Backup and Restore                            7944       Information        Starting restore of site collection: 'http://mydev/sites/marketing', requested by: mydomain\sa_spsdev, source: Z:\marketing-2011-12-06-00-10-00.dat

    12/12/2011 07:37:54.85  STSADM.EXE (0x082C)                                   0x1258  Windows SharePoint Services    General                                       8e11      High       Deleting the site at http://mydev/sites/marketing and not deleting AD accounts.   

    12/12/2011 07:37:55.09  STSADM.EXE (0x082C)                                   0x1258  Windows SharePoint Services    General                                       8kh7      High       Cannot complete this action.  Please try again.  

    12/12/2011 07:37:55.10  STSADM.EXE (0x082C)                                   0x1258  Windows SharePoint Services   General                                       72ju       High       stsadm: Cannot complete this action.  Please try again. Callstack:    at Microsoft.SharePoint.Library.SPRequest.DeleteSite(String bstrUrl, Boolean bDeleteADAccounts)     at Microsoft.SharePoint.SPSite.Delete(Boolean bDeleteADAccounts)     at Microsoft.SharePoint.SPSite.Delete()     at Microsoft.SharePoint.Administration.SPSiteCollection.Restore(String strSiteUrl, String strFilename, Boolean bOverwrite, Boolean hostHeaderAsSiteName)     at Microsoft.SharePoint.StsAdmin.SPAdminRestore.RunSiteCollectionRestore(StringDictionary keyValues)     at Microsoft.SharePoint.StsAdmin.SPAdminRestore.Run(StringDictionary keyValues)     at Microsoft.SharePoint.StsAdmin.SPStsAdmin.RunOperation(SPGlobalAdmin globalAdmin, String strOperation, StringDictionary keyValues, SPParamCollection pars)     

    12/12/2011 07:37:57.10 STSADM.EXE (0x082C)                                   0x1258  ULS Logging                        Unified Logging Service                       8wsw    High       Now terminating ULS (STSADM.EXE, Microsoft.Office.Server.Native.dll)

    Does anyone have suggestions for working on this error?

    I am not an expert on sharepoint logs. So I googled for the first line of the stack trace. One posting < http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/d345c0f0-a1b6-4d17-bc35-597c36d48dda > suggests that there could be a content database error. The thread suggests performing a stsadm -o databaserepair.

    I am uncertain what arguments this takes. I tried

    stsadm -o databaserepair -url http://mydev

    as well as http://mydev/sites/marketing

    but couldn't figure out what  to provide for the -database argument. When I log into the central admin for mydev, I tried various options to see the name of the content database. Under Backup, I see a content database for WSS_Administration - but I expect that one is for the Central Admin site, so it shouldn't be the one with a problem here, right?

    Then I see a default web site ssp. There is a content database called SharePoint_SSP_Content. however, when I provide that name as the -database argument, I get this in return.

     

    D:\temp>stsadm -o databaserepair -url http://mydev/sites/marketing -databas
    e SharePoint_SSP_Content

    Command line error. Invalid parameter.

    I tried replacing the -url with http://mydev , but continue to get the invalid parameter error message.

    So, if it seems like I am on the right track, what is the parameter problem I am having?  If it seems like the problem might be elsewhere, then what other things should I check?
    stsadm.exe -o databaserepair
               -url <url>
               -databasename <database name>
               [-deletecorruption]

    Monday, December 12, 2011 1:10 PM

Answers

  • Hi,

    You can use this command to delete the site:

    STSADM -o deletesite -url <url of your site>

    I hope this will help you out

     


    Thanks, Rahul Rashu
    Wednesday, December 14, 2011 3:51 AM
  • I ended up resolving this by giving a unique destination name to the restore command instead of trying to restore over top the old site.  That took care of the problem, got the site restored, and made the user who had deleted his site very happy to be able to get to his docs.

     

    Thank you all for your help!

    • Marked as answer by lwvirden Wednesday, December 28, 2011 6:32 PM
    Wednesday, December 28, 2011 6:32 PM

All replies

  • I went to central admon on mydev, and tried to delete the /sites/marketing site. I was able to locate the site in the list of site collections, but when I selected the site, no information regarding site title, owner, etc. appeared. In fact, that was the case for several of the site collections there. Others look normal.

    This is a test farm (where we do restores, etc.) and so the fact that there are sites missing is not an immediate concern. 

    I tried to do a stsadm -o enumsites and several of the sites came up as

      <Site Url="http://mydev/sites/finance" Owner="mydomain\spsadmin" ContentDatabase="SharePoint_SSP_Content" StorageUsedMB="26.2" StorageWarningMB="0" StorageMaxMB="0" />
      <Site Error="Cannot complete this action.&#xA;&#xA;Please try again.">

     

    However, the site I was trying to recover - the marketing site collection - doesn't show up here at all. Which is strange since the central administration page at least mentions it (even though all the info is missing).

    I am uncertain how to clear it out of this site so that the restore can move forward.  Would someone be willing to give me some pointers on how to address this?

     

    Thank you

     

    Monday, December 12, 2011 7:47 PM
  • Hi,

    I would suggest you to instead of overwriting the content first delete the site and then execute STSADM restore.


    Thanks, Rahul Rashu
    Tuesday, December 13, 2011 4:32 AM
  • Thank you for the suggestion. The problem is that currently, Central Admin won't let me delete the site. I have been trying to read the stsadm documentation for deleting the site, but I am still trying to figure out what the values for the arguments are.
    Tuesday, December 13, 2011 12:38 PM
  • Hi Ivvirden,

    Check if the content database for the target site is set to offline mode. CA -> App Mgmt -> Content DB's -> Click on the approprite content database (content database of the site collection) -> Check if the "Database status" dropdown is set to offline. (Usually this should be set to Ready)

    Thanks


    Regards, Nikhil Sharma Dharanipragada
    Tuesday, December 13, 2011 5:23 PM
  • Hi,

    You can use this command to delete the site:

    STSADM -o deletesite -url <url of your site>

    I hope this will help you out

     


    Thanks, Rahul Rashu
    Wednesday, December 14, 2011 3:51 AM
  • I ended up resolving this by giving a unique destination name to the restore command instead of trying to restore over top the old site.  That took care of the problem, got the site restored, and made the user who had deleted his site very happy to be able to get to his docs.

     

    Thank you all for your help!

    • Marked as answer by lwvirden Wednesday, December 28, 2011 6:32 PM
    Wednesday, December 28, 2011 6:32 PM