Service | Microsoft Docs article | Related commit history on GitHub | Change details |
---|---|---|---|
SharePoint | Document Library Version History Limits | https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/document-library-version-history-limits.md | search.appverid: - MET150 description: "This article provides guidance on how version history limits are applied at organization, site, library or OneDrive user account level." + # Overview of version history limits for document libraries and OneDrive The manual setting allows admins to set count limits on the number of major vers - **Major version limits with no expiration period**: Versions are deleted after they exceed the set number of major versions. For example, if a library is configured to store 500 major versions, no more than 500 versions is stored for each file or item. -For more information, see [determining the right count or expiration version limits](plan-version-storage.md#determine-right-count-or-expiration-version-limits). + For more information, see [determining the right count or expiration version limits](plan-version-storage.md#determine-right-count-or-expiration-version-limits). > [!NOTE] > - The UI doesn't allow a value less than 100 major versions or less than 30 days expiration time limits to be set, but it's possible to set the system to store fewer versions using public APIs. For reliability, any value less than 100 versions or less than 30 days expiration time limit isn't recommended and can result in the user activity causing an inadvertent data loss. Audit events are available on the Microsoft Purview compliance portal to help yo - Changes made to organization version history limits. - Changes made to site version history limits. - Changes made to library version history limits.+- User queues a job to generate a version storage usage report. +- User queues a job to update the version history limits on all libraries of a site. +- User queues a job to bulk delete version history of files on a library or site. - User deletes versions from the version history of a file.---+- Versions deleted when expired or bulk deleted. |
SharePoint | Plan Version Storage | https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/plan-version-storage.md | description: "This article provides guidance on how to plan version storage for The Version history limits you configure need to meet your organizationΓÇÖs recovery objectives. In the following sections, we call out the options and decisions that you as an administrator should consider when setting up version limits for your organization. As you plan your version storage strategy, consider these key decision areas: + - Determine the default new document library version history limit for your organization. - Identify any exceptions needed from the organization default limits. - Determine if current content should be updated to align with the default organization version history limits. - ## Determine default version limits for new document libraries in your organization To set appropriate default limits for your organization, assess the restore options and storage consumption associated with the three version storage modes offered by SharePoint. This helps you to evaluate how the default limits could affect your users' access to their document versions and the overall storage space utilized by those versions. To set appropriate default limits for your organization, assess the restore opti |Select this option:|If you want to:|Benefits| ||||-|**Automatic** (Recommended) |Automatically optimize storage by storing versions based on their creation date.<br> With this setting, users have access to most of the recently created versions.<br> As versions age, fewer older versions are stored, keeping the few most likely needed ones. No other input is required from admins.| **Storage use:** Automatic setting is the recommended setting that offers your users access to high value versions while optimizing version storage use.<br> <br> **Restore options:** This setting ensures version history at key timestamps is always available for restore even on file with no new file edits.| +|**Automatic** (Recommended) |Automatically optimize storage by storing versions based on their creation date.<br> With this setting, users have access to most of the recently created versions.<br> As versions age, fewer older versions are stored. No other input is required from admins.| **Storage use:** Automatic setting is the recommended setting that offers your users access to high value versions while optimizing version storage use.<br> <br> **Restore options:** This setting ensures version history at key timestamps is always available for restore even on file with no new file edits.| |**Manual** with Major Version Limit and Expiration Period set| Store versions only until the configured expiration period and within the configured major versions count limits.<br> With this setting, users have access to all versions within the count and expiration period.|**Storage use:** This setting is the best option for ensuring the lowest quota impact from version storage as it trims versions that are older than the configured expiration.<br> <br> **Restore options:** When an expiration limit is set, it's possible for files with no recent edits to have all their versions trimmed if the updated version policy dictates that. For example, if a file doesn't get edited in six months and a six-month version expiration policy is in place, then all that fileΓÇÖs versions are deleted.| |**Manual** with **Major Version Limits and No Time** set| Always store the configured count of versions regardless of version age. Users have access to all the versions within the count limit.| **Storage use:** This setting can lead to high quota consumption from versions if you have a high ratio of heavily edited files or if you set the limits too high. <br><br> **Restore options:** This setting is the best option for storing a set number of versions offering you predictable version storage behavior. | > [!TIP]-> - Consider running a ΓÇÿWhat-ifΓÇÖ analysis report on a site or library to run impact analysis of applying either automatic or manual limits on version storage or users impacted before updating your default limits. -> - Provide information about default organization version history limits to your users. Tell site owners if you have a process and policy for requesting more. -+> +> - Before updating your default limits, consider [running a ΓÇÿWhat-ifΓÇÖ analysis report](tutorial-run-what-if-analysis.md) on a site or library to understand the impact on version storage of either automatic or manual limits. +> - Provide information about default organization version history limits to your users. Tell site owners if you have a process and policy for requesting more. The following image depicts the restore options and the storage use for each setting: Since default organization settings are applied to all new document libraries cr When diverging from the default limits, we recommend limiting the exceptions to maintain consistency with your organization's version storage practices and to keep your version storage policies in sync. For instance, evaluate if your business requirements can be met by breaking inheritance on a few document libraries instead of applying changes broadly across the entire site. ## Decide if updates to organization version history limits will be applied to existing content+ When updating your organizationΓÇÖs version limits, consider how existing library settings and file versions should be updated. Avoid impacting existing content by applying the organization limits to new libraries only or align your existing content to organization version limits by updating current library settings and trimming file versions. | If you want to | Steps to follow | |
SharePoint | Tutorial Generate Version Usage Report | https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/tutorial-generate-version-usage-report.md | LetΓÇÖs go through the first file version displayed in this report. - Expiration schedule identifiers:`CurrentExpirationDate` indicates that this version is currently set to never expire. `AutomaticPolicyExpirationDate` shows that under the automatically expire policy, this version is also set to never expire. `TargetExpirationDate` indicates that if we follow this schedule for trimming, we would set this version to never expire. +>[!NOTE] +> File versions stored in the preservation hold library will be included in this report as well. + LetΓÇÖs look at the third version. The `WebId` and `DocId` values are empty because these columns are compact columns, denoted by *.Compact* post-fix, it means they should have values. If we look for the last nonempty above that row, we find `WebId` as `4c7a58c1-01f2-4fa3-a730-44081a44f689`, and `DocId` as `18c3e09c-b5be-48e7-a754-7a2ce53e0999`. -We can also see that the `TargetExpirationDate` is set for April 19, 2023, at 18:08:53 UTC. It means if we trim based on this schedule, we would be setting the expiration date for this version to that time. However, at the time this documentation was written, it passed April 19, 2023. Instead of setting the version to expire, the document is deleted immediately. +We can also see that the `TargetExpirationDate` is set for April 19, 2023, at 18:08:53 UTC. It means if we trim based on this schedule, we would be setting the expiration date for this version to that time. > [!NOTE] > All date times are represented in the round-trip format. For more information, see [Standard date and time format strings - .NET | Microsoft Learn](/dotnet/standard/base-types/standard-date-and-time-format-strings) ## Analyze version storage for sites -After configuring the `TargetExpirationDate` values for your report, you can choose to perform deeper analysis to see the impact of the trimming before running an actual trim. You can perform this analysis independently, or alternatively, we provide two recommended options for your analysis. +Before you start your analysis, you should update the `TargetExpirationDate` column in your report file to the dates that you want, like the versions to be expired. Again, if you choose a date that is in the past for a version, then that version will be treated as "version that had already expired" and will be deleted right away after you start the trim. ++You can manually update the dates in `TargetExpirationDate` by editing the csv file. However, you may have too many rows to update by hand. To bulk update the column, you can use Excel formulas, or you can also use one of the PowerShell scripts we have provided in [Tutorial: Run 'What-If' analysis](tutorial-run-what-if-analysis.md). Specifically, you may choose a trimming mode, run the corresponding script to get a updated csv file with `TargetExpirationDate` filled out based on that trimming mode, and continue from there. ### Option one: Analyze the report using Excel Populate the workbook by following these steps: 1. On the **Configuration** worksheet, enter the full path to the What-If report file in **Cell B3**. + :::image type="content" source="media/version-history/analyze-version-step1.png" lightbox="media/version-history/analyze-version-step1.png" alt-text="Screenshot of configuration worksheet."::: 2. If you want to change the date range of graphs in **Number of Versions Available** worksheet, or **Size of Versions Expired** worksheet, change the corresponding values in Cells B6, B7, B10, and/or B11. It's optional. + :::image type="content" source="media/version-history/analyze-version-step2.png" lightbox="media/version-history/analyze-version-step2.png" alt-text="Screenshot of analyze version configuration."::: 3. At the top of Excel, select the **Data** tab, and in the Ribbon, select the **Refresh All** button. + :::image type="content" source="media/version-history/analyze-version-step3.png" lightbox="media/version-history/analyze-version-step3.png" alt-text="Screenshot of analyze version data tab."::: 4. On the **Calculations** worksheet, autofill the **Number of Versions** and **Number of Versions Remaining After Deletion** columns. + :::image type="content" source="media/version-history/analyze-version-step4-a.png" lightbox="media/version-history/analyze-version-step4-a.png" alt-text="Screenshot of calculations worksheet 1."::: + :::image type="content" source="media/version-history/analyze-version-step4-b.png" lightbox="media/version-history/analyze-version-step4-b.png" alt-text="Screenshot of calculations worksheet 2."::: 5. On the **Impacted Users** worksheet, autofill the **Number of Versions Will be Deleted** column. + :::image type="content" source="media/version-history/analyze-version-step5.png" lightbox="media/version-history/analyze-version-step5.png" alt-text="Screenshot of impacted users worksheet."::: All worksheets should now be up to date. You can check the information you're interested in. Write-Host . ΓÇ£<path to AnalyzeReportFile.ps1>ΓÇ¥ ΓÇôReportLocalFilePath ΓÇ£<path to the file version expiration What-If report .csv file>ΓÇ¥ ``` + :::image type="content" source="media/version-history/analyze-report-powershell-command.png" lightbox="media/version-history/analyze-report-powershell-command.png" alt-text="Screenshot of analyze report powershell command."::: 3. The output displays four tables: Write-Host 1. **NumberOfVersionsExpired**: the number of versions expired on that date under the current schedule. 1. **SizeOfVersionsExpiredMB**: the size of versions expired on that date under the current schedule. + :::image type="content" source="media/version-history/current-expiration-schedule.png" lightbox="media/version-history/current-expiration-schedule.png" alt-text="Screenshot of Current Expiration Schedule."::: - **Target Expiration Schedule:** this table is the same as Current Expiration Schedule but reflects the updated schedule instead. This table is only helpful if you want to test out different expiration scenarios by changing the **TargetExpirationDate** column in the file version expiration report. + :::image type="content" source="media/version-history/target-expiration-schedule.png" lightbox="media/version-history/target-expiration-schedule.png" alt-text="Screenshot of Target Expiration Schedule."::: - **Files with Fewer Than 10 Versions:** a list of the URLs, and the number of versions before and after the deletion for those files whose number of versions is fewer than 10 after immediate deletion (but was more than 10 before the immediate deletion). + :::image type="content" source="media/version-history/files-with-fewer-than-10-versions.png" lightbox="media/version-history/files-with-fewer-than-10-versions.png" alt-text="Screenshot of files with fewer than 10 Versions."::: - **Users Impacted:** the users whose versions would be immediately deleted. + :::image type="content" source="media/version-history/users-impacted.png" lightbox="media/version-history/users-impacted.png" alt-text="Screenshot of Users Impacted."::: Optionally, you can adjust the parameters: |
SharePoint | Version Storage Report Site | https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/commits/public/SharePoint/SharePointOnline/version-storage-report-site.md | As a SharePoint admin in Microsoft 365, you can request an inventory of the vers > [!NOTE] > Additional reporting options are available withΓÇ»[Microsoft Graph Data Connect](/graph/data-connect-datasets#onedrive-and-sharepoint-online). -When you run the report, a background timer job is scheduled to generate a CSV file of every file version on a given SharePoint site. The CSV file is saved to the location of your choice on the site. If you don't want site members to see the report, consider creating a folder with different permissions where only site owners can access the report. +When you run the report, a background timer job is queued to generate a CSV file of every file version on a given SharePoint site. The CSV file is saved to the location of your choice on the site. If you don't want site members to see the report, consider creating a folder with different permissions where only site owners can access the report. > [!IMPORTANT] > The file version report generation job completes asynchronously over the next few days. The time it takes for the report to complete depends on the size of your library or site. For smaller sites or libraries, it takes over 24 hours to complete. For larger ones, it takes a few days to complete. |