2nd Stage Recycle Bin Fallacy


In the SharePoint community, I regularly hear a statement made that I myself use to believe was correct but I want to clear up the misconception. It is easy to understand why people believe this based on unclear wording in Central Administration.

The statement is made that if you do not set site quotas for the site collection, then your second stage (site collection) recycle bin will never be emptied because the second stage recycle bin is based on a percentage of the site quota. Therefore, your second stage recycle bin can grow uncontrollably because it will never be emptied. This reasoning is incorrect because it is based on some misinformation.

So lets clear up how the recycle bin works including the second stage. I will first explain how it works. Then link to documentation and provide tips if you wish to test this statement yourself.

In Central Admin, you can state the numbers of days items are to be retained in the Recycle Bin. The first stage and the second stage (site collection) are BOTH part of the Recycle Bin. Therefore, items in either the first stage OR the second stage will be deleted after the number of days set for the web application. However, an additional size limit can be placed on the second stage recycle bin by using a percentage of the site collection quota to limit it.

Therefore, I am still recommending that you set site quotas. Without site quotas, there is nothing to stop your second stage recycle bin from growing uncontrolled and increasing the size of your content database on the SQL server.

But you might say, if it is only there for 30 days (the default), why would I worry? Imagine you have many large documents libraries in the same site collection. Then, you have multiple users all decided to do cleanup in those libraries (deleting many files) and empty their recycle bins. Then, they add new documents to the libraries to “update” them. Then, a week later, they do it again. There is still the possibillity of your content database growing larger than you would want to manage or have space on your SQL server to hold.

So I have tested this scenario and I have confirmed on numerous client sites that there are no files in their second stage recycle bins older than the day limit placed on the recycle bin as a whole. If you read this Microsoft article, you will find following statement in the last sentence of the Overview:

Regardless of whether or not an item is sent to the users’ Recycle Bin or to the Site Collection Recycle Bin, items are deleted automatically after the number of days that the central administrator specified.

If you wish to test this yourself, please be aware that in order for items to be emptied from the recycle bin, the Timer Job “Recycle Bin” has to have run. By default, this timer job only runs once per day usually early in the morning. I would recommend you use the stsadm -o setproperty -propertyname job-recycle-bin-cleanup command to set the job to run more frequently while testing.

About J.D. Wade

Senior SharePoint Consultant, husband, active in community theatre, love watching movies, have been described as “quirky”, aka “KB Man”
This entry was posted in Microsoft Office SharePoint Server 2007 (MOSS 2007), Microsoft SharePoint, Sharepoint Foundation 2010 (SPF 2010), Sharepoint Foundation 2013 (SPF 2013), SharePoint Server 2010 (SP 2010), SharePoint Server 2013 (SP 2013), Windows SharePoint Services 3.0 (WSS 3.0) and tagged . Bookmark the permalink.

13 Responses to 2nd Stage Recycle Bin Fallacy

  1. Pingback: Bookmarking the web - w24/2008 - double density design

  2. Rupert says:

    Good post, just the information I was looking for.

  3. gavinadams says:

    Hi JD,
    long time since we’ve chatted.
    Just to let you know that this post came in very handy for me today.

    Cheers,
    Gavin

  4. Frank says:

    Can you clean out the recycle bins using the stsadm? We are having problems getting to Central Administration, we get an ‘Error’ message. Hope you can help.
    Thanks

  5. Luka says:

    Hi
    Pls clarify this also.
    If I don’t specify the quota limitation and set 30 days for Recycle Bin what will happen.
    1. User deletes item it goes to 1st recycle bin ( where he can restore it ) after 20 days user deletes item from recycle bin what is happening :
    does item go to 2nd stage recycle bin and waits for 30 days or gets deleted permanently ?
    2. User deletes item it goes to recycle bin
    what is happening after 30 days ?
    – deleted permanently or going to 2nd stage and stays there for next 30 days ?
    thx

    • J.D. Wade says:

      So I will answer your two scenarios but I want to remind you of a statement I make in the post above that help you understand my responses: “The first stage and the second stage (site collection) are BOTH part of the Recycle Bin. Therefore, items in either the first stage OR the second stage will be deleted after the number of days set for the web application.” Therefore, there is only ONE RECYCLE BIN which contains TWO STAGES.

      So, to answer your questions:
      1. In this scenario, for the first twenty days, the items is in the first stage portion of the recycle bin. When the user deletes the item from there after 20 days, it moves from the first stage portion to the second stage portion but it is still in the same recycle bin. So 10 days later (since it is 30 days old), it will be permanently deleted from the second stage portion of the recycle bin.
      2. In this scenario, the item is in the recycle bin for 30 days but stays in the first stage portion of it. After 30 days, the item is permanently deleted.

      • Luka says:

        Thanks J.D Just wanted be 100% sure that it works how I thought .
        Last question, what If I add quota limit and it won’t be reached in option 2.( items lasts 30 days in recycle bin )

  6. Shawn says:

    J.D.,

    What would be the cause of deleted items showing only in the 2nd stage recycle bin without being in the 1st stage. The recycle bin is set to 30 days / 50%.

  7. Bank says:

    Informative post, even for SP2010 research. It cleared up 2 conflicting Microsoft sources (TechNet vs. 70-667 Training Kit).

  8. KLA says:

    Excellent post, as I have just researched and found conflicting MS tech info as well. So in summary, it appears the only time a ‘2nd stage’ is used is when a user manually deletes from 1st stage. The time limit applies to both stages at the same time. the MS content implies 30 day retention in 1st stage, then additional 30 days in 2nd stage, which obviously is incorrect.
    Thanks!

  9. Thanks – This was helpful today because the information on TechNet (http://technet.microsoft.com/en-us/library/cc288020(v=office.14).aspx) incorrectly said “web application” when referring to “site collection”.

Join the discussion by leaving a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s