Moin,
bei der Suche hier im Forum, solltest Du einen Thread vom User @Bacardi finden, dort hat er mal ein paar Dinge beschrieben.
Aber im Schnelldurchlauf,
Laufende Docker in HA
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2cea057a36d8 ghcr.io/benoitanastay/paperless-ngx/amd64:2.3.0 "/init" 26 hours ago Up 26 hours addon_ca5234a0_paperless-ngx
Wechsel in den Container
➜ ~ docker exec -it addon_ca5234a0_paperless-ngx bash
root@ca5234a0-paperless-ngx:/usr/src/paperless/src#
Ist das Exportverzeichnis vorhanden
root@ca5234a0-paperless-ngx:/usr/src/paperless/src# mount | grep -i export
/dev/sda8 on /usr/src/paperless/export type ext4 (rw,relatime,commit=30)
root@ca5234a0-paperless-ngx:/usr/src/paperless/src#
Läuft das Export-Tool korrekt
root@ca5234a0-paperless-ngx:/usr/src/paperless/src# document_exporter -h
usage: manage.py document_exporter [-h] [-c] [-cj] [-d] [-f] [-na] [-nt] [-p] [-sm] [-z] [-zn ZIP_NAME] [--data-only] [--no-progress-bar] [--passphrase PASSPHRASE] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color] [--skip-checks] target
Decrypt and rename all files in our collection into a given target directory. And include a manifest file containing document data for easy import.
positional arguments:
target
options:
-h, --help show this help message and exit
-c, --compare-checksums
Compare file checksums when determining whether to export a file or not. If not specified, file size and time modified is used instead.
-cj, --compare-json Compare json file checksums when determining whether to export a json file or not (manifest or metadata). If not specified, the file is always exported.
-d, --delete After exporting, delete files in the export directory that do not belong to the current export, such as files from deleted documents.
-f, --use-filename-format
Use PAPERLESS_FILENAME_FORMAT for storing files in the export directory, if configured.
-na, --no-archive Avoid exporting archive files
-nt, --no-thumbnail Avoid exporting thumbnail files
-p, --use-folder-prefix
Export files in dedicated folders according to their nature: archive, originals or thumbnails
-sm, --split-manifest
Export document information in individual manifest json files.
-z, --zip Export the documents to a zip file in the given directory
-zn ZIP_NAME, --zip-name ZIP_NAME
Sets the export zip file name
--data-only If set, only the database will be imported, not files
--no-progress-bar If set, the progress bar will not be shown
--passphrase PASSPHRASE
If provided, is used to encrypt sensitive data in the export
--version Show program's version number and exit.
-v {0,1,2,3}, --verbosity {0,1,2,3}
Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output
--settings SETTINGS The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used.
--pythonpath PYTHONPATH
A directory to add to the Python path, e.g. "/home/djangoprojects/myproject".
--traceback Raise on CommandError exceptions.
--no-color Don't colorize the command output.
--force-color Force colorization of the command output.
--skip-checks Skip system checks.
root@ca5234a0-paperless-ngx:/usr/src/paperless/src#
Export aller Daten aus paperless-ngx
root@ca5234a0-paperless-ngx:/usr/src/paperless/src# document_exporter -z /usr/src/paperless/export
0it [00:00, ?it/s]
root@ca5234a0-paperless-ngx:/usr/src/paperless/src#
Bei mir ist das leer, ist halt nur fürs Forum installiert
Kontrolle
root@ca5234a0-paperless-ngx:/usr/src/paperless/src# ls -la /usr/src/paperless/export
total 16
drwxr-xr-x 2 paperless paperless 4096 Apr 7 18:28 .
drwxr-xr-x 1 paperless paperless 4096 Apr 6 15:50 ..
-rw-r--r-- 1 paperless paperless 3399 Apr 7 18:28 export-2025-04-07.zip
root@ca5234a0-paperless-ngx:/usr/src/paperless/src#
Da nicht im Container vorhanden, noch mal schnell ssh installieren
root@ca5234a0-paperless-ngx:/usr/src/paperless/src# apt update
root@ca5234a0-paperless-ngx:/usr/src/paperless/src# apt install ssh
Das File aus dem Verzeichnis kopieren
root@ca5234a0-paperless-ngx:/usr/src/paperless/src# scp -p /usr/src/paperless/export/export-2025-04-07.zip dp20eic@ryzen-5.fritz.box:/tmp
The authenticity of host 'ryzen-5.fritz.box (192.168.178.42)' can't be established.
ED25519 key fingerprint is SHA256:+Hbm8H+wc3tgG26zZLv+pFwCcc1D7Bdy6LVQHL9fxPM.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'ryzen-5.fritz.box' (ED25519) to the list of known hosts.
dp20eic@ryzen-5.fritz.box's password:
export-2025-04-07.zip 100% 3399 4.3MB/s 00:00
root@ca5234a0-paperless-ngx:/usr/src/paperless/src#
Kontrolle, ob das File da ist
❯ ls -la /tmp/*.zip
-rw-r--r-- 1 dp20eic dp20eic 3399 7. Apr 18:28 /tmp/export-2025-04-07.zip
Im LXC
zum User von paperless-ngx
werden,
❯ sudo -u paperless -H -s
ob das bei Dir so passt, kann ich nicht sagen!
ins Export verzeichnis gehen
paperless-ngx-env% cd /var/lib/paperless/export
paperless-ngx-env% pwd
/var/lib/paperless/export
paperless-ngx-env%
Auch hier musst Du das an Deine Umgebung anpassen
das export File holen
paperless-ngx-env% scp -p dp20eic@ryzen-5.fritz.box:/tmp/export-2025-04-07.zip .
The authenticity of host 'ryzen-5.fritz.box (192.168.178.42)' can't be established.
ED25519 key fingerprint is SHA256:+Hbm8H+wc3tgG26zZLv+pFwCcc1D7Bdy6LVQHL9fxPM.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'ryzen-5.fritz.box' (ED25519) to the list of known hosts.
dp20eic@ryzen-5.fritz.box's password:
export-2025-04-07.zip 100% 3399 4.5MB/s 00:00
paperless-ngx-env%
das File auspacken
paperless-ngx-env% unzip export-2025-04-07.zip
Archive: export-2025-04-07.zip
inflating: manifest.json
inflating: metadata.json
paperless-ngx-env%
in paperless-ngx importieren
root@ca5234a0-paperless-ngx:/usr/src/paperless/src# root@ca5234a0-paperless-ngx:/usr/src/paperless/src# document_importer -h
usage: manage.py document_importer [-h] [--no-progress-bar] [--data-only] [--passphrase PASSPHRASE] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color] [--skip-checks] source
Using a manifest.json file, load the data from there, and import the documents it refers to.
positional arguments:
source
options:
-h, --help show this help message and exit
--no-progress-bar If set, the progress bar will not be shown
--data-only If set, only the database will be exported, not files
--passphrase PASSPHRASE
If provided, is used to sensitive fields in the export
--version Show program's version number and exit.
-v {0,1,2,3}, --verbosity {0,1,2,3}
Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output
--settings SETTINGS The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used.
--pythonpath PYTHONPATH
A directory to add to the Python path, e.g. "/home/djangoprojects/myproject".
--traceback Raise on CommandError exceptions.
--no-color Don't colorize the command output.
--force-color Force colorization of the command output.
--skip-checks Skip system checks.
root@ca5234a0-paperless-ngx:/usr/src/paperless/src#
document_importer .
oder, wenn Du in einem anderen Verzeichnis bist, dann
document_importer /path/to/export/
So, das sollte es dann gewesen sein, mit dem Ilja Richter’s Schnelldurchlauf
VG
Bernd