# Retrieving workflows from database.sqlite

**URL:** <https://community.n8n.io/t/retrieving-workflows-from-database-sqlite/170389>\
**Category:** Questions\
**Tags:** core\
**Created:** [August 17, 2025, 6:17pm UTC](https://community.n8n.io/t/retrieving-workflows-from-database-sqlite/170389 "2025-08-17T18:17:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laith\_salman](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/laith_salman/32/66428_2.png) [@laith\_salman](https://community.n8n.io/u/laith_salman)\
**Post date:** [August 17, 2025, 6:17pm UTC](https://community.n8n.io/t/retrieving-workflows-from-database-sqlite/170389/1 "2025-08-17T18:17:49Z")

</div>

# Describe the problem/error/question

Hello everyone, i hosted n8n on my vpc via `docker` though cloud flare tunnels, i wanted to change the vpc i was using so i backed up the `database.sqlite` from `/var/lib/docker/volumes/n8n_n8n_data` thinking it would just work.  
i was wrong, i changed from tunnels to a normal DNS with nginx reverse proxy which worked fine until i changed the `database.sqlite`to the old one then i wasn;t able to connect to the instance.  
so, my question would be can i change some settings in the database to work again? or can i get the workflows back from the database?

## Notes:

i noticed there is workflow\_entity table including all my workflows but i have no idea how to get the json that i can copy to n8n.

i know that i should’ve taken a backup of each workflow but i forgot.

## What is the error message (if any)?

cloudflare error: Bad gateway Error code 502

## Information on your n8n setup

- **Database : SQLite**
- **Running n8n via : docker**
- **Operating system: Ubuntu**

---

<div class="post-metadata">

**Author:** ![tridi](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/tridi/32/109193_2.png) [@tridi](https://community.n8n.io/u/tridi)\
**Post date:** [August 17, 2025, 7:12pm UTC](https://community.n8n.io/t/retrieving-workflows-from-database-sqlite/170389/2 "2025-08-17T19:12:43Z")

</div>

Hi welcome to n8n community :n8n:

Have you tried using n8n directly via the CLI here: [CLI commands | n8n Docs](https://docs.n8n.io/hosting/cli-commands/) ? In my opinion, the best way to migrate in n8n is simply by importing and exporting the workflows or credentials. The case would be different if you still need the execution logs.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [November 15, 2025, 7:13pm UTC](https://community.n8n.io/t/retrieving-workflows-from-database-sqlite/170389/3 "2025-11-15T19:13:04Z")

</div>

Closed on November 15, 2025, 7:13pm UTC

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