Replies: 4 comments 1 reply
-
It looks like you already created a user in the Postgres database. But have tried to import the same username, which isn't allowed. You'd need to drop the user from Postgres |
Beta Was this translation helpful? Give feedback.
-
Hello, I stopped the running stack and adjusted the code, so that paperless-ngx knows to use PostgreSQL as database service instead of SQLite. Although the manual for db migration says something else here, I then tried to log into paperless, because I thought maybe since the manual was written that process of db migration might have been automated...so why not try my luck. So I then stopped the stack again and went on with the following steps in the manual:
I find it interesting that no migration took place in this part after the "sudo docker-compose run --rm web server /bin/bash" - what supports the automated migration with the first stack-deployment after implementing PostgreSQL. Does anyone have an idea on how to help me with this problem? |
Beta Was this translation helpful? Give feedback.
-
This discussion has been automatically closed due to inactivity. Please see our contributing guidelines for more details. |
Beta Was this translation helpful? Give feedback.
-
This discussion has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details. |
Beta Was this translation helpful? Give feedback.
-
Hello, I am really struggling, migrating the DB from SQLite to PostgreSQL.
Reason for migration: Switching from Syno to a TrueNas SCALE ---> k3s paperless-ngx is using a postgresql DB, so that after the migration on the old system i can move the persistent data to the new system.
I am using a docker container on a SynoNAS, so far working flawless. (I use portainer to manage the containers).
The paperless-ngx container is @ v1.10.2 running with SQLite. I am following this guide: https://docs.paperless-ngx.com/setup/#sqlite_to_psql
So I adapted the docker-compose from sqlite to postresql and deployed the stack via portainer. Running fine but no data, obviously.
When I execute this command:
python3 manage.py loaddata data.json
I am getting this error output:
root@51641d5bbdd8:/usr/src/paperless/src# python3 manage.py loaddata data.json Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "auth_user_username_key" DETAIL: Key (username)=(consumer) already exists. [...] django.db.utils.IntegrityError: Problem installing fixture '/usr/src/paperless/src/data.json': Could not load auth.User(pk=4): duplicate key value violates unique constraint "auth_user_username_key" DETAIL: Key (username)=(consumer) already exists.
Any suggestions what could cause it?
Glad for any help. THX Dave
Beta Was this translation helpful? Give feedback.
All reactions