Unable to export with export.sh - exportName not given

Hi,

I am trying to export the content of a site from my dev machine for import on the production server.

When running the export.sh script I get this error:

 ~/code/enonic/enonic-xp-5.3.1/tools/  ./export.sh -u su:password -s cms-repo:draft:/ -t myexport \
>   -n -i false
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   423    0   330  100    93   8450   2381 --:--:-- --:--:-- --:--:--  8684
{
    "context": {
        "authenticated": true,
        "principals": [
            "role:system.admin",
            "role:system.admin.login",
            "role:system.authenticated",
            "role:system.everyone",
            "user:system:su"
        ]
    },
    "message": "Instantiation of [simple type, class com.enonic.xp.admin.impl.rest.resource.export.ExportNodesRequestJson] value failed: exportName not given",
    "status": 500
}

I did get it to work with the toolbox.sh script so I checked a bit deeper and it seems like the “targetDirectory” attribute in the JSON object on line 112 in export.sh should be named “exportName”.

With that change the export.sh script worked fine and from what I can tell by diffing the folders it produces the same output as the toolbox.sh export command.

Edit:
Looks to be the same problem with “sourceDirectory” in the import.sh script. After changing the attribute it does not fail but it just does not import anything (and I dont have enough memory on the server to use the toolbox.sh :confused: ):

{“addedNodes”:[],“dryRun”:false,“importErrors”:[],“importedBinaries”:[],“updateNodes”:[]}.

Also when importing I had to give the full path to the folder in contrary to the docs and export.sh where it seems like yoy only need to give the name of the folder in home/data/export the export should be placed in.

Hi. Use the new toolbox for export in 5.3.1:

http://xp.readthedocs.org/en/5.3/reference/toolbox/index.html

1 Like