1
I've set up File History in Windows 8.1 to delete backups older than one month, but that automatic cleanup is not working: The backup target contained files many months older. Cleaning up manually using the GUI provided by File History worked, as well as doing it on the shell using fhmanagew.exe -cleanup [...]
. Creating the backups work as well, they are as current as expected.
There's the following task in the task planner:
\Microsoft\Windows\FileHistory\File History (maintenance mode)
But I don't see from its naming, description, triggers etc. if it does backups only or cleanups as well. It's called [...] (maintenance mode)
, which makes me believe it should handle both, but monitoring the execution after manually triggering the task using Process Monitor, I have the feeling that it handles backing up itself only. But there needs to be some place which triggers cleaning up old data or it needs to be combined with backing it up, either running before or afterwards.
My ultimate goal is that I would like to trigger the cleanup as it happens normally to monitor the behaviour regarding file permissions and stuff like that. But currently I don't know what gets triggered where when to clean things up.
So, how is automatic cleanup of File History triggered in Windows 8.1 and 10?
Looks like automatic cleanup is not triggered automatically (I've tested it on my computer). Runing
fhmanagew.exe
using Task Scheduler seems to be the only workaround. – w32sh – 2019-07-13T07:54:51.737@w32sh Which version of Windows? Do you suggest this is a bug or simply a misunderstanding on my site? I always assumed cleanup gets triggered automatically and never read that one needs to care manually. When reading about cleaning up manually, it's always because a lack of space or problems or such, not about necessary normal usage. – Thorsten Schöning – 2019-07-13T12:13:58.490
Windows 10 v1903. haven't had a chance to test in earlier builds. But I think it's a bug. I'm yet to check if someone has raised this issue in the Windows 10 Feedback tool. – w32sh – 2019-07-13T12:20:11.147
@w32sh My client used Windows 8.1 instead with all updates applied. – Thorsten Schöning – 2019-07-13T12:24:05.247
Asked the same in some MS-community: https://answers.microsoft.com/en-us/windows/forum/windows8_1-update/how-is-automatic-cleanup-of-file-history-triggered/5be79567-3797-4657-9ff2-bf96becffa4d?tm=1563163694289
– Thorsten Schöning – 2019-07-15T06:22:17.327Asked in again in some MS-community: https://social.technet.microsoft.com/Forums/windows/en-US/0be1bc21-0414-4130-80de-a8c5b15b1683/how-is-automatic-cleanup-of-file-history-triggered-in-windows-81-and-10?forum=win10itprogeneral
– Thorsten Schöning – 2019-08-27T13:10:18.777