mirror of
https://github.com/ciur/papermerge.git
synced 2026-04-25 03:55:58 +03:00
[GH-ISSUE #645] Migration from 2.0 to 3.4 #505
Labels
No labels
2.1
3.0
3.0.1
3.0.2
3.0.3
3.0.3
3.1
3.2
3.2
3.3
3.5
3.x
Fixed. Waiting for feedback.
Fixed. Waiting for feedback.
UX
Version 2.1 - alpha
XSS
announcement
beta
blocker
bug
cannot reproduce
confirmed
confirmed
critical
demo
dependencies
deployment
detchnical debt
discussion
docker
documentation
donations
duplicate
enhancement
feature request
frontend
fundraising
good first issue
good issue
help wanted
high
implemented
important
improvement
incomplete
invalid
investigation
kubernetes
low
low impact
medium
medium
medium impact
migration from 2.0
migration from 2.1
missing-language
missing-ocr-language
no-activity
note
ocr
outofscope
packaging
performance
popular request
pull-request
pypi
question
raspberry pi
roadmap
search
security
setup
status
task
technical debt
updates
user xp
version 1.4.0 - demo
will be implemented
will not be implemented
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/papermerge#505
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ciur on GitHub (Feb 2, 2025).
Original GitHub issue: https://github.com/ciur/papermerge/issues/645
Originally assigned to: @ciur on GitHub.
Is there anybody interested in migrating from 2.0 to 3.4 ? If yes, now is the moment to raise your hand.
If there will be no interest until June 2025, I will close this topic.
@CT-IT commented on GitHub (Feb 24, 2025):
Hey Ciur I'm interested and I'm facing the migration problem.
My instance is running in a Docker container.
Unfortunately, I no longer have the current instance running.
I would like to install an old version with the migration from the old version (2.0).
I have the current 2.0 file structure:
/volume1/docker/papermerge/data folder incl. papermerge.db
and the
/volume1/docker/papermerge/config folder.
I started with the two old directories present:
I generate:
echo 'SECRET_KEY="--MY_SECRET_KEY--"' > /volume1/docker/papermerge/config/.env
echo 'DB_ENGINE=sqlite3' >> /volume1/docker/papermerge/config/.env
echo 'DB_NAME=/data/db.sqlite3' >> /volume1/docker/papermerge/config/.env
echo 'TZ=Europe/Berlin' >> /volume1/docker/papermerge/config/.env
echo 'PUID=1026' >> /volume1/docker/papermerge/config/.env
echo 'PGID=100' >> /volume1/docker/papermerge/config/.env
docker run -d --name=papermerge
-p 7423:8000
--env-file /volume1/docker/papermerge/config/.env
-v /volume1/docker/papermerge/config:/config
-v /volume1/docker/papermerge/data:/data
--restart=always
papermerge/papermerge:latest
Here i have to add the SECRET_KEY to Django:
cho 'import os' >> /app/config/settings.py
echo 'SECRET_KEY = os.getenv("SECRET_KEY", "--MY_SECRET_KEY--")' >> /app/config/settings.py
Without SECRET_KEY i get the error at the login:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
--HERE WORKS THE LOGIN FINE IN WEB GUI, BUT WITHOUT MY DATA--
I have executed to miration:
python manage.py makemigrations
python manage.py migrate
At the settings.py i found
DATABASES = config.get_django_databases(proj_root=PROJ_ROOT)
from here on I need some help :)
Support would be nice here. Thanks in advance.
@ciur commented on GitHub (Mar 8, 2025):
@CT-IT
Could you give it a try with pmdump v0.1 ?
At this moment instructions are only in README.md file, here: https://github.com/papermerge/pmdump
In short, you need to create a source.yaml file which will instruct pmdump where to copy data from.
Example of source.yaml:
Then you need to:
Which will create pmg.tar.gz file with your data.
Then create a target.yaml:
And finally run command (pmg.tar.gz file is the one created by export command):
Note that only users, documents and folders will be exported.
For testing import into the target, I've tested with following docker compose:
Notice that local media folder (which should be accessible to pmdump) is mounted unto
/core_app/mediainpapermerge/papermerge:3.4container.@seaeagle1 commented on GitHub (Apr 2, 2025):
Ok, so I've managed to convert my datastore from 2.0 to 3.4... and that worked just fine except for 4 documents for which I had to fix the database by hand.
My problem now is: none of the documents seem to have OCR text included, and the GUI doesn't seem to have a way to do mass-queue-for-OCR?