In Windows 10 "File History" / Backup (whatever it's called now), is there a way to exclude folders by name? For example, I'd like to exclude all folders named 'bin' from being backed up. Essentially, it would be great to be able to exclude things from file backup like you can do for git using a .gitignore file. Any ideas/suggestions on how to do this?
2 Answers
For anyone who stumbles upon this old post trying to find an alternative to the gui and having to pick exclusions one by one, in the File History configuration folder:
C:\Users\You\AppData\Local\Microsoft\Windows\FileHistory\Configuration
there are two files:
Config1.xml and Config2.xml
You can manually enter xml for all the folders you want to exclude like this:
<FolderExclude>C:\Project\FullPathToFolder\bin</FolderExclude>
All the other includes are fully qualified paths and I am not sure if there is a way to provide a true wildcard but you could script the tags into a listing using a cmd prompt to pick all bin (and/or obj) folders like so
C:\Project>dir bin /B /S
paste them into Excel and fill down this terribly complicated macro to produce the xml without scripting anything:
="<FolderExclude>" & A1 & "</FolderExclude>"
There are two folders that contain the CONFIGS for FH, to control what is backed up or is skipped. They are both in the root of the FH repository. One is on the main hard drive to be backed up, which is partially there to store the files until your external file history drive is reattached. The file that is on your backup, is updated whenever a backup occurs, (default 1 hour).
Although you can edit this, (which is what I generally do), the easiest method is to add or delete folders to or from "the library" file element, using "Explorer", or "File Explorer" as they now call it. (You can turn "viewing libraries" back on, (using Explorer I believe). FH works by automatically choosing all files and folders, and backing up all libraries.
-
Since you are using Windows 10, a larger concern is not the excluded folders, it is if FH is working to run at all. A year or so with one of the "Windows updates", they downgraded by turning OFF FH, so it no longer works! They disabled the services, and I think also changed or eliminated the scheduler. Of course, they didn't tell you that they were doing this, they just "did it". You CAN turn FH back on however, fairly easily, at least partially by just re-enabling the FH services.– JoeCoolJun 12 at 21:54
node_modules
...