http://jensolekragh.wordpress.com/2009/06/06/dfs-r-some-files-are-not-replicating-why/
(read the comment, there are some useful cmd and links.)
Recently one of my customers call me and wanted me to take a look at his DFS replication. All files didn’t replicate to the headquarter from the Branch Offices. Is that a problem? Yes it’s a big problem since backup only runs at the datacenter servers. That’s why we replicate all files to the datacenter in the first place!
Hmm, I did a check up at all replicated folders and found a couple of errors and dead replication members, but nothing seemed to relate to the files not getting replicated and DFS-R seemed to work as it should. I found out that all the files not getting replicated were PDF files and all PDF files were company contracts? But other PDF files replicated okay!
After a little investigation I found that all PDF files were scanned from a multi-copy printer and that lead me to check the files scanned with that printer. After scanning a document, the document is mailed to you and you are able to save the PDF files to your Namespace….but the PDF file did not replicate to the headquarter, WHY?
There is a pretty good explanation.
Checking the PDF files, I found out that all the PDF files not replicating were marked as temp files. DFS-R don’t replicate files marked as temp files, of course, why replicate a file that’s going to be deleted soon. So all PDF files scanned with that printer was marked as temp files (temp attribute), not so good. My customer worked out a temporary solution. All scanned documents are opened in Adobe Acrobat and saved from there to the Namespace, resulting in a PDF File that get’s replicated. My customer is now contacting the manufacturer of the printer to get a solution.
DFS-R cannot be configured to replicate files with the temp attribute
But how did I see the temporary stamp on the files?
Using fsutil.exe (part of Windows OS) you are able to see the attributes at the file. Using Explorer, attrib.exe don’t display the attribute.
fsutil usn readdata D:\shares\Production\Contract.pdf
Major Version : 0×2
Minor Version : 0×0
FileRef# : 0×0021000000002350
Parent FileRef# : 0x0003000000005f5e
Usn : 0x000000004e531000
Time Stamp : 0×0000000000000000 12:00:00 AM 1/1/1601
Reason : 0×0
Source Info : 0×0
Security Id : 0x5fb
File Attributes : 0×120
File Name Length : 0×10
File Name Offset : 0x3c
FileName : Contract.pdf
File Attributes is a bitmask.
0×100 (Temporary) and 0×20 (Archive) = 0×120 indicates the temporary attribute is set.
Other values
READONLY 0×1
HIDDEN 0×2
SYSTEM 0×4
DIRECTORY 0×10
ARCHIVE 0×20
DEVICE 0×40
NORMAL 0×80
TEMPORARY 0×100
SPARSE_FILE 0×200
REPARSE_POINT 0×400
COMPRESSED 0×800
OFFLINE 0×1000
NOT_CONTENT_INDEXED 0×2000
ENCRYPTED 0×4000