# Error at migration from sqlite to postgresql

**URL:** <https://vaultwarden.discourse.group/t/error-at-migration-from-sqlite-to-postgresql/3140>\
**Category:** Help\
**Created:** [November 25, 2023, 1:44pm UTC](https://vaultwarden.discourse.group/t/error-at-migration-from-sqlite-to-postgresql/3140 "2023-11-25T13:44:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erwan](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@Erwan](https://vaultwarden.discourse.group/u/Erwan)\
**Post date:** [November 25, 2023, 1:44pm UTC](https://vaultwarden.discourse.group/t/error-at-migration-from-sqlite-to-postgresql/3140/1 "2023-11-25T13:44:49Z")

</div>

After testing vaultwarden using sqlite, I want to migrate it to postgresql

I follow [Using the PostgreSQL Backend · dani-garcia/vaultwarden Wiki · GitHub](https://github.com/dani-garcia/vaultwarden/wiki/Using-the-PostgreSQL-Backend)

However pgloader does not work, I get message :

```auto
2023-11-25T13:16:39.007837Z LOG pgloader version "3.6.3~devel"
2023-11-25T13:16:39.088623Z LOG Migrating from #<SQLITE-CONNECTION sqlite:///usr/jails/vaultwarden/usr/local/www/vaultwarden/data/db.sqlite3 {1007B16903}>
2023-11-25T13:16:39.088781Z LOG Migrating into #<PGSQL-CONNECTION pgsql://vaultwarden@db.jails.rail.eu.org:5432/vaultwarden {1007B16983}>
KABOOM!
FATAL error: pgloader failed to find anything in schema "public" in target catalog.
An unhandled error condition has been signalled:
   pgloader failed to find anything in schema "public" in target catalog.

What I am doing here?

pgloader failed to find anything in schema "public" in target catalog.

```

`pgsql pgsql://vaultwarden:<password>@db.jails.rail.eu.org:5432/vaultwarden` works (ie. I get a connection to database). Database, user and grants where done following the page.

If someone has info about this…

Edit : I run on FreeBSD, and 3.6.3 is the latest version of pgloader I can find. Is it worth using a backup of sqlite DB to populate from a debian host with pgloader 3.6.10 ?

---

<div class="post-metadata">

**Author:** ![Erwan](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@Erwan](https://vaultwarden.discourse.group/u/Erwan)\
**Post date:** [November 26, 2023, 10:49am UTC](https://vaultwarden.discourse.group/t/error-at-migration-from-sqlite-to-postgresql/3140/2 "2023-11-26T10:49:29Z")

</div>

Error found. DATABASE\_URL was not correctly set in the vaultwarden configuration, thus schema was not correct

---

<div class="post-metadata">

**Author:** ![ShadowPulse](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/shadowpulse/32/1237_2.png) [@ShadowPulse](https://vaultwarden.discourse.group/u/ShadowPulse)\
**Post date:** [December 2, 2023, 7:04pm UTC](https://vaultwarden.discourse.group/t/error-at-migration-from-sqlite-to-postgresql/3140/3 "2023-12-02T19:04:07Z")

</div>

I’m glad you solved it and shared it with the rest of the world. My friend had a similar issue, and I just saw your post! Thanx a lot!
