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?