Closed clinis closed 4 years ago
From my understanding, the Importer
and Exporter
are the right utils for backing up and restoring your documents.
$ docker-compose run --rm consumer document_importer /export
Do you have the PASSPHRASE
variable set when running the command with docker-compose
? Because it looks like when you start the container something gets encrypted:
Encrypting 20170524154451-my-document.pdf and saving it to /usr/src/paperless/src/../media/documents/originals/0000001.pdf
Encrypting 20170524154451-my-document.pdf-thumbnail.png and saving it to /usr/src/paperless/src/../media/documents/thumbnails/0000001.png
and later in the stack trace, the application complains about these exact files:
consumer_1 | FileNotFoundError: [Errno 2] No such file or directory: '/usr/src/paperless/src/../media/documents/originals/0000001.pdf.gpg'
Because you run the commands with docker-compose, maybe your environment gets in your way. Can you test the process in an environment where encryption is disabled using docker run
? Such as:
$ docker run --rm \
--volume /mnt/user/appdata/paperless:/usr/src/paperless/data \
--volume /mnt/user/scans/media:/usr/src/paperless/media \
--volume /path/to/backup/place:/export \
-e USERMAP_UID=99 -e USERMAP_GID=100 \
paperless-consumer document_exporter /export
docker run --rm \
--volume /mnt/user/appdata/paperless:/usr/src/paperless/data \
--volume /mnt/user/scans/media:/usr/src/paperless/media \
--volume /path/to/backup/place:/export \
-e USERMAP_UID=99 -e USERMAP_GID=100 \
paperless-consumer document_importer /export
Yep, it was getting PAPERLESS_PASSPHRASE
from docker-compose.env
. I commented it out, and the Importer worked! Thanks.
I'm trying to restore my paperless setup, which I deleted by accident. Luckily, I constantly used the Exporter to keep a backup. I am using the docker setup.
I followed the instructions for the Importer:
docker-compose up
to setup all the volumes and containers;docker-compose run --rm webserver createsuperuser
;docker-compose run --rm consumer document_importer /export
.Here are the commands and results:
If it helps, on the
manifest.json
file, the document has"storage_type": "unencrypted"
. I looked around the issues and it looks to be related to this one, but the error is slightly different and I am following the instructions.What am I missing or whats wrong?
BTW: should I be using the Importer or the Restoring instructions? I tried both, but neither worked..