N8n postgres import issues

Describe the problem/error/question

hello, i am trying to import entities from an exsiting n8n instance to k8s and facing issues with imports
exported local n8n entities via podman n8n main container with a volume mounted to host machine to get folder of entities jsonl then compress at root level to obtain a single zip file
now when i try to import this into k8s n8n main pod, i get error of invalid json syntax.[ n8n import:entities --inputDir ./outputs --truncateTables true
] PS: there are other folders/files in the directory too. but the error is raised under some entities.js
i am finding it hard to pinpoint on what exactly is causing this issue. earlier i got a PK constraint violation error so I just deleted the DB and created a fresh one
i also ran unzip -t and it turned out clean on local setup No errors detected in compressed data of ./entities.zip.
any leads will be helpful

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 2.1.1
  • Database (default: SQLite): postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker local export → k8s pod import
  • Operating system: linux

Hey, can you share the actual error message you’re getting and maybe paste a snippet of one of the exported jsonl files? Also worth knowing what n8n versions you’re running on both the source and target instances since the export format has changed between versions.

Hi @adarsh-lm!
It seems that the import command is trying to read unsupported files in your output folder. Try creating a new folder with only the exported files and check whether your encryption key matches between the environments to avoid credential issues afterward.

Here is the actual error

```

2026-03-05T06:30:15.078Z | error | :cross_mark: Error importing entities. See log messages for details.
{“file”:“entities.js”,“function”:“catch”}
2026-03-05T06:30:15.079Z | error | Error details: {“file”:“entities.js”,“function”:“catch”}
2026-03-05T06:30:15.080Z | error |

{“file”:“entities.js”,“function”:“catch”}
2026-03-05T06:30:15.081Z | error | invalid input syntax for type json
{“file”:“entities.js”,“function”:“catch”}
2026-03-05T06:30:15.081Z | error | invalid input syntax for type json {“file”:“base-command.js”,“function”:“finally”}
~/n8n-file $
```

both n8n local and k8s versions are of version 2.1.1

@tamy.santos

  1. on exporting I received an entities.zip file on n8n podman setup
  2. I decompressed it and moved files to my WSL
  3. zipped it back (here when I did unzip -t > all the files seem to be without errors
  4. moved to k8s n8n main pod inside an isolated folder
  5. imported it and here is where i get the invalid json syntax error

Encryption key is seemingly the same because the a number of jsonl files do get imported… some do not get imported due to the json error

```

2026-03-05T06:30:15.078Z | error | :cross_mark: Error importing entities. See log messages for details.

{“file”:“entities.js”,“function”:“catch”}
2026-03-05T06:30:15.079Z | error | Error details: {“file”:“entities.js”,“function”:“catch”}
2026-03-05T06:30:15.080Z | error |

{“file”:“entities.js”,“function”:“catch”}
2026-03-05T06:30:15.081Z | error | invalid input syntax for type json
{“file”:“entities.js”,“function”:“catch”}
2026-03-05T06:30:15.081Z | error | invalid input syntax for type json {“file”:“base-command.js”,“function”:“finally”}
~/n8n-file $
```