N8N running as a service backup

Hi everybody. I have installed n8n on an Ubuntu 22.04 and I’m running it by starting n8n as a service. When I try to backup data (workflows and credentials) from CLI I can’t export the flows that are running in the instance launched by the service but other flows deriving from n8n command not referred to service. In brief, any suggestion to run n8n CLI as a service? Any suggestion would be appreciated. Thanks a lot.

  • n8n version: 0.231.3
  • Database (default: SQLite): MariaDB
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Ubuntu 22.04 LTS

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @andym,

Welcome to the community :partying_face:

I am not sure I understand what the issue actually is here, you shouldn’t need to run n8n the cli as a service but if you are using a different user account you may need to change to that user to run the command and export the workflows.

You could automate this by setting up a cron job to run the cli command or use n8n itself to run the command.

Hi Jon, thanks for your prompt reply.
Following this example (Git backup of workflows and credentials | n8n workflow template) I created a Command node and launched the export CLI command without any output directory but just with a export_test.json.
The output file was written in the /usr/bin/ directory.
Afterward I created a public directory in the Linux filesystem where to store all my backups giving the proper path to this folder.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.