Offline Files

One of the key things that we focused on for Windows Vista was improving the experience for mobile (laptop) users.  If you are like me, you spend quite a bit of time running around with a laptop.  However, when I am in my office, I tend to use my desktop.  The primary way that I share files between my desktop and my laptop is by storing them on a Windows Server (it's also the primary way that I make sure that my files get backed up).  For example, at Microsoft we redirect the "Documents" folder (previously known as "My Documents" in Windows XP) to a share on the server (of course, we use access controls on the folders to make sure that I am the only person who can see my files).

By redirecting key folders like the Documents folder to a file share, my documents are available to me no matter which one of my Windows PCs I am using.  The problem of course is what happens when I don't have access to the server -- such as when I am not on the corporate network or perhaps sitting on an airplane.  Frankly, the same problem exists with any file share that I might try to access when I am not on the corporate network.

Well, as it turns out, we have had a very cool feature in Windows (actually, it's been there since Windows 2000) called "Offline Files."  (We actually used to call it "Offline Folders.")  As the name implies, Offline Files allows you to mark particular folders (and their sub-folders) to be available offline.  When you are on the network, Offline Files automatically synchronizes the folders so that you have a copy of them locally on your hard disk.  Then when you are offline (and don't have access to the actual server), Offline Files makes it look like you are online by simply accessing the locally cached copy.  Later, when you do have access to the file share, Offline Files automatically synchronizes any changes you have made offline with the online version and vice-versa.

So why am I telling you about a feature that's been available since Windows 2000 here in the Windows Vista Team blog?  Well, frankly, because we have made quite a few enhancements in the Offline Files support for Windows Vista.  Here are some examples.

In Windows XP, the transition from online to offline was pretty seamless -- which was good.  The problem was that when you came back to the network and tried to reconnect, it was sometimes less than seamless -- and we fixed that with Windows Vista.  Now, when Windows Vista detects that the server is available, not only do we automatically synchronize any files and folders that changed, but we also automatically redirect any open files to the online copy.

Another thing that always bugged me before Windows Vista was the fact that there was no way to force the transition to "offline mode."  I don't know about you, but before I get on a plane for 5 hours I want to make sure that all the documents that I need are locally available on my laptop.  Prior to Windows Vista, I had to manually turn off my wireless card to make the system think I was offline.  The problem there was that it was a complete disconnect that killed my connection to the Exchange Server.  Now, with Windows Vista, there is a button right in the Explorer tool bar (that is available whenever I am looking at a file share) called "Work Offline" that automatically forces the transition to offline mode.  Of course, when you click the button it changes from "Work Offline" to "Work Online" so that you can force the transition back.  This is a simple way to verify exactly what you will see when you are travelling to double-check that you have everything that you need.

We did some other "fit-and-finish" things to Offline Folders to make it more usable as well.  One example of this is the way that we synchronize the offline files with the online copy.  Offline Files in Windows Vista keeps track of the blocks that are modified while offline and only transfers the changed blocks to the server.  This makes synchronization of changes from the client to the server much faster. I should note that this optimization is only used when transferring changes from client to server; it is not used when transferring changes from the server to the client.  I should also note that some applications (like Microsoft Word) create a new file when you modify an existing document, so you won't see the benefit here.

We also changed the synchronization approach so that we now only try to synchronize the shares for the user that is logged on.  This addresses a problem that users would hit in the past when we used to try to sync all offline folders and the user saw an "access denied" error for the folders that actually belonged to someone else.  Navjot Virk, the program manager for Offline Files, wrote a great blog entry on Offline Files that covers this in more detail and I encourage you to check it out.

There are many ways you can turn on Offline Files.  The simplest way is to browse to a file server, right-mouse to get the context menu for the folder or file that you want to be automatically cached, and select "Always Available Offline."  You are done; it's just that easy.  Work with the files/folders just like you would normally whether you are travelling (and disconnected from the network) or working at your desk (and connected to the network).  Windows Vista's Offline Files automatically synchronizes all the changes for you without you having to do anything.

Offline Files 2 

If you want to force a manual synchronization, then right-mouse on the folder/file and select "Sync."  You can of course use the "Sync Center" to do this, too.

If you want to have your entire "Documents," "Desktop," "Music," etc., be located on a server (or perhaps different servers), but cached (and synchronized) locally, then simply change the location of the folder to be on a server (or another client) and then mark the folder on the server to  be available offline.  See below.

Offline Files 1 

So if you are like me and you work with multiple Windows PCs and sometimes are not on your main network, go give Offline Folders a try on Windows Vista.  If you are someone who tried it before on Windows XP, then I think you will be very happy with the enhancements we've made in Windows Vista.

jim


Comments

  1. Posted on: March 17, 2007 at 10:43PM  

    I've really been looking forward to the enhancements to Offline Files in Vista. But, I seem to have run into a couple problems preventing me from using the feature and I'd really appreciate some help.

    I'm working with shares of an XP SP2 machine with caching set to "Automatic caching of documents". This allowed my Vista Business workstation to automatically cache files from the share when accessed. After doing this, I have encountered three issues.

    Issue #1: When I go to the Offline Files applet in the Control Panel, I can see the files are correctly filling up against the Temporary offline files. When I click "Delete Temporary Files..." I receive the expected dialogs telling me it's clearing the space and completes successfully. However, the bar doesn't move, the same amount of space is still allocated when the deletion completes, and the files still seem to be available offline. Basically, the button has no practical effect and no space is reclaimed.

    Issue #2: While offline, I moved some folders on the XP machine. When I reconnected with Vista and tried to sync, I received numerous errors all from the folder location that was moved saying "Unable to sync at this time. Please try again." I made no changes to the files while offline. Now I understand some changes were made to this feature to support shares going offline inside of a DFS root, but these are just sub-folders inside of a regular share -- why doesn't it realize the subfolder has been removed and update the namespace accordingly? More importantly, how can I keep this from happening and how can I correct it now that it has (as in, make the sync errors to the non-existent directory stop)?

    Issue #3: From the General tab of the same applet, I clicked "View your offline files" and navigated to the share giving me trouble. Inside, I was able to see all of my folders Online except for the cached copy of the one I had moved -- it was marked Offline (need to sync). Well, I wanted to delete it from the cache since it had been moved on the server. So, I right-clicked and selected "Delete Offline Copy". I was greeted with, "Completed deleting offline copes." Yet, the cached folder was still listed -- no change.

    So to sum up, why doesn't it recognize a moved folder in this situation, and why can't I delete anything from the offline files cache?

    I have reproduced this on two different Vista installations. I can completely clear the cache and start over, but that doesn't prevent it from happening again.

  2. Posted on: March 18, 2007 at 1:05AM  

    I agree with dtrounce on the need to exclude subfolders from the offline cache.  

    It's very impractical to modify my data structure to create an offline branch.  I want certain folders available offline in each of my different data folders (music, pictures, documents, etc.)  I also want to modify my offline selection at any time.  The setting is there in gpedit.msc. (User Configuration>Administrative Templates>System>Folder Redirection>'Do not automatically make redirected folders availaible offline')

    Very confusing why it doesn't do what it says it does.  And please don't just issue an update that removes that from the policy ;)

  3. Posted on: March 19, 2007 at 1:55PM  

    What about encryption?  I have my offline files encrypted via Group Policy, but when I got my new laptop with Vista Ultimate and made my personal drive share available offline, I was denied access to all my files, even when I was docked and on my office network.  I got a new certificate, but that did not seem to remedy the situation.  The only remedy was to reverse the "make available offline" action.  What can I do to mitigate this problem?

  4. Posted on: March 20, 2007 at 4:33PM  

    BillJr...

    What brand of laptop did you purchase?

  5. Posted on: March 20, 2007 at 4:33PM  

    BillJr...

    What brand of laptop did you purchase?

  6. Posted on: March 20, 2007 at 4:38PM  

    BillJr... another question.

    Are you able to create encrypted files on a local hard drive?  For example, create a file in a directory on the local hard drive and try to encrypt it.  Is this successful?

  7. Posted on: March 25, 2007 at 4:56PM  

    On not being able to exclude subfolders from being taken offline (a removal of functionality from XP):

    DavidJ explained the problem with the new offline files paradigm. It is impractical to split and replicate a master, shared directory structure just to exclude subfolders from being taken offline on one particular occasion for one particular laptop.

    What about when the subset you want offline changes? I have multiple clients and projects with >200GB of data, so not all data will fit on a single laptop HD in one go. When I travel to visit one client, I exclude a few (but not all) large data subfolders (total 10-20GB) for another client from being taken offline, which frees up space for other subfolders to be taken offline. I change what gets taken offline every week before I travel to different places - it would be impractical to reorganize the master folder (and their backups) each week.

    On multiple laptops, how do you maintain separate directory structures where each laptop wants a different, overlapping subset of leaf-level subfolders of the master folder offline? You would need to duplicate shared folders on the server to support multiple laptops - an impossible solution for keeping files in sync, at which point you have lost the purpose for using offline files. This is easy and uncomplicated in XP but is now impossible in Vista with this removal of functionality.

    The model should be as similar to that for portable media devices, which can only hold a subset of your total media, and for which the subset can be changed all the time. This model does not confuse even novice users - it is extremely common. At least let advanced users turn this default behavior off as with XP. Much as I would like to make the shift for the new asynchronous sync behavior, this really is a deal-breaker for Vista.

    On multiple CSC caches across multiple laptop HDs (feature request):

    Obviously there are technical challenges with offline files and group policy but these could be solved in due course. On the management aspects however, it seems that you already have faced (and solved) similar issues with the ReadyBoost feature in Vista, where an external USB flash drive can be used for an encrypted swap file, but only when it is plugged in.

    The secondary hard disks could be formatted as NTFS (mine already are), and thus could support encrypted secondary CSC cache folders. To the laptop, they already appear as secondary internal local SATA HDs (not USB external HDs). It's just that they are not always plugged in, and need a suspend/resume cycle to swap out for other HDs or a DVD player.

    I currently use third-party sync software (ICE Mirror) to manage the offline folders between my servers and the secondary HDs, but it would be much better to be able to take advantage of the Windows offline files functionality to manage this instead.

  8. Posted on: March 25, 2007 at 6:06PM  

    Hi All,  I am having real perfornamce issues with Vista Ultimate - works fine on my LAN at home but the disk grinds away when connected to the LAN at work and stops all other fuctions (even task manager takes 6mins or so to start)... the only difference i can see is that i have a large (40Gb+) amount of data in Offline Files (domain server is Win2000 Server - and yes, i have disabled opportunistic locking on the server... i am assuming that it is the back ground sync process that is causing the problems... is there a way to lower its priority or something? thanks in advance for any assistance

  9. Posted on: March 26, 2007 at 3:42PM  

    Hi!

    Why again is it not possible to delete a pinned folder or even a whole branch while being offline? I'm travelling with complex directory structures that change a lot, e.g. websites. It is really not very helpful to keep the entire folder structure alive until I'm back online. Or am I doing s.th. wrong here? But when I attempt to delete a folder while I'm offline my system keeps saying s.th. like: "this process can only be performed while having a connection to the network". Thanks for help!

  10. Posted on: March 26, 2007 at 4:45PM  

    schmidtrene...

    What you see is by-design.  Changes to the namespace are not allowed while working offline.  The difficulty is performing a correct synchronization afterward.  The range of complex scenarios in this space is very large.  While supporting a simple rename or delete may be minimally complex, scenarios with multiple "rename" and "deletion" operations both on the client and server while the client is offline are certainly possible.  Correctly synchronizing those is very difficult.  

    This is a frequent request and it is one that is on our list of scenarios to solve in a future release or update.  Currently we do not have a solution available but this is definitely something we are thinking about.

    Thanks for the question!  

Trackbacks

  1. Posted by: Absoblogginlutely on January 29, 2007 at 7:31PM

    Jim Allchin blogs about changes to offline files in Vista and includes the great titbit of information that now, finally, the pc will only sync the files belonging to the user that is logging off so that the access denied...

  2. Posted by: The Filing Cabinet on January 30, 2007 at 1:14PM

    Jim Allchin has been using Offline Files and loves it! Check out his write-up over in the Windows Vista

  3. Posted by: Windows Vista Team Blog on June 08, 2007 at 12:28PM

    In his blog, Microsoft IT Evangelist Keith Combs mentions a couple upcoming chats scheduled for July

  4. Posted by: conexiva.net » C??mo hacer un reinicio (reset) de la base de datos de los Archivos Sin Conexi??n (Offline Files) en Vista on February 03, 2009 at 8:53PM

    Pingback from  conexiva.net » C??mo hacer un reinicio (reset) de la base de datos de los Archivos Sin Conexi??n (Offline Files) en Vista