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.
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.