paperless update to 2.18.2 fails #1802

Open
opened 2025-11-20 05:17:40 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @mkihr on GitHub (Aug 28, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

update

📂 What was the exact command used to execute the script?

update

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

📝 Provide a clear and concise description of the issue.

The script fails when /opt/paperless/media is a mounted image. In this case inside media exists a directory lost+found and the script files during find and cp -r (backup) with permission denied error.
To have media as an seperate image is, in my opinion, not unusual.

🔄 Steps to reproduce the issue.

run the update when media is mounted image

Paste the full error output (if available).

find: '/opt/paperless/media/lost+found': Permission denied

🖼️ Additional context (optional).

To solve the problem I downloaded the script used in the update command and replaced this find line:

cp -r /opt/paperless/media /opt/paperless/backup/
with this:
(cd /opt/paperless/media && find . -mindepth 1 -maxdepth 1 ! -name lost+found -exec cp -r {} /opt/paperless/backup/ \;)
and the find with this:
find /opt/paperless -path /opt/paperless/media/lost+found -prune -o -name "__pycache__" -type d -exec rm -rf {} +

Originally created by @mkihr on GitHub (Aug 28, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? update ### 📂 What was the exact command used to execute the script? update ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 📝 Provide a clear and concise description of the issue. The script fails when /opt/paperless/media is a mounted image. In this case inside media exists a directory lost+found and the script files during find and cp -r (backup) with permission denied error. To have media as an seperate image is, in my opinion, not unusual. ### 🔄 Steps to reproduce the issue. run the update when media is mounted image ### ❌ Paste the full error output (if available). find: '/opt/paperless/media/lost+found': Permission denied ### 🖼️ Additional context (optional). To solve the problem I downloaded the script used in the update command and replaced this find line: `cp -r /opt/paperless/media /opt/paperless/backup/` with this: `(cd /opt/paperless/media && find . -mindepth 1 -maxdepth 1 ! -name lost+found -exec cp -r {} /opt/paperless/backup/ \;)` and the find with this: `find /opt/paperless -path /opt/paperless/media/lost+found -prune -o -name "__pycache__" -type d -exec rm -rf {} +`
saavagebueno added the not a script issue label 2025-11-20 05:17:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#1802