Describe the issue/error/question
When trying the n8n export
commands on a new instance, i’m running into this error. Not sure how to resolve it.
What is the error message (if any)?
NodeOperationError: Command failed: n8n export:workflow --backup --output=/data/backups/workflows
Error exporting workflows. See log messages for details.
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/ExecuteCommand/ExecuteCommand.node.js:76:27)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:645:28)
at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:557:53
Please share the workflow
docker-compose.yml
version: '3.1'
services:
n8n:
image: n8nio/n8n
container_name: n8n
restart: always
env_file:
- ./n8n/n8n.env
ports:
- 5678:5678
depends_on:
- postgres
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./n8n/.n8n:/home/node/.n8n
- ./n8n/files:/files
- ./n8n/data:/data
- ./n8n/tmp:/tmp
networks:
- n8n
command: /bin/sh -c "sleep 5; n8n start"
postgres:
image: postgres:14
container_name: postgres
restart: always
env_file:
- ./n8n/n8n.env
environment:
- POSTGRES_USER=****
- POSTGRES_PASSWORD=****
- POSTGRES_DB=n8n
- POSTGRES_PORT=7432
- POSTGRES_NON_ROOT_USER=****
- POSTGRES_NON_ROOT_PASSWORD=****
ports:
- "7432:5432"
volumes:
- ./n8n/init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
- ./n8n/postgres-data:/var/lib/postgresql/data
networks:
- n8n
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: always
security_opt:
- no-new-privileges:true
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./portainer-data:/data
ports:
- "9000:9000"
- "9010:8000"
networks:
n8n:
Information on your n8n setup
- n8n version: 0.196.0
- Database you’re using (default: SQLite): postgres
- Running n8n with the execution process [own(default), main]: main
- Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker