locked
Deleting From Second Stage Recycle Bin RRS feed

  • Question

  • Hello.

    We have a document library with > 100,000 documents in it.  We set up another doc lib and the original doc lib was purposely deleted and then deleted from the User recycle bin.  This worked fine but it still lingers in the second stage/admin recycle bin.  When we try to clear out the second stage recycle bin the whole SharePoint site collection becomes inaccessible for a long time and finally times-out with an "unknown error". 

    I tried emptying the recycle bin overnight but similarly it timed-out.  Currently our backups unnecessarily contain data that should be easily deleted.

    1. Is there a way to get rid of this large amount of data from the recycle bin?

    2. How do I empty the recycle bin without down-time that will affect users using the site?

    3. I know that I could restore the document library and delete each file manually and then delete from the recycle bin in batches of 100.  This was suggested in a few blog posts I read (originally suggested by MS apparently) but this is not a realistic option.

     

    Friday, February 25, 2011 11:42 AM

Answers

All replies

  • Hi,

    you can use stsadm command and schedule a clean up

    To set the schedule of a Recycle Bin cleanup for the Web application use the following syntax:

    stsadm -o setproperty -pn job-recycle-bin-cleanup -pv "daily at 15:00:00" -url <site URL>

    To view the current setting of the job-recycle-bin-cleanup property, use the following syntax:

    stsadm -o getproperty -pn job-recycle-bin-cleanup

    hope this helps.


    Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/ http://sharepointpratik.wordpress.com/
    Friday, February 25, 2011 2:03 PM
  • Pratik, thank you for replying.

    I tried your suggestion but it did not work.  The deleted document library remains in the recycle bin.

    Thursday, March 3, 2011 11:27 AM
  • Hi motiionpotion,

    A custom code based on SharePoint Object Model can be used to flush the large files from the second stage recycle bin.
    Find the custom code in this blog.
    http://blogs.msdn.com/b/ajithas/archive/2009/09/08/deleting-very-large-objects-from-the-second-stage-recycle-bin.aspx

    Best regards,
    Emir

    • Marked as answer by Emir Liu Saturday, March 5, 2011 4:41 PM
    Friday, March 4, 2011 2:57 AM