I'm running into issues with Import-PWDocuments. We've been using it for some time now to mirror a server location into ProjectWise to provide select external access to a large set of information. The dataset is roughly 200K files, 50K folders, and the sync usually takes 30-40 minutes each night to verify and sync the delta. The problem we're running into is that the sync thinks it needs to sync the same ~700 files (plus whatever legitimate file additions / modifications there may have been).
I have checked the length of the overall paths (<261), the length of the filenames (<128), and the length of each of the folders (<64). I thought maybe it was an issue with a special character, or some weird file modification date/time discrepancy, but didn't see anything that stood out. I can provide the logs from my last month of sync operations, but would rather not include them in the post.
Thanks for any assistance you are able to provide.
More information would be helpful, including versions of ProjectWise, PWPS_DAB, code snippets, etc.
If you are comparing dates in your scripts, you need to realize that "dates" typically don't match exactly what is on the file vs. what ProjectWise saves. They will be close, but rarely exactly the same. This is due to a number of things. First of all, if your datasource is using SQL Server, then the dates are stored as datetime datatype and these are rounded values.
The accuracy of the timestamp on the file on the file system, typically NTFS, is to a much higher precision, so you will need to account for the likely difference in values when comparing the date that ProjectWise has recorded, and what the file system has recorded.
ProjectWise 03.140, PWPS_DAB 22.214.171.124. I'll send code snippets and logs.
We aren't comparing dates, we are relying on import-pwdocuments -MakeProjectWiseMatchDisk to perform the comparison for mirroring the data. I'm just trying to think of potential causes of the file resync.
Perhaps more alarming is that this same dataset has several files that are synced into ProjectWise, but the delete pass removes them, even though they legitimately still exist in the external location.
I assume the version of ProjectWise you cite is for the machine running the PowerShell script.
Yes, the ProjectWise version running on the server where the sync script is being ran:The OS of the server running the script is Windows Server 2012 R2.We're a Managed Services Hosted site, and the Integration Server hosting the datasource would also be 03.140. I assume all MAS databases are SQL, but don't have direct access to it.
I happened to be speaking with Dave Brumbaugh a few minutes ago we discussed your issue and he noticed that your datasource is hosted by MaS and he suggested using the -ServerIsUtc switch as that was added specifically for MaS hosted systems a while back.
Note that the actual switch name is slightly different than what is in the change log.
You might want to try that switch to see if it fixes the issues that you are seeing.