currently I'm working on a tool for migrating SP2013 to SP2016 (using ShareGate is no option Management says :/) What I'm doing is looping thorugh all Websites in SP2013 and perform a backup in form of a json, keeping all lists, items, documents etc. together.
My export structure looks like this:
structure.json // contains a tree view of webs and their subwebs
123-456-789-000/ // this is a web
|-web.json // contains all the web data like lists, items etc.
|-lists/
|--listname/
|---document.txt
|---...
Currently I'm stuck with importing documents - more specific with their versions. I'm trying to import a document, which is no problem at all, but creating a version needs a checkout/checkin cycle. The checkin overwrites my editor and modified date - causing the farmadmin to be the last editor of all my documents (which should be the user who did it in SP2013).
After some googling I've found ValidateUpdateListItem, but that leads to a checkin (which keeps the editor) but only creates a minor version - I need a major version though.
In SSOM I would impersonate using new SPSite(url, userToken) and perform the checkin inside the user context - but that's no option in CSOM.
Anyone faced this issue, or am I on the wrong way?