我今年早些时候有过确切的情景.要回答您的问题,您的Robocopy命令应该没有任何问题.我想分享用于将文件服务器迁移到新的Server 2012 R2 VM的Robocopy命令.
注意:在新的Windows Server 2012 R2服务器上使用相同的驱动器号和完全相同的文件路径.如果不这样做,将导致共享信息不匹配,并且您的迁移失败.
Robocopy开关的详细信息:
/e – Copy subdirectories,including empty ones
/xj – Exclude junction points
/r:2 – 2 retries
/w:5 – 5 second wait between retries
/v – Verbose output for skipped files
/it – Include tweaked files (identical size/timestamp,but different attributes)
/purge – Delete destination files/directories that no longer exist in source
/copyall – Copy data,attributes,timestamps,security (ACLs),owner,auditing info
我从Server 2012 R2 Server运行此命令.
ROBOCOPY /e /xj /r:2 /w:5 /v /it /purge /copyall \\Server2003FileServer\c$\Data c:\Data
然后,您可以从2003服务器导出文件共享信息,然后将共享信息导入2012 R2服务器.我在这里使用KB文章https://support.microsoft.com/en-us/kb/125996来执行我的共享导出.