Scenario:
Doing a server migration from old Server 2008 R2 to new Server 2016, following this Server Fault guide: File server migration using Robocopy
After Robocopy completes, enable deduplication on Server 2016 for the copied volume, and then use PowerShell to start dedpulicating manually. After many hours it completes and recovers about 25% of disk space.
Run Robocopy again to copy anything that may have been missed in the initial copy, as a final check of the new server.
....but Robocopy (run from Server 2016) doesn't understand deduplication and so instead proceeds to trash the deduplication chunkstore..
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Sunday, July 8, 2018 12:10:02 PM
Source : \\SERVER-2008\e$\
Dest : \\SERVER-2016\e$\
Files : *.*
Options : *.* /TEE /S /E /COPYALL /PURGE /MIR /ZB /NP /MT:32 /R:1 /W:10
------------------------------------------------------------------------------
*EXTRA Dir -1 \\SERVER-2016\e$\System Volume Information\Dedup\
*EXTRA Dir -1 \\SERVER-2016\e$\System Volume Information\Dedup\ChunkStore\
*EXTRA Dir -1 \\SERVER-2016\e$\System Volume Information\Dedup\ChunkStore\{B7E1F3A4-AAD9-4449-9DF7-5489421C9EC5}.ddp\
*EXTRA File 253504 \\SERVER-2016\e$\System Volume Information\Dedup\ChunkStore\{B7E1F3A4-AAD9-4449-9DF7-5489421C9EC5}.ddp\DedupFileList.1
*EXTRA File 253504 \\SERVER-2016\e$\System Volume Information\Dedup\ChunkStore\{B7E1F3A4-AAD9-4449-9DF7-5489421C9EC5}.ddp\DedupFileList.2
*EXTRA File 28 \\SERVER-2016\e$\System Volume Information\Dedup\ChunkStore\{B7E1F3A4-AAD9-4449-9DF7-5489421C9EC5}.ddp\stamp.dat
*EXTRA Dir -1 \\SERVER-2016\e$\System Volume Information\Dedup\ChunkStore\{B7E1F3A4-AAD9-4449-9DF7-5489421C9EC5}.ddp\COW\
*EXTRA Dir -1 \\SERVER-2016\e$\System Volume Information\Dedup\ChunkStore\{B7E1F3A4-AAD9-4449-9DF7-5489421C9EC5}.ddp\COW\00010000\
*EXTRA File 196608 \\SERVER-2016\e$\System Volume Information\Dedup\ChunkStore\{B7E1F3A4-AAD9-4449-9DF7-5489421C9EC5}.ddp\COW\00010000\00000046.00.RB
*EXTRA File 106496 \\SERVER-2016\e$\System Volume Information\Dedup\ChunkStore\{B7E1F3A4-AAD9-4449-9DF7-5489421C9EC5}.ddp\COW\00010000\00000048.00.RB
[.......]
*EXTRA File 30.3 m \\SERVER-2016\e$\System Volume Information\Dedup\ChunkStore\{B7E1F3A4-AAD9-4449-9DF7-5489421C9EC5}.ddp\Stream\000f0000.00000002.ccc
*EXTRA Dir -1 \\SERVER-2016\e$\System Volume Information\Dedup\Logs\
*EXTRA File 29.7 m \\SERVER-2016\e$\System Volume Information\Dedup\Logs\00000001.kmchange.log
*EXTRA File 999.8 m \\SERVER-2016\e$\System Volume Information\Dedup\Logs\changes.optimization.1.10.archive.etl
*EXTRA File 1000.0 m \\SERVER-2016\e$\System Volume Information\Dedup\Logs\changes.optimization.1.11.archive.etl
*EXTRA File 735.5 m \\SERVER-2016\e$\System Volume Information\Dedup\Logs\changes.optimization.1.12.archive.etl
*EXTRA File 999.8 m \\SERVER-2016\e$\System Volume Information\Dedup\Logs\changes.optimization.1.9.archive.etl
*EXTRA File 1.3 m \\SERVER-2016\e$\System Volume Information\Dedup\Logs\changes.optimization.2.1.archive.etl
*EXTRA Dir -1 \\SERVER-2016\e$\System Volume Information\Dedup\Settings\
*EXTRA File 76 \\SERVER-2016\e$\System Volume Information\Dedup\Settings\Dedup.00.cfg
*EXTRA File 76 \\SERVER-2016\e$\System Volume Information\Dedup\Settings\Dedup.01.cfg
*EXTRA File 2228 \\SERVER-2016\e$\System Volume Information\Dedup\Settings\dedupConfig.01.xml
*EXTRA File 2228 \\SERVER-2016\e$\System Volume Information\Dedup\Settings\dedupConfig.02.xml
*EXTRA File 0 \\SERVER-2016\e$\System Volume Information\Dedup\Settings\VolumeJobLock.bin
*EXTRA Dir -1 \\SERVER-2016\e$\System Volume Information\Dedup\State\
*EXTRA File 2982 \\SERVER-2016\e$\System Volume Information\Dedup\State\chunkStoreStatistics.xml
*EXTRA File 2592 \\SERVER-2016\e$\System Volume Information\Dedup\State\dedupStatistics.xml
*EXTRA File 11.5 m \\SERVER-2016\e$\System Volume Information\Dedup\State\GCReservedSpaceBitmap.tmp
*EXTRA File 1.0 g \\SERVER-2016\e$\System Volume Information\Dedup\State\GCReservedSpaceContainer.ccc
*EXTRA File 46.0 m \\SERVER-2016\e$\System Volume Information\Dedup\State\GCReservedSpaceDeleteLogs.tmp
*EXTRA File 1.0 m \\SERVER-2016\e$\System Volume Information\Dedup\State\GCReservedSpaceFileList.tmp
*EXTRA File 4096 \\SERVER-2016\e$\System Volume Information\Dedup\State\GroupCommitFlushControl0.bin
*EXTRA File 2066 \\SERVER-2016\e$\System Volume Information\Dedup\State\optimizationState.xml
[......]
I aborted it moments after seeing this fly by in the log and recognizing what was happening. But the damage is already done, the data on the deduplicated new server was instantly corrupted by Robocopy as it stormed through \System Volume Information. The new server drive partition has be formatted and recopied all over again from Server 2008.
Is there a safe way to use Robocopy so that it doesn't touch the deduplication volume data?
Also, I have a new concern.. if Robocopy can destroy a deduplicated volume, what else is unsafe to use with a deduplicated volume, that sees right through it and can destroy the underlying data that should only be accessible by the server? (probably should be a separate question..)