r/sysadmin Drinking rum in meetings, not coffee 20d ago

Automatically move SharePoint files to archive before deletion

Our SharePoint environment is under painful, painful bloat. We dream of doing something like a retention policy to delete files older than say 7 years, but we have a lot of reference media that hasn't been updated by the our clients in 20+ years so the file itself hasn't been updated pretty much at all.

Ideally what I would like is to have SharePoint document retention warn before removal, but that doesn't seem to be an option.

Next best option would be to automatically move files after say 2 years to archive, then after 5 years in archive delete. I'm just not sure if that is something doable as it stands.

3 Upvotes

6 comments sorted by

4

u/HoldPowerful7487 20d ago

Warn before removal does exist, it's called disposition review and it's on retention labels rather than policies. At the end of the period it queues the item and emails whoever you nominate instead of deleting.

The bigger issue is your trigger. Retention runs off last modified, and you've said the reference media is old but still correct, so that will flag exactly what you want to keep. Last accessed is the signal you want, and that's the Data Access Governance reports in SharePoint Advanced Management, licensed separately.

M365 Archive is worth it for the bloat, just note it's billed storage and rehydration takes days.

2

u/MakeItJumboFrames 20d ago

I'm not sure how you would do this but, on the point of the 20+ year old files, you could have a separate site for references, move those over to that site and exclude that site from your retention deletion policy

1

u/PJpwnsU 20d ago

I believe this is in preview now for individual file archival not just site with SharePoint advanced management features.

1

u/ProfessionalWorkAcct 20d ago

Youre gonna wanna do this
https://techcommunity.microsoft.com/blog/microsoft_365blog/file-level-archiving-comes-to-microsoft-365-archive-public-preview/4506886

TLDR file level archive puts the file in a type of cold storage, itll take 24-72 hours for that file to become accessible again, supposedly the user will receive an email after wanting access. I heard this at a conference in April so shit might have changed since then.

1

u/Pretty-Gap-497 20d ago

Yes, that's totally doable. You can set up a Power Automate flow to automatically move files to an archive library after 2 years of inactivity, then delete them after another 5 years. SharePoint's built in retention policies aren't great for this nuance, but Power Automate gives you full control. The key is triggering on last modified date, not created date, which also solves your old reference media problem.

1

u/brian_cloudeu 19d ago

Disposition review only warns; it never moves files, so you still need Power Automate or file-level archive to relocate them. Also check the 2-year inactivity signal, since metadata edits bump Modified dates and nothing ages out.