dyn365-ce-vsts-tasks icon indicating copy to clipboard operation
dyn365-ce-vsts-tasks copied to clipboard

MSCRM Export Configuration Migration Data: Export Failure

Open jaredrakoff opened this issue 4 years ago • 15 comments

@WaelHamze I am consistently producing errors when I try to run this task. I'm able to reproduce the error against another project, but this tool works fine against different connection strings. I am however able to manually export with the latest XrmTooling Configuration Migration Wpf v9.1.0.9.

Note: This only began erroring out consistently from after Feb 24, 2020.

Please see the error below as this only errors out on devops. Thanks Error logs_14719.zip

jaredrakoff avatar Mar 02 '20 17:03 jaredrakoff

@WaelHamze After doing some more investigation, it appears that if the data.xml is more than 15 MB, the zip fails to zip.

jaredrakoff avatar Mar 02 '20 17:03 jaredrakoff

@jaredrakoff thanks for sharing this. Do you think this is a powershell module limitation?

You could try to split schema so you have more than one package (may not be ideal)

WaelHamze avatar Mar 05 '20 08:03 WaelHamze

@WaelHamze Hi Wael, I'm actually using the out of box Dynamics custom portal schema export file. I noticed that the majority of the size came from annotations/notes from a custom entity. I deleted the notes which fixed my size problem, but that leaves me with 2 problems. There is no filter on extraction of notes and your export fails in size. Are you using the latest version of the MS export tool?

jaredrakoff avatar Mar 05 '20 12:03 jaredrakoff

@jaredrakoff yes the task uses the latest module

WaelHamze avatar Mar 05 '20 22:03 WaelHamze

Hi @WaelHamze.

I must be doing something wrong. I am using the MSCRM Configuration Migration exporter in my build as a task and I filled out the connection string, schema and data file. However, the build fails and I get the below when running my build? Not sure if you can advise.

Shouldn't I have the option to select the path of my configuration data migration tool from the SDK when configuring?

image

davdatong avatar Apr 16 '20 13:04 davdatong

@WaelHamze Ignore my last post. Problem was I was using an older version of the tool installer. I now have the same error message as @jaredrakoff.

I'm doing a test with a schema file with 1 entity and I'm getting the error "Export failed". It seems from the log that the data got exported successfully, so not sure why I get this error? Schema file is 3kb and the data will only contain around 36 records? Any ideas?

image

davdatong avatar Apr 18 '20 13:04 davdatong

I'm not sure. I also noticed that when you extract Annotations (Notes), the entity reference filter is ignored. I only want to export Portal data notes, yet notes from all records are provided.

Can we fix this too? Thanks

On Sat, Apr 18, 2020, 9:05 AM davdatong [email protected] wrote:

@WaelHamze https://github.com/WaelHamze Ignore my last post. Problem was I was using an older version of the tool installer. I now have the same error message as @jaredrakoff https://github.com/jaredrakoff.

I'm doing a test with a schema file with 1 entity and I'm getting the error "Export failed". It seems from the log that the data got exported successfully, so not sure why I get this error? Schema file is 3kb and the data will only contain around 36 records? Any ideas?

[image: image] https://user-images.githubusercontent.com/63793132/79638510-98a3fb00-817d-11ea-9652-032dd753b32f.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/WaelHamze/dyn365-ce-vsts-tasks/issues/153#issuecomment-615867056, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGAE7VT5MWSCWJLT275MDTRNGQSVANCNFSM4K7YUUWA .

jaredrakoff avatar Apr 18 '20 13:04 jaredrakoff

@jaredrakoff Thanks. Does the export fail for you every time even with a simple xml schema now?

davdatong avatar Apr 19 '20 20:04 davdatong

Only if the data becomes greater than 15mb it seems

On Sun, Apr 19, 2020 at 4:08 PM davdatong [email protected] wrote:

@jaredrakoff https://github.com/jaredrakoff Thanks. Does the export fail for you every time even with a simple xml schema now?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/WaelHamze/dyn365-ce-vsts-tasks/issues/153#issuecomment-616217143, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGAE7SRNW23YRGHZDOWFHDRNNK5HANCNFSM4K7YUUWA .

-- Jared Rakoff

jaredrakoff avatar Apr 19 '20 20:04 jaredrakoff

Thanks @jaredrakoff. I figured out my problem. I had to specify the data.zip file in the directory for the export. I assumed it was only the file directory that I needed to specify.

I will be having the same issue as you going forwards as I also need to use the portal xml schema file to migrate to other environments with quite alot of web files. It will be good if the limit of 15mb was resolved.

davdatong avatar Apr 19 '20 20:04 davdatong

@WaelHamze, Has this issue been fixed? Will the export data .zip support more than 15MB and will the export annotation filter be fixed? Thanks

jaredrakoff avatar Jun 15 '20 13:06 jaredrakoff

@jaredrakoff @davdatong

This task using the configuration migration powershell. Might be worth keep an eye on future versions to see if it addresses your issue.

You can change the version that task uses by providing a specific version in the tool installer.

https://www.powershellgallery.com/packages/Microsoft.Xrm.Tooling.ConfigurationMigration/1.0.0.49

WaelHamze avatar Jul 09 '20 07:07 WaelHamze

@WaelHamze I've been using the following task in your Power DevOps Tools Task Library "Export Config Migration Data"

yaml:

task: MSCRMExportCMData@12 inputs: crmConnectionString: 'AuthType=Office365;Username=$(UserName); Password=$(Password);Url=$(EnvURL)' schemaFile: 'Portal/ConfigData/$(PortalSchema).xml' dataFile: 'Portal/ConfigData/$(PortalSchema)Data.zip' crmConnectionTimeout: '20'

jaredrakoff avatar Sep 08 '20 13:09 jaredrakoff

For what it's worth, I think the problem is with the Microsoft tool, not the implementation on how the tool is being used. I've got a heavily customized portal and I can't even get the data to export with the Configuration Migration Tool as a stand alone.

Regarding the linking to other entities, you should be able to sever that link by updating the xml schema file used to pull in the data. I don't know why the default schema file includes links to all the entities when it should just be linking to the ADX_ ones.

I've been trying to break up my migration into smaller stages due to its large size (all files modified between X and Y), but the problem is that the extraction and upload overwrites all the original files rather than merge them together.

Does anyone have any ideas on how to download annotations in stages, then merge them together before putting them into source control?

Guyanthalas avatar Nov 04 '20 20:11 Guyanthalas

I'm running into same size issue exporting annotations (notes). I am filtering the notes as much as possible. Is there a solution to this issues?

cwarnholtz avatar Aug 25 '21 17:08 cwarnholtz