locked
Restore-SPSite reports "No content databases are available for this operation but the site collection is scheduled for deletion..." RRS feed

  • Question

  • I've run a site collection backup using Backup-SPSite.  I then deleted the Site Collection using CA.  Then tried to restore is using Restore-SPSite.  Got the error "No content databases are available for this operation but the site collection is scheduled for deletion in at least one content database.  Either wait for the deletion operation to complete or create a content database, and then try the operation again. To create a content database, click "Content databases" on the Application Management page, select the Web application to use, and then click "Add a content database".  

    I then ran the Gradual Delete Timer Job manually using 'Run Now' option however I'm still getting the error.  The job appears to run ok (Status = Succeeded) however the duration is 00:00:00 which is suspicious.

    I'd rather not create another Content Database.

    Any suggestions?  Thanks in advance!

    Thursday, March 8, 2012 2:41 PM

Answers

  • Thanks.  I waited a few days but unfortunately the same results.  However, I did come up with this:

    The command 'Get-SPDeletedSite' showed me the site hadn't been completely deleted.  Then 'Remove-SPDeletedSite' got rid of it.  Then I was able to do the restore.

    In the end, this is what worked for me as the cleanest/fastest procedure:

    > Backup-SPSite –Identity http://sharepoint.abc.com/sites/testsite -Path “c:\site collection backups\testsite.bak”

    > Remove-SPSite –Identity http://sharepoint.abc.com/sites/testsite

    > Restore-SPSite –Identity http://sharepoint.abc.com/sites/testsite2 -Path “c:\site collection backups\testsite.bak”


    I am curious why the Gradual Delete timer job isn't doing what it's supposed to be doing.
    • Edited by Tammy George Wednesday, March 14, 2012 12:09 PM
    • Marked as answer by GuYuming Tuesday, December 31, 2013 6:33 AM
    Wednesday, March 14, 2012 12:08 PM
  •  

    Hi,

    From the error message you mentioned, the site collection couldn’t be restored from .bak file backup since the originally deleted site SharePoint site collection is still in the Gradual Delete process.  The Gradual Delete process has not completed successfully - likely due to timer job not running properly.  Note:  The error message during restore-spsite calls for gradual deletion process to complete or create a new content database.

    The timer job ran successfully, which doesn’t mean it delete the site from content database. Please wait for one or two day, then test again.

    For more information about the Gradual Site Delete Timer Job Definition, see

    http://maplpro.blogspot.com/2009/12/sharepoint-2010-gradual-site-delete.html

    Thanks,

    Rock Wang


    Rock Wang TechNet Community Support

    • Marked as answer by GuYuming Tuesday, December 31, 2013 6:33 AM
    Wednesday, March 14, 2012 9:42 AM

All replies

  •  

    Hi,

    From the error message you mentioned, the site collection couldn’t be restored from .bak file backup since the originally deleted site SharePoint site collection is still in the Gradual Delete process.  The Gradual Delete process has not completed successfully - likely due to timer job not running properly.  Note:  The error message during restore-spsite calls for gradual deletion process to complete or create a new content database.

    The timer job ran successfully, which doesn’t mean it delete the site from content database. Please wait for one or two day, then test again.

    For more information about the Gradual Site Delete Timer Job Definition, see

    http://maplpro.blogspot.com/2009/12/sharepoint-2010-gradual-site-delete.html

    Thanks,

    Rock Wang


    Rock Wang TechNet Community Support

    • Marked as answer by GuYuming Tuesday, December 31, 2013 6:33 AM
    Wednesday, March 14, 2012 9:42 AM
  • Thanks.  I waited a few days but unfortunately the same results.  However, I did come up with this:

    The command 'Get-SPDeletedSite' showed me the site hadn't been completely deleted.  Then 'Remove-SPDeletedSite' got rid of it.  Then I was able to do the restore.

    In the end, this is what worked for me as the cleanest/fastest procedure:

    > Backup-SPSite –Identity http://sharepoint.abc.com/sites/testsite -Path “c:\site collection backups\testsite.bak”

    > Remove-SPSite –Identity http://sharepoint.abc.com/sites/testsite

    > Restore-SPSite –Identity http://sharepoint.abc.com/sites/testsite2 -Path “c:\site collection backups\testsite.bak”


    I am curious why the Gradual Delete timer job isn't doing what it's supposed to be doing.
    • Edited by Tammy George Wednesday, March 14, 2012 12:09 PM
    • Marked as answer by GuYuming Tuesday, December 31, 2013 6:33 AM
    Wednesday, March 14, 2012 12:08 PM