[backup or migration] paperless-ngx 이전 및 백업
Paperless uses 4 volumes:
#media 폴더 백업
paperless_media: This is where your documents are stored.
#아래 DB 폴더 중, 설치된 DB 에 맞는 것 선택
paperless_data: This is where auxiliary data is stored. This folder also contains the SQLite database, if you use it.
paperless_pgdata: Exists only if you use PostgreSQL and contains the database.
paperless_dbdata: Exists only if you use MariaDB and contains the database.
즉, media 폴더와 database 폴더만, 백업하면 된다.
**추가 (2025 05)
- database 버전이 달라서 폴더 복사로는 이전이 안된다.
- document_exporter 를 이용한다.
hooni@hcp:/vo2/docker/paperless/paperless-ngx$ sudo docker compose exec webserver document_exporter ../export
[sudo] password for hooni:
100%|████████████████████████████████████████| 243/243 [00:00<00:00, 331.72it/s]
- export 폴더에 자료들이 만들어 졌다.
- 압축 후, 새로운 서버로 옮긴다.
- document_importer 를 이용한다. (버전이 다르다고 했으나, 이전은 되었다.)
ubuntu@hostname:/vo3/docker/paperless/paperless-ngx$ sudo docker compose exec webserver document_importer ../export
Version mismatch: Currently 2.15.3, importing 2.13.5. Continuing, but import may fail.
Checking the manifest
Installed 1719 object(s) from 1 fixture(s)
Copy files into paperless...
100%|████████████████████████████████████████| 243/243 [00:01<00:00, 184.92it/s]
Updating search index...
100%|█████████████████████████████████████████| 243/243 [00:02<00:00, 84.85it/s]
ubuntu@hostname:/vo3/docker/paperless/paperless-ngx$