web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Platform CLI dat...
Power Apps
Unanswered

Power Platform CLI data export - Failed to create output file

(0) ShareShare
ReportReport
Posted on by 8

Hi, 

I am trying to do an export and import of data between environments.
I used the CMT (DataUtilityTool.exe/CRM Configuration Migration Tool) to make a schemafile,

and I used the "pac data export" command to retrieve the data, but after running for a long time (14:30h ish) and finishing exporting all records, it fails, giving me "datastream is to long" when trying to write to file (highlighted line in picture, it's norwegian):

bilde.png

 

Maybe I'm abusing the tool with exporting too much, but I tought this was an unexpected error because it is finished exporting all data from the database? 

I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    Your assumption sounds like the same one I'd make. Have you checked the log file to see if there is more useful error messaging there?

  • MariusW Profile Picture
    8 on at

    Checked it now, and there was no other usefull information, i included the "--verbose" flag in my command as well. it seams like the entity export process was successful but it cant write it to file.

    log.png

  • cchannon Profile Picture
    4,702 Moderator on at

    Try running the cmd prompt (or pshell) as Admin - the folder you're trying to write to might be permission trimmed.

     

    If that doesn't work, make sure you're providing a valid path for the destination file. Remember that the -df parameter expects you to provide the full path to the zip to write, including its filename and extension.

  • MariusW Profile Picture
    8 on at

    Here is the command I used:

    pac data export -sf .\allCustomComponents.xml -df data.zip -env **** -v

    I was running it using a powershell terminal in VS Code and the power platform tool extension.
    And I have trusted the folders I'm working in, in VSC. If that helps? 

    I will try using the full path from root for -sf and -df and using the external powershell as admin.

  • RiadMokhtari Profile Picture
    7 on at

    Hello,

     

    I got this error message with Migration Data Utility 
    someone has encounter this ? 

    DataMigrationUtility.Export Information 8 27/02/2024 10:52:16 Found 374863 rows for comp_prix entity
    DataMigrationUtility.Export Information 8 27/02/2024 10:52:16 Processing Prix rows for 374863 to export stream
    DataMigrationUtility.Export Information 8 27/02/2024 10:52:42 Exporting of files is disabled. Skipping
    DataMigrationUtility.Export Information 8 27/02/2024 10:52:42 Entity Export Process Complete
    DataMigrationUtility.Export Information 8 27/02/2024 10:52:42 Writting output file : C:\WINDOWS\TEMP\5afszgz3.oms\data.xml
    DataMigrationUtility.Export Error 2 27/02/2024 10:53:36 Message: Exception Raised when Serializing Microsoft.Xrm.Tooling.Dmt.DataMigCommon.DataModel.Data.entities
    Source : mscorlib
    Method : CreateStringFromEncoding
    Date : 27/02/2024
    Time : 10:53:36
    Error : Une exception de type 'System.OutOfMemoryException' a été levée.
    Stack Trace : à System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
    à System.Text.UTF8Encoding.GetString(Byte[] bytes, Int32 index, Int32 count)
    à Microsoft.Xrm.Tooling.Dmt.DataMigCommon.Utility.Helper.Serialize[T](Object objToSerialize)
    ======================================================================================================================

    DataMigrationUtility.Export Error 2 27/02/2024 10:53:36 Failed to create output file
    DataMigrationUtility.Export Information 8 27/02/2024 10:53:36 *********************************************************
    DataMigrationUtility.Export Information 8 27/02/2024 10:53:36 Error : No Valid Data Found to export
    DataMigrationUtility.Export Information 8 27/02/2024 10:53:36 *********************************************************
    DataMigrationUtility.Export Information 8 27/02/2024 10:53:36 ** EXIT EXPORT PROCESS FAIL **
    DataMigrationUtility.Export Information 8 27/02/2024 10:53:36 *********************************************************

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard