Skip to content
SmiKar Software

How Squirrel Decides What to Archive: Every Rule and Setting

11 min read · Last updated · Page version 1

A file reaches the Squirrel archive in one of four ways, and only one of them reads your archive policy. This page lists every rule an administrator can set for that policy, where each one is set, which setting wins when two overlap, and which rules the manual routes leave out. Each row links to the page that explains the setting in full.


The four ways a file gets archived

WayStarted byRules that apply
The scheduled runSquirrel, once a night, across every included siteEvery check in the next section.
The Archive button in SharePoint, on a file or a folderA user, wherever Archive buttons are deployedNone. It archives what was selected, whatever its age or size. See How to Archive Files.
On demand from the portal: search, or Archive/Restore by PathAn administratorNone. Archive by path queues every file in the path that is not already archived.
The Archive action on a site row, for a whole siteAn administratorNone. The confirmation reads "This will archive EVERY file in the site, ignoring all policy values". See full site archive.

The three manual routes take exactly what was selected. To see what the policy itself would take, use Preview on the site row: it counts the files the current policy would archive and changes nothing.


The checks the scheduled run makes

Each night Squirrel goes through every included site and queues a file only if it passes every check below. Failing any one leaves the file in SharePoint.

  1. The site is included. Set per site in Site Settings, or for many sites at once in Bulk Site Management. Auto Include New Sites decides whether a newly found site arrives included or excluded.
  2. The file is old enough. It must be older than the Last Modified threshold and older than the Last Accessed threshold. Both must be met, not either. Last Accessed is switched off by default, so out of the box only Last Modified applies, at 730 days (two years). Last accessed history builds from the day Squirrel was installed, so a file can be old and still lack enough observed history. A file type listed under Filetype Custom Archive is judged against its own age instead.
  3. The file is not in an excluded library or path. Set per site in the Excluded Libraries and Paths dialog.
  4. The file type is allowed. A file of a type on the File types tab of Exclusions is never archived. A site with its own policy uses the policy's archive-only and exclude lists instead.
  5. The file does not carry an excluded label. A file carrying a label listed on the Sensitivity labels tab of Exclusions is never archived.
  6. The path does not match Wildcard Exclusion. The global Wildcard Exclusion setting skips any file whose full path contains one of its values.
  7. The file is larger than the minimum size. The default is 10 KB.
  8. The file is live and ready. It is not already archived, not already waiting in the queue, not deleted, not a stub, and has not already failed three times (the errors table shows those).

Files that pass are queued largest first.


Every setting, and where it is set

Which sites are archived

SettingWhereWhat it does
Included / ExcludedSite Settings, Edit on a site row; Bulk Site Management for many sites, by pasted URL list or Include ALL Sites and Exclude ALL SitesDecides whether the scheduled run looks at the site at all. A whole-site restore sets the site to excluded afterwards, so restored files are not archived again straight away.
Auto Include New SitesGlobal Settings; also the switch at the top of Bulk Site ManagementWhether a newly found site starts included or excluded.

How old a file must be

SettingWhereWhat it does
Last ModifiedGlobal Settings (730 days by default); per site in Site Settings Edit, or in Bulk Site Management's Bulk Update by URL ListDays since the file was last changed. The reliable signal that a file has gone cold.
Last AccessedThe same three places (switched off by default)Days since the file was last opened. Searches, backups and antivirus can touch files that nobody is reading, so most deployments leave it off.
Filetype Custom ArchiveGlobal Settings for the whole tenant; a site policy or policy template for one site or a group of sitesGives chosen file types their own age, in days, months or years, counted from Last modified, Last accessed or Site setting. Leave the age blank to archive that type at any age.

On a site, a threshold of 0 means "follow the global setting". Bulk Site Management offers presets of 30, 60 and 90 days, 6 months and 1, 2, 3 and 5 years, or a custom number of days.

How large a file must be

SettingWhereWhat it does
Min File SizeGlobal Settings (10,240 bytes by default)Files this size or smaller are left alone.
Minimum File SizeA site custom policyThe same rule for one site, in place of the global value. Leave at 0 for no minimum.

Which files are kept out

SettingWhereWhat it does
Exclusions, File types tabGlobal SettingsExtensions that are never archived, such as .tmp.
Exclusions, Content types tabGlobal SettingsChosen from the SharePoint content types Squirrel has found across your tenant.
Exclusions, Sensitivity labels tabGlobal SettingsMicrosoft sensitivity (MIP) labels. A file carrying one is skipped even when it meets every other rule.
Exclusions, Retention labels tabGlobal SettingsChosen from the retention labels Squirrel has recorded on files.
Wildcard ExclusionGlobal SettingsComma-separated values. Any file whose full path, filename included, contains one is skipped, in every site.
Excluded libraries and pathsExclude Libraries / Paths on Site Archive Settings; see Exclude SharePoint LibrariesA library or folder in one site. % wildcards match patterns in folder names within that site.
Archive Only These File TypesA site custom policyAn allowlist: only these extensions are archived on that site. Leave empty to allow every type.
Exclude These File TypesA site custom policyA denylist: these extensions are never archived on that site.

What the archive keeps, and for how long

These do not choose which files are archived. They shape what is kept with each file and how long it stays.

SettingWhereWhat it does
Version LimitGlobal Settings (500 by default)How many versions are archived with each file. 0 archives no versions.
Azure Storage TierGlobal SettingsHot, cool or cold storage for archived files.
Azure Archive Tier AfterGlobal SettingsDays before archived files move to the deeper Azure Archive tier, where a restore takes longer.
Archives Delete After, and retention per sensitivity labelGlobal Settings and Retention SettingsHow long archived files are kept before they are deleted.
Orphaned Delete After, Orphaned Site URLGlobal SettingsWhat happens to orphaned files, whose original location is gone.
Button DeploymentSettings, then Button Deployment; see Archive and Restore ButtonsWhich sites get Archive and Restore buttons in SharePoint. Switching off Deploy Archive buttons leaves users able to restore but not to archive.

When settings overlap

  • A site policy wins over the global setting for the same option. This covers the minimum size, the file type lists and Filetype Custom Archive.
  • A site policy's file type lists replace the global File types list for that site. They are not added to it. Everything else still applies to that site: library and path exclusions, excluded sensitivity labels and Wildcard Exclusion.
  • A site's own age thresholds win over the global ones. A threshold of 0 on the site hands the decision back to the global value.
  • A file type with its own age uses that age in place of the site's. The type has to be one Squirrel archives, so it stays off the exclude list and, if the site has an archive-only list, on it.
  • A file type cannot be both excluded and given its own age. The editor flags the conflict and holds the save until one list is changed.
  • An exclusion beats an age. A file of an excluded type or carrying an excluded label is never archived, however old it is.
  • Changes take effect at the next nightly run. They apply to files that are not yet archived. Files already archived stay archived; restore them if you want them back in SharePoint.

Which rule do I use?

I want toUse
Archive anything not changed in two yearsLast Modified at 730 days, the default
Keep one department's site on a longer or shorter clockThe site's own Last Modified in Site Settings
Archive large video files after 30 days and everything else after two yearsFiletype Custom Archive, for example .mp4 at 30 days
Never archive temporary files anywhereExclusions, File types: .tmp, .bak
Never archive files carrying a label such as ConfidentialExclusions, Sensitivity labels
Never archive a working folder or a whole libraryExclude Libraries / Paths
Never archive files with a recognisable name, in any siteWildcard Exclusion, for example EXPORT_, _FEED
Archive only PDFs and Office documents on one siteA site policy with Archive Only These File Types
Leave small files aloneMin File Size, or Minimum File Size in a site policy
Keep a whole site out of archivingSet the site to Excluded
Move a whole site into the archive nowThe Archive action on the site row
Archive a whole folder nowArchive/Restore by Path
Stop users archiving by hand while keeping self-service restoreSwitch off Deploy Archive buttons in Button Deployment
See what a policy would take before it runsPreview on the site row

Checking what a rule will do

  • Preview on a site row counts the files the current thresholds and policy would archive. It changes nothing, so use it before changing a threshold.
  • If a particular file has not been archived, the FAQ walks through the same checks in order.
  • The Proof of Concept walkthrough tests each kind of rule on a single site.

Need a second opinion on a policy? Reach out to support@smikar.com.


More in Squirrel

See all pages →