Basic knowledge
Many people regularly clean up their bookshelves or drawers and take old materials away from them to free up space for new materials, which can save space, in addition, when there are too many redundant data, the search speed and efficiency will be reduced. We also have the same requirements in enterprise Sharepoint.
After managing SharePoint for a long time, you will find that many users are used to using it as a file storage, and keep accumulating data in it without deleting it, over time, they forget what they need and what they can discard. To prevent this problem, many enterprises have developed many information management policies, which must have a retention policy ). In other words, the so-called storage policy specifies in advance how long a document should be stored after being uploaded to SharePoint. What should be done after the time limit is exceeded.
Specifically, what we need to know is that we do not have to use workflows to implement them. Unless you have special customization requirements, the out-of-the-box information management policy can be implemented.
There are four ways to create a policy:
- Create a retention policy in the site set and apply it to all content types in the site set)
- Create a storage policy for a content type defined in the top-level website (root web)
- Create a storage policy for the content types applied in the document library and list
- Create a storage policy for the document library and list
Example
Here, I will directly demonstrate the creation process of a storage policy for the document library, hoping to help you
Before starting, open the library and folder based retention on the site collection features page. This function is usually enabled by default.
In this example, I directly use the shared documents created by default on each site for demonstration.
Open shared documents, click the library tag, and then click library settings
On the library settings page, click Information Management Policy settings.
On the Information Management Policy Settings page, click Change source.
Select library and folders. The system will prompt some information. You can ignore it and click OK.
In this case, the library based retention schedule will be displayed. Click Add a retention stage… on the right...
In the pop-up stage properties page, there are a lot of options available for you to use, very clear and easy to understand, I will not explain more.
I have set the following rules: files in the document library will be automatically transferred to the recycle bin two days after they are created.
It is worth mentioning that action provides many types of actions that can be initiated, as shown below:
Move to recycle bin |
Move to the recycle bin. The advantage of this is that you will not directly delete files, they will be saved in the recycle bin for a period of time (depending on the settings in your SharePoint ), in this way, you don't have to worry about finding the wrong file. |
Permanently delete |
Permanently deleted. As the name suggests, it is for moving to recycle bin. |
Transfer to another location |
Move to another location. For example, if you have a document library dedicated for backup, you can move the expired files there instead of deleting them. |
Start a Workflow |
Start a workflow. |
Skip to next stage |
Directly start the next stage of the retention policy |
Declare record |
Declaration record. If records has been enabled for your site set, this option allows you to specify a time to change a non-record to a record. In many cases, records cannot be modified. This is a method that allows documents to be properly stored in the system in a static or archive manner .. |
Delete previous drafts |
Delete all previous drafts. This option will retain the major version, but will delete all previous draft (note that draft is not the previous version) |
Delete all previous versions |
Delete all previous versions. This option deletes all versions except the current major version. |
After confirmation, the policy you just created is displayed on the library based retention schedule page. Click OK.
Return to shared documents, select a file at will, open the drop-down menu, and click compliance details
On the compliance details page, you will see that the scheduled occurrence date is July 22, February 25. That is to say, this document will be sent to the recycle bin on that day.