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
| Way | Started by | Rules that apply |
|---|---|---|
| The scheduled run | Squirrel, once a night, across every included site | Every check in the next section. |
| The Archive button in SharePoint, on a file or a folder | A user, wherever Archive buttons are deployed | None. 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 Path | An administrator | None. Archive by path queues every file in the path that is not already archived. |
| The Archive action on a site row, for a whole site | An administrator | None. 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.
- 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.
- 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.
- The file is not in an excluded library or path. Set per site in the Excluded Libraries and Paths dialog.
- 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.
- The file does not carry an excluded label. A file carrying a label listed on the Sensitivity labels tab of Exclusions is never archived.
- The path does not match Wildcard Exclusion. The global Wildcard Exclusion setting skips any file whose full path contains one of its values.
- The file is larger than the minimum size. The default is 10 KB.
- 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
| Setting | Where | What it does |
|---|---|---|
| Included / Excluded | Site Settings, Edit on a site row; Bulk Site Management for many sites, by pasted URL list or Include ALL Sites and Exclude ALL Sites | Decides 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 Sites | Global Settings; also the switch at the top of Bulk Site Management | Whether a newly found site starts included or excluded. |
How old a file must be
| Setting | Where | What it does |
|---|---|---|
| Last Modified | Global Settings (730 days by default); per site in Site Settings Edit, or in Bulk Site Management's Bulk Update by URL List | Days since the file was last changed. The reliable signal that a file has gone cold. |
| Last Accessed | The 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 Archive | Global Settings for the whole tenant; a site policy or policy template for one site or a group of sites | Gives 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
| Setting | Where | What it does |
|---|---|---|
| Min File Size | Global Settings (10,240 bytes by default) | Files this size or smaller are left alone. |
| Minimum File Size | A site custom policy | The same rule for one site, in place of the global value. Leave at 0 for no minimum. |
Which files are kept out
| Setting | Where | What it does |
|---|---|---|
| Exclusions, File types tab | Global Settings | Extensions that are never archived, such as .tmp. |
| Exclusions, Content types tab | Global Settings | Chosen from the SharePoint content types Squirrel has found across your tenant. |
| Exclusions, Sensitivity labels tab | Global Settings | Microsoft sensitivity (MIP) labels. A file carrying one is skipped even when it meets every other rule. |
| Exclusions, Retention labels tab | Global Settings | Chosen from the retention labels Squirrel has recorded on files. |
| Wildcard Exclusion | Global Settings | Comma-separated values. Any file whose full path, filename included, contains one is skipped, in every site. |
| Excluded libraries and paths | Exclude Libraries / Paths on Site Archive Settings; see Exclude SharePoint Libraries | A library or folder in one site. % wildcards match patterns in folder names within that site. |
| Archive Only These File Types | A site custom policy | An allowlist: only these extensions are archived on that site. Leave empty to allow every type. |
| Exclude These File Types | A site custom policy | A 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.
| Setting | Where | What it does |
|---|---|---|
| Version Limit | Global Settings (500 by default) | How many versions are archived with each file. 0 archives no versions. |
| Azure Storage Tier | Global Settings | Hot, cool or cold storage for archived files. |
| Azure Archive Tier After | Global Settings | Days before archived files move to the deeper Azure Archive tier, where a restore takes longer. |
| Archives Delete After, and retention per sensitivity label | Global Settings and Retention Settings | How long archived files are kept before they are deleted. |
| Orphaned Delete After, Orphaned Site URL | Global Settings | What happens to orphaned files, whose original location is gone. |
| Button Deployment | Settings, then Button Deployment; see Archive and Restore Buttons | Which 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 to | Use |
|---|---|
| Archive anything not changed in two years | Last Modified at 730 days, the default |
| Keep one department's site on a longer or shorter clock | The site's own Last Modified in Site Settings |
| Archive large video files after 30 days and everything else after two years | Filetype Custom Archive, for example .mp4 at 30 days |
| Never archive temporary files anywhere | Exclusions, File types: .tmp, .bak |
| Never archive files carrying a label such as Confidential | Exclusions, Sensitivity labels |
| Never archive a working folder or a whole library | Exclude Libraries / Paths |
| Never archive files with a recognisable name, in any site | Wildcard Exclusion, for example EXPORT_, _FEED |
| Archive only PDFs and Office documents on one site | A site policy with Archive Only These File Types |
| Leave small files alone | Min File Size, or Minimum File Size in a site policy |
| Keep a whole site out of archiving | Set the site to Excluded |
| Move a whole site into the archive now | The Archive action on the site row |
| Archive a whole folder now | Archive/Restore by Path |
| Stop users archiving by hand while keeping self-service restore | Switch off Deploy Archive buttons in Button Deployment |
| See what a policy would take before it runs | Preview 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.
Related pages
- Global Settings - the tenant-wide settings table
- Site Settings - per-site inclusion and thresholds
- Site Custom Policies - per-site file type and size rules
- Exclude SharePoint Libraries - libraries, folders and path patterns
- Bulk Site Management - many sites at once
- Retention Settings - how long archived files are kept
- Stub Files - what stays behind in SharePoint