Offline Files Feature in Windows

Spread the love

Before you start

Objectives: Learn what is Offline Files feature in Windows, why it is used, and how it should be configured.

Prerequisites: no prerequisites.

Key terms: Offline Files, Windows, description, usage


 Offline Files Feature

When working in corporate environmet, we will often have shared folders on servers. For mobile users, there is a time when they will want to access those shared files and folders when they are not connected to the corporate network. Offline files is a feature on portable computers running Windows that enable files and data that are stored on shared folders to be cached temporarily on the portable computer itself. This allows users to access and work on that information when the portable computer is no longer connected to the network. When the computer reconnects back to the network, the offline content is synced automatically. Offline files feature is not available in all editions of Windows. For example, when it comes to Windows 7, it is available in Professional, Enterprise and Ultimate editions.

We can also use the Offline Files feature to ensure access to files when our network sustains a temporary disruption, such as Wide Area Network (WAN) link failure. When a user chooses a file to be made available for offline access, Windows stores a copy of that file within a local cache. When the file server that hosts the file is no longer available, Offline Files enables the user to continue to work with the file stored in local cache. When the file server becomes available, Windows syncs the copy of the file in the cache with the copy of the file in the shared folder on the server.

If a user modifies a file that has been made available offline, the file will sync with the shared folder when the computer gains connectivity to the network, and the modified file will replace the one on the shared folder. If the original file on the shared folder has changed, and the file in the local cache has not, the sync process overwrites the file in the local cache. If both files were changed, sync center will prompt the user to decide if they should overwrite the file and delete their changes, or save it as a copy.

Different versions of Windows may have different operating modes of Offline Files. In Windows 7 the modes are:

  • Online – the default mode. Changes made to files are first applied to the file share, and then to the local cache. The sync is automatic.
  • Auto Offline – active when there is no connectivity to the network. In this mode, all file changes are saved to the local cache. By default, Windows will try to connect to the network every two minutes. Once connected, the changes are synced, and the operation mode is switched to the Online mode.
  • Manual Offline – requires a user to select the Work Offline option in Windows Explorer. To switch back to online mode, the user must select the Work Online option.
  • Slow Link – it is triggered when the network link speed drops below 64 Kbps, or any value we configure trough Group Policy settings. In this case, the mode will change to manual offline mode and the user will have to manually perform the sync. When the network speed increases again, the computer will automatically go back into online mode.

Offline Files Configuration

Offline Files Configuration involves configuring Windows workstation to cache offline files. Also, we have to enable the shared folder to allow files within it to be cached. We can configure the Windows workstation for Offline Files manually trough the Sync Center utility, or trough Group Policies. Common Group Policy settings related to Offline Files are:

  • Administratively Assigned Offline Files – list of files and folders that are always made available offline for users.
  • Configure Background Sync – frequency in which automatic background sync occurs in slow link mode.
  • Encrypt the Offline Files Cache – configures a client to encrypt the local cache of offline files and folders.
  • Configure Slow Link Speed – the slow link speed threshold configuration in bits per second for switching to slow-link mode.
  • Exclude Files from Being Cached – we can exclude certain files from being available offline.

After configuring the computer for Offline Files, we need to enable files to be saved offline in the offline settings in shared folders. When we create a share, we can either choose to prevent files from being cached, choose to be manually cached, or we can make them available offline automatically.

Transparent Caching

Starting from Windows 7, we also have a new feature called Transparent Caching. When enabled, Windows keeps a cache copy of all the files that a user opens on a shared folder, on a local client. The first time a file is opened, it is stored in a local cache. The next time user opens a file, Windows checks the file to ensure that the cached copy is up to date. If it is, it will open the local cache copy. If it is not up to date, the client caches the copy from the shared folder, and opens the local copy again. Trough the use of transparent caching, we can speed up access to files stored on file servers. Transparent caching works on all files in shared folders, not just those that we have configured to be available offline. Note that when a user changes a file, the client writes the changes to the copy of the file stored on the shared folder. When the shared folder is unavailable, or the client loses network connectivity, the transparently cached copy is not available. Transparent Caching doesn’t work like Offline Files. It will not attempt to keep the local copy synced with the shared folder. Transparent caching is similar to BrachCache, but we don’t need a BranchCache server and clients don’t have to be members of Active Directory (AD). We can configure our computer to enable Transparent Caching based on the ammount of time it takes data to get to and from the file server.

Sync Center

Sync Center comes in handy when a conflict occurs between locally cached copy of the file and the corresponding file on the shared folder. This typically occurs when both the local cache copy has been changed as well as the original copy on the shared folder. Sync Center notifies the user of such conflict trough a dialog, and enables the user to resolve conflicts. Users can either keep their local copy, keep the server version, or keep both versions. If we choose to keep the local version, the locally cached copy will overwrite the original file on the server. In that way the changes made to the file on the server are lost. If we choose to keep the server version, the changes made to the local version are lost. When we keep both versions, the file on the server keeps the same name, and the locally cached version is saved with a different name.

Author: cicnavi