3

We're planning a forklift upgrade of our NAS and were going to use a utility like Robocopy to move the files over. However we'd like to preserve Windows' "Previous Versions" shadow copies. Any way to do this? Will it happen automatically? I can't find any information about Shadow Copies with Robocopy one way or another.

Edit with clarification:

Both NAS devices are EMC, although we were not planning on using the EMC upgrade tool. (Maybe we should reconsider that decision, but that's another question.)

The shares are CIFS/SMB and are accessed by Windows domain users. End users can access previous versions of files in Windows Explorer by selecting a file and going to "Properties" -> "Previous Versions". So somehow Windows is aware of the alternate versions.

My understanding was that previous version of the file was stored in something like a NTFS resource stream, which it why I think of it as basically file metadata. But maybe that's not right, or not how EMC does it. I don't know what filesystem EMC uses under the SMB covers. But if Windows can access the old file versions over SMB, why can't Robocopy?

Hank
  • 563
  • 1
  • 7
  • 18
  • `Will it happen automatically` - No. `Shadow Copies with robocopy` - robocopy doesn't know anything about shadow copies. – Zoredache Nov 13 '13 at 22:20
  • You say NAS. So are we talking Windows VSS, EMC Snap, Netapp Snapshots...other? Is the existing and new NAS the same vendor/tech? – TheCleaner Nov 13 '13 at 22:27
  • You should know that "files" do not have "previous versions". The file system (or the volume) does. As long as you are not copying the entire file system / volume, there would be no way of preserving the shadow copy history. – the-wabbit Nov 13 '13 at 22:47
  • Thank you all for your follow-up questions. I have updated the original. – Hank Nov 13 '13 at 23:19

2 Answers2

1

My understanding was that previous version of the file was stored in something like a NTFS resource stream, which it why I think of it as basically file metadata.

This is not the case. I do not know much about the EMC Clariion, Symmetrix or VNX product lines (I do not work with EMC products), but most likely, the files served through SMB are not stored on an NTFS file system. Even in a Windows implementation, shadow copies are not "file metadata" but a group of copy-on-write references for occupied file system blocks.

But if Windows can access the old file versions over SMB, why can't Robocopy?

The Explorer is accessing the snapshot history which the NAS is offering via the Shadow Copy interface. Robocopy can't do that as it does not implement calls to the Shadow Copy APIs. What you can do is use the "previous versions" path to get access to a different file share snapshot and use robocopy on that.

So theoretically, you could build up a script doing a copy of an older version, taking a snapshot and subsequently copying the newer version, but you would lose the original snapshot time stamps. You should consult the documentation (and/or EMC support) for a supported way to migrate over a volume together with its snapshots.

the-wabbit
  • 40,737
  • 13
  • 111
  • 174
  • It sounds like we really should work with EMC to solve this, which is fine. But I still feel like if the NAS is serving these copies in a way that Windows can understand, there must be a 3rd party tool that can read & write them as well?? – Hank Nov 20 '13 at 01:24
  • @HenryJackson the trouble is not reading the shadow copies - the Windows Redirector exposes them as a special path in the `\\server\share\@timestamp\directory` notation. Also, tools like [`volrest`](http://technet.microsoft.com/en-us/library/cc780410(v=ws.10).aspx) will help you enumerate versions of the objects. The challenge is to get the shadows *written* to the destination with the original time stamps in place. This would not be possible through the standard APIs. – the-wabbit Nov 20 '13 at 09:14
0

You should instead do a file system level migration, this will preserve your shadow copies if the shadow storage is located on the same logical volume, or on the same NAS volume. File-level migration will not transfer shadow copies. So, if you can get a block-level access to your LUN on the storage level, you can directly transfer the LUN to a new NAS device, and your shadow copies should safely migrate.

Vesper
  • 794
  • 1
  • 9
  • 32