7

Several users are using offline folders to refer to a server we want to decommission... actually the server is already offline and people have pending updates to this share.

What is the best way to move these cached files to a new server with a new name without losing the new data?

EEAA
  • 108,414
  • 18
  • 172
  • 242
makerofthings7
  • 8,821
  • 28
  • 115
  • 196

2 Answers2

7

Oy... so i've gone through this before and it's not the most fun. Basically, you need to go offline for each client computer. Then copy the offline files to a safe location, and finally purge the offline folder cache (follow the instuctions linked here http://support.microsoft.com/kb/230738). Then you can copy the file back and everything should be in sync.

Your other option is to create a cname record (guessing here) to point to the new server name, but the path must match verbatim. Eaither way, you'll still want to get that old servername out of the sync list and purging the offline DB is the only way I know how to do it.

FYI, you might want to point your offline files at a DFS share, even if you don't have a second target. This way if you need to move to a new FS down the road, it's controlled at the DFS level and won't affect your clients.

Eric C. Singer
  • 2,319
  • 15
  • 17
  • Using DFS is an incredibly understated piece of this. If you are using offline folders it's important to use DFS to avoid this exact issue. – Jim B Jun 05 '12 at 17:33
3

Windows XP and Windows 2003 have a utility called CSCCMD /MoveShare that can move files from one UNC to another for you:

/MOVESHARE:\Server1\Share \Server2\Share – Use this switch to move files and directories from one share to another share in the cache. This option is useful if the target of offline files has moved and if the local cache now must point to a new location. For example, use the following command:

 CSCCMD /MOVESHARE:\\MyServer\MyShare \\MyServer1\MyShare1

This utility is not supported on Windows Vista and newer, however a COM and WMI interface have been created. For an overview of what is possible, review this COM overview.

VBScript should be able to call this Windows 7 API to move files from one location to another.

In order to used that API you need get VBScript to make WMI invoke a method. I found a few Code samples on this MSFT blog, ... especially this code sample will get you started writing VBScript that renames a file location

Note: In order to run this code you need to have the Desktop Experience installed.

makerofthings7
  • 8,821
  • 28
  • 115
  • 196
  • interesting find, I've never heard of that before. Have you tried it out yet? Anyway, you probably still want to pursue a DFS share, it will make your life a lot easier down the road. – Eric C. Singer Jun 06 '12 at 15:17