Skip to content
All articlesArchiving

SharePoint Archiving With Automated Retention Policies

How automated retention works in a SharePoint archive: nightly archive rules by age, retention periods per sensitivity label, and automatic deletion at expiry.

21 Nov 20269 min read
SharePoint Archiving With Automated Retention Policies

SharePoint archiving with automated retention policies

Squirrel automates both halves of retention for archived SharePoint content. A policy run every night archives files once they pass the age you set, and a retention period, set globally or per sensitivity label, decides how long each archived file is kept in your Azure storage before it is deleted automatically. Administrators set the rules once in the Squirrel portal and they apply to every included site.

Retention means three different things in a SharePoint archiving project, and a buyer needs an answer to each:

QuestionAnswered byHow
What must be kept in Microsoft 365, and for how long?Microsoft PurviewRetention policies and retention labels
When does an inactive file move out of SharePoint?Squirrel archive policyRules on age, size, file type, label, path and site, run every night
How long is the archived copy kept?Squirrel retention settingsA global default, a period per sensitivity label, or never delete

This page covers the second and third rows for Squirrel, SmiKar's SharePoint archiving product, and how they sit beside the first. For Purview itself, see retention policies vs retention labels in SharePoint.

Archive rules that run every night

Each night Squirrel goes through every included site and archives the files that pass every rule. Nobody has to start it.

RuleWhat it controlsOut of the box
Site inclusionWhich sites the policy covers. New sites can be included automaticallyThe sites you include
Last ModifiedDays since the file was last changed730 days (two years)
Last AccessedDays since the file was last openedOff
Per-site thresholdsA longer or shorter clock for one siteFollows the global setting
File types at their own ageA chosen file type archived on its own clock, for example video files after 30 daysYour list
Minimum file sizeFiles this size or smaller stay in SharePoint10 KB
Excluded file typesExtensions that stay in SharePoint, such as .tmpYour list
Excluded sensitivity labelsFiles carrying a label you nominate stay in SharePointYour list
Excluded libraries and pathsA library, a folder or a path pattern stays in SharePointYour list

Three things make the rules safe to change:

  • Preview on a site counts the files the current policy would archive and changes nothing.
  • Site policies and templates. A site policy overrides the global setting for that site, and a policy template applies one set of rules to a group of sites.
  • Changes apply from the next nightly run, to files that are still in SharePoint.

Alongside the nightly run, users can archive a file or folder with the Archive button in SharePoint, and administrators can archive a folder path or a whole site on demand.

Retention periods for archived files

The Squirrel Retention Settings dialog listing each sensitivity label with its retention period: global default, a number of days, or never delete

Retention Settings decide how long an archived file stays in your Azure Blob Storage. Each Microsoft sensitivity label in your tenant gets one of three settings:

SettingWhat happensUse it for
Global defaultThe label follows the tenant-wide Archives Delete After settingMost content
Custom daysArchived files with this label are kept for the number of days you enter, then deleted automaticallyContent with a set retention period, such as 2,555 days for seven-year financial records
Never deleteArchived files with this label are kept indefinitelyPermanent records, and content you may need for a legal matter

Out of the box the global setting keeps archived files indefinitely. Deletion starts only when you set a period. The portal shows long periods in years and months beside the day count, for example "1825 days (5 years, 0 months)".

DaysPeriod
3651 year
7302 years
1,8255 years
2,5557 years
3,65010 years

When a period ends, the archived file is deleted from your Azure storage automatically. Deletion at the end of a period is permanent, so agree each period with your records or compliance team first. Changes to retention settings are logged with the email address of the administrator who made them.

Storage tier rules

SettingWhat it does
Azure Storage TierThe tier archived files are written to: hot, cool or cold. Cold is the default
Azure Archive Tier AfterMoves archived files to the Azure Archive tier after the number of days you set

Versions, orphaned files and deleted files

  • Version Limit sets how many versions are archived with each file. The default is 500.
  • Orphaned Delete After sets how long archived files whose stub has gone are kept: a period from 120 to 3,650 days, or indefinitely. Each deletion is recorded in the audit trail.
  • Recycle Bin Capture preserves the files users delete. After a grace period, seven days by default, Squirrel captures the deleted file into your Azure storage and keeps it for the retention period you set.

How this works with Microsoft Purview retention

Squirrel works alongside active Purview retention policies:

  • Squirrel records each file's retention label and sensitivity label when it archives the file.
  • Files declared as records are skipped and stay in SharePoint.
  • Files carrying a sensitivity label you nominate stay in SharePoint.
  • Retention set on a site or a library applies to stubs and to restored files, because both are items in that library.

Where a Purview retention policy covers a site, SharePoint keeps a preserved copy of content removed from a library in the Preservation Hold Library. How to replace the SharePoint Preservation Hold Library explains how Recycle Bin Capture and per-label archive retention can take over that job.

Microsoft also offers its own route: Purview retention archiving for SharePoint moves files under retention into Microsoft 365 Archive. For content under legal hold, see SharePoint archiving and legal hold.

Retention questions to ask any archiving vendor

Use these when you compare SharePoint archiving services. Each has an answer you can test in a proof of concept.

  1. Do archive rules run on a schedule, or does someone have to start them?
  2. Can rules differ by site, by file type and by label?
  3. Can you preview what a rule will archive before it runs?
  4. Can archived content have its own retention period, and can that differ by classification?
  5. What happens when the period ends, and are changes to the settings logged?
  6. What happens to files declared as records?
  7. Does the archive stay in storage you own?

Squirrel's answer to each is on this page. The SharePoint archiving buyer's checklist has the wider set of tests.

Frequently asked questions

What SharePoint archiving services support automated retention policies?

Squirrel by SmiKar supports them in two layers. Archive policies run every night and move files to your own Azure storage once they pass the age, size, file type and label rules you set. Retention settings then keep each archived file for a period you choose per sensitivity label and delete it automatically at the end. Microsoft Purview provides retention policies and labels for content inside Microsoft 365, and many organizations run both together.

Can different types of content have different retention periods in the archive?

Yes. Each sensitivity label can follow the global default, have its own period in days, or be set to never delete. For example, a finance label can be kept for 2,555 days while general content follows the global default.

Does Squirrel delete archived files automatically?

Only when you set a period. Out of the box archived files are kept indefinitely. Once a global period or a per-label period is set, archived files are deleted from your Azure storage when that period ends.

Can I see what a policy will archive before it runs?

Yes. Preview on a site counts the files the current policy would archive and changes nothing.

How does archive retention relate to Purview retention labels?

They work together. Purview retention policies and labels govern content in Microsoft 365. Squirrel records each file's retention and sensitivity labels at archive time, leaves files declared as records in SharePoint, and applies its own retention period to the archived copy in your Azure storage.

Can I archive some file types sooner than others?

Yes. A file type can be given its own age, counted from the last modified or last accessed date. For example, video files can be archived after 30 days while everything else follows the two-year default.

Next steps

Set the rules once

Squirrel archives inactive SharePoint files into an Azure Blob Storage account in your own subscription every night, and keeps each archived file for the retention period you set.

See how Squirrel works

Request a demo

About the author
Mark Smith - Co-Founder, SmiKar Software

Mark Smith co-founded SmiKar Software in 2015 and has spent the past decade helping organisations solve Microsoft 365 data management challenges. He works with the SmiKar team to build solutions for SharePoint archiving, storage optimisation, governance and compliance, supporting customers from growing businesses through to Fortune 500 enterprises.

More about SmiKar

Ready when you are

Cut your Microsoft 365 storage bill - keep your data in your tenant.