Monday, July 17, 2023

File History in Microsoft Windows

Microsoft Windows File History is a type of backup will periodically copy files to another location or another computer. If you lose the files, you can restore from the backup copies. The backup copies will be saved at a destination file store location. The destination location is often a network drive or on a locally attached USB drive which can be quickly removed each evening. A locally attached hard drive on the same machine does not provide geographic redundancy like a network drive, though it can be used to provide file backups. This post describes how to set up File History in Microsoft Windows 10. 

This first example uses a locally attached drive (because it is straightforward to set up local drive is without potential networking issues). The second example will use a network drive.

To set up File History, begin by ensuring you have access to the network share. In File Explorer, open the network share. If prompted for login, enter the login information and check the box for "Remember my credentials".

Next, open the Backup application. If the app is already running, close it and re-open it. Press the MS Windows Start button and type: backup settings
Choose the Backup application.

Choose "Add a drive". 
For this example, drive D: is chosen.

The blue text of "More options" will allow configuration on how often to back up and how long to store backups. Many people will set "Keep my backup" to "Until space is needed".

Under "Back up these folders" choose "Add a folder" and choose a folder. When your folder choice is visible, click on it. You may want to remove some of the folders, such as "Saved Games" or "Favorites". This example will back up the personal music directory. 

Press "Back up now" and the file history backup will begin.

Press the back arrow to confirm "Automatically back up my files" is set to on. 

Press "More options" to go to the "Backup options" screen to learn when the initial backup is complete. This shows the backup is in process with "Backing up your data...".

You may want to use File Explorer to go to the backup drive and confirm a new folder was created with your Windows PC user name and machine name.

In case the PC is destroyed physically or by malware, it will be useful to have File History backups stored on a network drive away from the primary machine. In general, File History configuration is the same, though networking must be properly configured. Occasionally an issue is encountered with the network share.

This example uses the network resource with name NASIX. Confirm you have credentials to access the network share by clicking on the network share or by typing the share name in File Explorer as: \\share-name

The following error message was displayed. This is somewhat confusing in that the network resource appears to be available in Windows File Explorer, yet an error is encountered when attempting to open the resource even before a logon or credential is requested. You may try the "Diagnose" button.

In this example, the error message "Windows cannot access \\sharename" may require several steps to troubleshoot. If you do not have an error connecting, you may skip over this troubleshooting section.
First, log on to the actual network device an ensure it is properly shared. Next, open the Windows PC, open a command prompt by pressing Start button and type: cmd

In the following "net use" example, "z:" can be any available letter and "nasix" is the name of your network share. In the command prompt, type the following: net use z: \\nasix

You may encounter system error 51 or system error 53 such as, "System error 53 has occurred. The network path was not found." 
  • Ensure the necessary networking components are installed and are running. Open "features" from the Start button to open "Optional features". 
  • Clear out any old credentials for the resource. Press Start button and "credential manager". Click on Windows Credentials and remove any out-dated credentials.
  • Ensure the SMB client is installed. Open "services.msc" from the Start button and ensure the "Network Connections" is started. 
  • Open the old control panel app from the Start button, type "control panel", choose "Network and Internet", "View network computers and devices".
  • Also in the old control panel app, search for "sharing" and choose "Manage advanced sharing settings" then confirm network discovery and file sharing are turned on. Double-check all of the discovery and sharing options.

If none of this fixes the system error 53 problem, it may be useful to add a key to the Registry. Tampering with the registry may cause significant problems and may affect future software upgrades in surprising ways. Make a note of what you change in the Registry so you may remove it if necessary.
Press the Start button and type "regedit". Choose Registry Editor. On the left pane, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters and add a key named AllowInsecureGuestAuth as DWORD 32-bit. Set the value to 1. In File Explorer, try to open the network resource. 

Logs for File History may be found in the Event Viewer at %SystemRoot%\System32\Winevt\Logs\Microsoft-Windows-FileHistory-Engine%4BackupLog.evtx

File History settings are also available in the older Control Panel app, at Control Panel\System and Security\File History