Storage
7 TopicsSharePoint : Your storage is almost full - one approach
I've been looking for low impact ways to minimize our storage usage across our SharePoint tenant. This post outlines the approach I took and the outcome, and who it might work for. My environment: Only 350GB remaining in Tenancy 8.7 TB used. 265 sharepoint sites in total (teams / communication etc) I decided to focus on sites with more than 100Gb of storage used. In my case this turned up 16 sites. Of these I had to exclude 2 sites. This left14 sites using 5.194553 TB My goal was to have low/no impact on users while reducing the volume of content in our M365 tenant SharePoint environment. My approach was to do the following: - Get list of all SharePoint site collections, find out Size of each Those larger than 100Gb do the following: - delete all items in recycle bin deleted more than 30 days ago (current setting 93 days, unchanged) - delete all items from 2nd stage recycle bin (current setting 30 days, unchanged) - change all user libraries from 500 to 100 major versions In my environment the recycle bins are rarely used and when I ran a script to work out the average number of versions it was in the 10s at most and for most sites it was 3 or 4. NOTE no sites have minor versioning turned on. I wanted to measure the change so I exported a usage report pre and post doing the above. To achieve all this I used the following code, then the following day checked the SharePoint admin centre reported the same "Storage used" numbers. BE AWARE the code below DELETES data you cannot get back (file versions, and files in the recycle bin). DO NOT RUN THIS to try it out. Test it on one or two sites first. Even if you have backups getting version history back would be very challenging. <# goal is to reduce size sites take up 1 change version from 500 to 100 2 recycle bin deleted more than 30 days ago, move to 2nd stage recycling 3 empty second stage recycling #> #Get current stats #Connect to Admin Center $AdminCenterURL = "https://MyCompanyName-admin.sharepoint.com" Connect-PnPOnline -Url $AdminCenterURL -Interactive reportTenantSiteCollectioninfo function reportTenantSiteCollectioninfo { Try { #export file path $dateStamp = get-date -format "yyyyMMdd-hhmm" $CSVPath = "c:\Temp\SiteUsageRpt-"+$dateStamp+".csv" #Get all site usage details $Sites = Get-PnPTenantSite -Detailed | Select * $SiteUsageData = @() ForEach ($Site in $Sites) { #Collect site data $SiteUsageData += New-Object PSObject -Property ([ordered]@{ 'Title' = $Site.Title 'URL' = $Site.Url 'Description' = $Site.Description 'Owner' = $Site.OwnerName 'Storage Quota' = $Site.StorageQuota 'Storage MaximumLevel' = $Site.StorageMaximumLevel 'Storage Usage Current' = $Site.StorageUsageCurrent 'Resource Quota' = $Site.ResourceQuota 'Resource Quota Warning' = $Site.ResourceQuotaWarningLevel 'Resource Usage Average' = $Site.ResourceUsageAverage 'Resource Usage Current' = $Site.ResourceUsageCurrent 'Template' = $Site.Template 'Sharing Capability' = $Site.SharingCapability 'Lock Status' = $Site.LockState 'Last Modified Date' = $Site.LastContentModifiedDate 'Subsites Count' = $Site.WebsCount }) } $SiteUsageData #Export Site Usage Data to CSV $SiteUsageData | Export-Csv $CSVPath -NoTypeInformation Write-Host "Site Usage Report Generated Successfully!" -ForegroundColor Green } Catch { Write-Host -ForegroundColor Red "Error generating site usage report:" $_.Exception.Message } } Function Set-PnPVersionHistoryLimit { param ( [Parameter(Mandatory=$true)] $Web, [parameter(Mandatory=$false)][int]$VersioningLimit = 100 ) Try { Write-host "Processing Web:"$Web.URL -f Yellow Connect-PnPOnline -Url $Web.URL -Interactive #Array to exclude system libraries $SystemLibraries = @("Form Templates", "Pages", "Preservation Hold Library","Site Assets", "Site Pages", "Images", "Site Collection Documents", "Site Collection Images","Style Library","Teams Wiki Data") $Lists = Get-PnPList -Includes BaseType, Hidden, EnableVersioning #Get All document libraries $DocumentLibraries = $Lists | Where {$_.BaseType -eq "DocumentLibrary" -and $_.Hidden -eq $False -and $_.Title -notin $SystemLibraries} #Set Versioning Limits ForEach($Library in $DocumentLibraries) { #powershell to set limit on version history If($Library.EnableVersioning) { #Set versioning limit Set-PnPList -Identity $Library -MajorVersions $VersioningLimit Write-host -f Green "`tVersion History Settings has been Updated on '$($Library.Title)'" } Else { Write-host -f Yellow "`tVersion History is turned-off at '$($Library.Title)'" } } } Catch { Write-host -f Red "Error:" $_.Exception.Message } } <# Get a list of big sites #> $bigSites = $SiteUsageData | where "Storage Usage Current" -gt 100000 $bigSites = $bigSites | where title -notin ("excluded site 1","excluded site 2") $bigSites.count #loop through the big sites foreach($bigsite in $bigSites) { connect-pnponline -url $bigSite.URL -interactive ## get the deleted items that were deleteed more than 30 days ago $date30daysago = (get-date).adddays(-30) $DeletedItemsOlder = Get-PnPRecycleBinItem | Where { $_.DeletedDate -le $date30daysago} | Sort-Object -Property DeletedDate -Descending $DeletedItemsOlder.count #move all these to 2nd stage recycle bin $DeletedItemsOlder | Move-PnPRecycleBinItem -force #empty the second stage recycle bin Clear-PnPRecycleBinItem -SecondStageOnly -force #get all the libraries $Webs = Get-PnPSubWeb -Recurse -IncludeRootWeb ForEach($Web in $Webs) { Set-PnPVersionHistoryLimit -Web $Web } } #get site info again reportTenantSiteCollectioninfo Outcome [Updated 7 Aug 2023] On the day the outcome was spectacularly unsuccessful. I saved 24GB by doing this across 5.194553 Terra bytes or less than 0.5 % So worth trying, but not valuable in my environment, I thought. But when I looked at the SharePoint admin screen, Storage used, in August there is a big drop two days after running this script. From 8.8TB down to 8.6TB so approx 200GB saving. Unfortunately this may not have been all to do with this script (other things going on in my tenant) but a lot of it is, again not massive at 2% but useful. When would this be valuable for reducing storage volume ? I think the key thing isn't the removal of files from the recycle bins, but the removal of older versions of files. SO if you have an environment with most files having 100's of versions , and those versions are large changes to the file each time. (e.g. a daily report that has new images replace existing ones each day) then this could save a lot of space. What about you? How do you reduce SharePoint storage? What have you found that works?10KViews0likes3CommentsTypical SharePoint Storage Space - Med-Large scale projects
Hi everyone, In my current organization, we've taken to limiting the storage space available when creating a SharePoint/Teams site. It's a way to manage our tenancy's storage. Just curious, from everyone's experience, what is the average amount of storage used for projects or any purpose really when it comes to your SharePoint sites? 100gb, 500gb or 1tb+? Re813Views0likes2CommentsStorage files
Hello, I would like to make a file storage space but I would like to establish access rules. As some people can add and edit while all others can only view and not download. Is there an application on Microsoft 365 that could help me achieve this. For the moment, I try with SharePoint but what do you think, is a good solution or there is better? Thanks SharePoint Online835Views0likes1CommentDoes documents version history cost storage?
We have allot of SharePoint sites and documents. Version history is enabled in all document libraries. I am just wondering if all the document version history is playing a role in the total storage of the SharePoint site. Who knows?Solved6.1KViews0likes1CommentBest Practice for Site Collection Storage Size
One of my organization's business units is examining the feasibility of SharePoint Online as an alternative solution for photo storage. While I know that SharePoint does a great job of document storage and provides some decent tools for managing images, I'm uncertain how best to architect their solution from a storage limit standpoint. We estimate this business organization would need ~2 TB storage for their images, and while we have well more than that available in our tenant, I'm unsure what will happen if we hit a single site collection with that much content. Is there a known limit or threshold for a site collection's storage limit, or are there consequences where that much data would noticeably affect performance? I anticipate creating a site collection to manage this content by itself, but if there are known issues should storage reach a certain threshold, I can accept spreading this out over a few site collections but would want to know that before I recommend anything to our business unit. I'm aware of the recommendations for SharePoint 2013, but am unsure these limitations would still apply.2.8KViews0likes2CommentsError while creating new SP Site collection 2013
When I try to create a new site collection in a web application, it gives the error: Sorry, something went wrongThis page has encountered a critical error. Contact your system administrator if this problem persists. A couple of days back, I had changed the settings in Monitoring>when it showed me that content db is growing large, I had clicked on repair automatically which might have stopped me from creating new site collections. Any one know how to revert this settings? I checked the uls logs and it showed me: Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.SharePoint.WebPartPages.WebPartPageUserException: This page has encountered a critical error. Contact your system administrator if this problem persists. at Microsoft.SharePoint.ApplicationRuntime.SafeControls.IsSafeControl(Boolean isAppWeb, Type type, String& unsafeErrorMessage) at Microsoft.SharePoint.WebPartPages.TypeCache.CheckIfSafeControl(Type type, Boolean isAppWeb) at Microsoft.SharePoint.WebPartPages.TypeCache.get_Item(Type type, Boolean isAppWeb, Boolean disableSafeControlsCheck) at Microsoft.SharePoint.WebPartPages.WebPart.WriteXmlGlobal(Boolean disableSafeControlsCheck) at Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(SerializationMode mode, BinaryWebPartSerializerFlag binaryWebPartSerializerFlags, SPSerializationBinderBase serializationBinder, BinaryWebPartSerializerWriter writer) at Microsoft.SharePoint.WebPartPages.BinaryWebPartSerializer.Serialize(SerializationMode mode, BinaryWebPartSerializerFlag binaryWebPartSerializerFlags, SPSerializationBinderBase serializationBinder) at Microsoft.SharePoint.WebPartPages.SPWebPartManager.AddWebPartToStore(WebPart webPart, Int32 viewId, String viewGuid) at Microsoft.SharePoint.WebPartPages.SPWebPartManager.AddWebPartInternal(SPSupersetWebPart superset, Boolean throwIfLocked) at Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager.AddWebPart(WebPart webPart, String zoneId, Int32 zoneIndex) at Microsoft.Office.DocumentManagement.Internal.DocumentSetFeatureReceiver.FeatureActivated(SPFeatureReceiverProperties properties) at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce) at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce) at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly) at Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, Int32 compatibilityLevel, String featureName, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly, Boolean fIgnoreMissing, SPFeatureDefinitionScope featdefScope) at Microsoft.SharePoint.SPFeatureCollection.AddInternal(Guid featureId, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatureDefinitionScope featdefScope) at Microsoft.Office.DocumentManagement.VideoAndRichMedia.Internal.VideoAndRichMediaFeatureReceiver.FeatureActivated(SPFeatureReceiverProperties properties) at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce) at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce) at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly) at Microsoft.SharePoint.SPTemplateAssociationElement.EnsureTemplateAssociatedSiteFeaturesActivated(SPSite site, String sTemplateName) at Microsoft.SharePoint.SPFeatureManager.<>c__DisplayClass16.<EnsureTemplateAssociatedSiteFeaturesActivated>b__15() at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param) at Microsoft.SharePoint.SPFeatureManager.EnsureTemplateAssociatedSiteFeaturesActivated(Byte[]& userToken, Guid& tranLockerId, Int32 nZone, Guid databaseid, Guid siteid, String sTemplateName) at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, Int32 fIgnoreMissingFeatures, String& bstrWebTemplate, Int32& plWebTemplateId) at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, Int32 fIgnoreMissingFeatures, String& bstrWebTemplate, Int32& plWebTemplateId) at Microsoft.SharePoint.SPWeb.ProvisionWebTemplate(SPWebTemplate webTemplate, String webTemplateToUse, SPFeatureWebTemplate featureWebTemplate, Page page, SPFeatureDependencyErrorBehavior featureDependencyErrorBehavior, ICollection`1& featureDependencyErrors) at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(SPWebTemplate webTemplate, Page page, SPFeatureDependencyErrorBehavior featureDependencyErrorBehavior, ICollection`1& featureDependencyErrors) at Microsoft.SharePoint.ApplicationPages.TemplatePickerUtil.ApplyWebTemplateAndRedirect(SPSiteAdministration siteAdministration, String strWebTemplate, String strRedirect, Boolean bCreateDefaultGroups, Page page, Boolean bDeleteOnError) at Microsoft.SharePoint.ApplicationPages.CreateSitePage.BtnCreateSite_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)5KViews0likes4CommentsCant increase storage for sharepoint server site collection and cant extract the ULS logs also
Cant increase storage for sharepoint server site collection and get this error message: Sorry, something went wrong Cannot complete this action. Please try again. Technical Details Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: ff247a9e-4238-a073-9236-3c4640e10d4f Date and Time: 7/12/2018 4:16:17 PM Same issue for all the site collections in all web applications. tried running fiddler and got this : 401 at /admin/sitequota.aspx I tried to configure the diagnostic logging to get the uls however got his error message: Sorry, something went wrong The transaction log for database 'AAISP_Config' is full due to 'LOG_BACKUP'. Technical Details Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 3e247a9e-b2e9-a073-9236-352a327593e2 Date and Time: 7/12/2018 4:03:09 PM Found this article:http://manakhov.com/2016/01/ regarding the issue of uls logs error however I am not sure about this Please any help is appreciated.Solved1.3KViews0likes1Comment