Database administration
Copy the n8n SQLite database to your machine and connect to the Postgres database locally using kubectl, so you can inspect and manage n8n data.
This guide shows you how to copy the n8n SQLite database to your local machine and connect to the Postgres database from your local environment using kubectl.
Copy the SQLite database locally
To copy the n8n SQLite database from the cloud to your local environment, first set up local access to your Kubernetes cluster.
Next, run the following commands in your terminal:
# List all pods in 'microtica' namespace. Replace the namespace if you deployed the service in namespace other then the default 'microtica' namespace.
kubectl get pods -n microtica
# Copy SQLite database locally
kubectl cp microtica/<pod name>:/home/node/.n8n/database.sqlite ~/database.sqliteThis copies the SQLite database locally to ~/database.sqlite.
Connect to the Postgres database
For the n8n application, the Postgres database runs in a separate container.
To connect to the database locally, first identify the pod running the Postgres database:
kubectl get pods -n microticaNext, establish a proxy to the n8n pod running the Postgres database:
# Change <pod name> to the name of the Pod
# Use different local port if 5432 is already in use. E.g. 5444:5432
kubectl port-forward pods/<pod name> 5432:5432 -n microticaNow you can access the database with your preferred client on localhost:5432.
Next steps
Import an existing n8n application
Connect your Git repository and deploy an n8n application you already have on your own AWS account, using Microtica's automated Kubernetes deployments.
Node.js
Deploy a production-ready Node.js backend on your own AWS account with Microtica, from a demo Kubernetes cluster to a self-hosted EKS setup in minutes.